Prepared demo for the Flatcar Office Hours on Wednesday, June 12 2024.
The recording for the demo can be found here: 2024-06-12 Flatcar Office Hours.
Install devbox — this will provide all of the tooling required to run the Steps outlined below. After devbox is installed, run
devbox shell
to start a new shell with an updated $PATH
that puts the devbox-installed
tools before anything provided by your system.
Note
If you would prefer to not use devbox, you will need to install the following:
- linode-cli for interacting with the Linode API from the comfort of your own terminal;
- GNU make for running the canned instructions to get a running Flatcar Linode;
- curl for retrieving the specially-patched OS image;
- jq for extracting information from the Linode API responses;
- The butane configuration transpiler for converting
butane.yaml
into anignition.json
file for configuring your Flatcar Linode at first boot.
Once you have the Linode CLI installed, you will need to configure it. This will perform a web-based flow that will log you in through your web browser, and provision a personal access token:
linode-cli configure
Create an SSH key that can be used to log in to your Flatcar Linode, once it is up and running:
ssh-keygen -t ed25519 -f id_ed25519
Now open butane.yaml
in your preferred text editor, and add the public SSH
key to the ssh_authorized_keys
list for the core
user:
passwd:
users:
- name: core
ssh_authorized_keys:
- "ssh-ed25519 ..."
then save the file, and exit the text editor.
At this point you are ready to go on to launch your first Linode running Flatcar Container Linux!
make upload-image
— will retrieve the custom OS image built and provided by Flatcar, containing (now-upstreamed) patches to Ignition and Afterburn, that allow it to boot on Akamai/Linode.make instance
— creates a Linode instance that is not booted.make instance-disk
— creates the boot disk for the Linode instance, from the Flatcar image that was uploaded in step 1.make instance-config
— creates an instance configuration to associate the boot disk with the instance.linode linodes boot "$(make instance-id)"
— boots the Linode instance!
At this point, you can either use the Linode CLI or the Cloud
Manager to retrieve the public IP address for your
new flatcar-demo
instance.
If you go to that IP address into your web browser, you will be greeted with a
very basic web page displaying the name ("label") of your Linode instance.
If you would like to log into your fancy new Flatcar Linode instance and poke around a little bit, run:
ssh -i id_ed25519 core@<IP_ADDRESS>
When you are done with this Linode instance, run
make destroy
to stop and delete the Linode instance.
If you would like to customize any aspects of the Linode instance that gets run, these can be tweaked in the Makefile:
Makefile macro | Default Value | Description |
---|---|---|
REGION |
us-ord | The Linode region to launch the instance in. |
INSTANCE_TYPE |
g6-nanode-1 | The instance type (size) to launch. |
INSTANCE_LABEL |
flatcar-demo | The name of the instance (the "label"). |