Fedora CoreOS in Hetzner Cloud

by Afanasy Barbarov

Install Fedora CoreOS

Today we'll keep things short and simple. If you need to install Fedora CoreOS (e.g. in order to install OpenShift), you might need to do the following:

  1. Install a tool called butane (brew install butane). It will allow to convert *.bu (butane) files to *.ign (ignition files) that are used by Fedora CoreOS for bootstrapping.

  2. Create a sample butane file ignition.bu

variant: fcos
version: 1.4.0
passwd:
users:
- name: core
ssh_authorized_keys:
- ssh-ed25519 AAA... <[email protected]m>
  1. Convert the file with the tool installed before:
butane --pretty --strict ignition.bu > ignition.ign
  1. Host the file somewhere publicly, in order to get a http url.

  2. Create a new server in Hetzner Cloud. Choose Fedora as an OS. I've tried both x86 and ARM-based images and both worked.

  3. Mount a Fedora CoreOS image after installation. Reboot the server and open cloud console. Mounting and rebooting will end with starting from a Live ISO image, thus SSH access will be inaccessible. After opening the console, install CoreOS with provided coreos-installer (it's a built-in tool, just run it):

sudo coreos-installer install /dev/sda \
  --ignition-url https:/<URL>/ignition.ign
  1. After the installation, unmount the image and reboot. If you used the sample with SSH key (similar to mine from above), you'll get the SSH access to the server. Note that the username is different, so you might need to use something like this:
ssh -i ~/.ssh/hetzner_ed25519 core@<IP_ADDR>
  1. Make a snapshot. You'll be able to create new servers with the snapshot provided. And SSH will work out the box (without providing a key each time).

That's all, folks!

Written by Afanasy Barbarov — Tech Lead with 15+ years shipping production systems in Rust, Go, and TypeScript. Facing a similar challenge? Reach out on LinkedIn. Support my work.

More articles

Previous post

Simple setup for Consul and Nomad in Hetzner cloud. Applicable to other cloud providers with small adjustments. Obviously, Terraform all the way with some bash-scripting for fun.

Read more

Next post

A second try to use Rust for personal projects.

Read more