Flatcar installation

Flatcar Container Linux is designed from the ground up for running container workloads. It fully embraces the container paradigm, including only what is required to run containers.

Flatcararrow-up-right allows you to create Kubernetes clusters with ease based on immutable Linux nodes.

With i3D.net FlexMetal you can boot Flatcar nodes using the Custom iPXE feature. On this page we will describe the process.

Create your custom iPXE script

To boot the Flatcar OS, you must use the Custom iPXE feature when requesting a FlexMetal server. Below you will find how to perform an API request to do that.

Inside the iPXE script, you must point to the version of Flatcar you want to boot, while also providing the URL to your ignition configuration file.

You must store this file on a webserver that our systems can reach. You can then point to this file's URL in the FlexMetal API request for a new server.

If you need to ACL your website to your server IP space, please find the prefixes in your assigned VLANs.

Example iPXE script

This is an example iPXE script to boot the latest LTS version of the Flatcar OS, using Custom iPXE network variables to configure the network for the initial boot phase. Note the ignition.config.url kernel parameter that should point to your ignition configuration file, to configure Flatcar during the boot phase. The download will occur from the server's main (public) IPv4 address.

#!ipxe

set bootimage_url https://lts.release.flatcar-linux.net/amd64-usr/current
set os_parameters initrd=flatcar_production_pxe_image.cpio.gz flatcar.first_boot=1 ignition.config.url=https://example.org/ignition-configuration.ign flatcar.autologin net.ifnames=0 ${IPXE_BOOT_LINUX_IP_CONFIG}

kernel ${bootimage_url}/flatcar_production_pxe.vmlinuz ${os_parameters}
initrd ${bootimage_url}/flatcar_production_pxe_image.cpio.gz

boot

More details can be found on Flatcar's iPXE boot documentationarrow-up-right.

Example FlexMetal API request

To request a FlexMetal server via our API, you select the custom-ipxe OS with the ipxeScriptUrl parameter pointing to your custom iPXE script:

POST https://api.i3d.net/v3/flexMetal/servers

Request body:

The SSH keys and tags you provide can be fetched from the Metadata API during configuration of Flatcar using ignition.

When requesting a FlexMetal server with the custom-ipxe OS, the delivered state will be set as soon as the iPXE boot script is downloaded. This means that the OS images must still be downloaded and the OS needs to start up and come online.

Ignition configuration

Your ignition configuration file determines how to setup Flatcar as it is booting. What you configure here is up to you. You can find the full ignition configuration in Flatcar's ignition documentationarrow-up-right.

Flatcar configuration using Metadata

Flatcar uses Butane/Ignition to configure the OS during first boot. When booting Flatcar via iPXE, you can pass a URL pointing to the Ignition configuration file where you can include a directive to use the i3D.net Metadata API for [network] configuration. This requires two configurations: one to download a script to perform the configuration and one to run the script.

The functionality of this process is based on https://www.flatcar.org/docs/latest/provisioning/ignition/dynamic-data/arrow-up-right

i3D.net does not have direct integration with CoreOS or Flatcar, so you cannot use the provider kernel directive at this time to perform automatic configuration.

Ignition configuration file additions

Download the Metadata configuration script metadata-script.sh and store it in /opt/get-metadata.sh . An example script is provided in the next chapter below. You can host this on your own web server, or you can provide it to Ignition as a base64 encoded file instead.

Run the downloaded Metadata configuration script:

Metadata configuration script

The following bash script can be used for the Metadata configuration script as referenced in the Ignition configuration above. This will download a server's metadata, configure the hostname and network, but only if that contains a bond (FlexMetal servers are always delivered with NIC bonding). By default Flatcar automatically configures a single uplink according to the ip kernel parameter.

You can customize this script if needed.

You must host this script at a location from which your server can download it.

metadata-script.sh

Last updated

Was this helpful?