Running Flatcar on Scaleway
These instructions will walk you through using Flatcar on Scaleway , importing an image, and running your first server using the command line interface. Please note that Scaleway is a community supported platform at the moment which means that the CI does not run on Scaleway images.
Import the image
Note: This getting started assumes that Scaleway and AWS CLI are already installed and properly configured.
It is possible to import your own Flatcar image in Scaleway using the CLI . The process is done in two steps:
- Upload Flatcar image on Scaleway S3 bucket
- Create a snapshot from the S3 object
For example, to upload an image from the Flatcar Beta channel:
|
|
Butane Configs
Flatcar allows you to configure machine parameters, launch systemd units on startup and more via Butane Configs. These configs are then transpiled into Ignition JSON configs and given to booting machines. Jump over to the docs to learn about the supported features . We’re going to provide our Butane Config to Scaleway via the user-data flag. Our Butane Config will also contain SSH keys that will be used to connect to the instance.
As an example, this Butane YAML config will start an Nginx Docker container and display the instance hostname:
|
|
Transpile it to Ignition JSON:
|
|
The coreos-metadata.service saves metadata variables to /run/metadata/flatcar. Systemd units can use them with EnvironmentFile=/run/metadata/flatcar in the [Service] section when setting Requires=coreos-metadata.service and After=coreos-metadata.service in the [Unit] section.
Launch machine
Boot the machine with the CLI, referencing the snapshot ID from the import step above and your Ignition file from Butane :
|
|
Your first Flatcar instance should now be running. The only thing left to do is find the IP address and SSH in.
|
|
Finally SSH into an instance, note that the user is core:
|
|
Using Flatcar Container Linux
Now that you have a machine booted it is time to play around. Check out the Flatcar Container Linux Quickstart guide or dig into more specific topics .
Terraform examples are available here: https://github.com/flatcar/flatcar-terraform/tree/main/scaleway .
Scaleway Kosmos
Kosmos is a Scaleway service that deploys a Kubernetes control plane on Scaleway and allows you to add nodes outside of Scaleway (other cloud providers, on-premise, etc.). At this moment, the Scaleway Node Agent used to join the existing cluster is not open-source and does not yet support immutable OS. A request has been made to support OS where Kubeadm and Kubelet would be already available in the path.