Prerequisites

Virtualization with libvirt

These tutorials are written targeting a Linux environment with a working libvirt setup and hardware virtualization support via KVM. For instructions to setup libvirt and KVM you may refer to the Getting started with virtualization guide from Fedora. Although this setup guide is focused on Fedora, the tutorials should work on any distribution with libvirt installed and running.

CoreOS tools

For the tutorials, we will need the following tools:

  • coreos-installer: To download the latest Fedora CoreOS QCOW2 image.

  • fcct: To generate Ignition configuration from Fedora CoreOS Config files.

  • ignition-validate: To validate Ignition configuration files.

To keep all configurations files and Fedora CoreOS images in the same place, we will create a new directory to work from:

mkdir ~/coreos
cd ~/coreos

Setup with podman or docker

All of the tools required to work with Fedora CoreOS are available from containers hosted on quay.io:

podman pull quay.io/coreos/coreos-installer:release
podman pull quay.io/coreos/fcct:release
podman pull quay.io/coreos/ignition-validate:release

To make it simpler to type, you should setup the following aliases:

alias coreos-installer='podman run --pull=always            \
                        --rm --tty --interactive            \
                        --security-opt label=disable        \
                        --volume ${PWD}:/pwd --workdir /pwd \
                        quay.io/coreos/coreos-installer:release'

alias ignition-validate='podman run --rm --tty --interactive \
                         --security-opt label=disable        \
                         --volume ${PWD}:/pwd --workdir /pwd \
                         quay.io/coreos/ignition-validate:release'

alias fcct='podman run --rm --tty --interactive \
            --security-opt label=disable        \
            --volume ${PWD}:/pwd --workdir /pwd \
            quay.io/coreos/fcct:release'

You can then use coreos-installer to download the latest stable image with:

coreos-installer download -p qemu -f qcow2.xz --decompress

To make the tutorial simpler, you should rename the image that we have just downloaded to a shorter name:

mv fedora-coreos-32.20200715.3.0-qemu.x86_64.qcow2 fedora-coreos.qcow2

You are now ready to proceed with the first tutorial.

Installing via Fedora packages

Although this should work, we recommended that you run the tools from containers (as described in the previous section) to make sure that you always use the latest versions. If you use the packaged version, make sure that your system is fully updated to the latest Fedora stable release.

All three tools (coreos-installer, fcct and ignition-validate) are available as Fedora packages:

# Installing the tools
sudo dnf install -y coreos-installer fcct ignition-validate

# Downloading the latest Fedora CoreOS stable QCOW2 image
coreos-installer download -p qemu -f qcow2.xz --decompress

To make the tutorial simpler, you should rename the image that we have just downloaded to a shorter name:

mv fedora-coreos-32.20200715.3.0-qemu.x86_64.qcow2 fedora-coreos.qcow2

You are now ready to proceed with the first tutorial.

Manual download

Although this should work, we recommended that you run the tools from containers (as described in the first section) to make sure that you always use the latest versions.

If none of the previous solutions work for you, you can still manually download Fedora CoreOS from getfedora.org with:

RELEASE="32.20200715.3.0" # Update this with the latest release from https://getfedora.org/en/coreos
curl -O https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/$RELEASE/x86_64/fedora-coreos-$RELEASE-qemu.x86_64.qcow2.xz
curl -O https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/$RELEASE/x86_64/fedora-coreos-$RELEASE-qemu.x86_64.qcow2.xz.sig

Once the archive has been downloaded, make sure to verify its integrity by following the instructions available by clicking on the Verify signature & SHA256 button. You will have to download the checksum file, the signature and Fedora GPG keys to verify your download:

curl https://getfedora.org/static/fedora.gpg | gpg --import
gpg --verify fedora-coreos-$RELEASE-qemu.x86_64.qcow2.xz.sig

Once you have verified the archive, you can extract it with:

unxz fedora-coreos-$RELEASE-qemu.x86_64.qcow2.xz

To make the tutorial simpler, you should rename the image that we have just downloaded to a shorter name:

mv fedora-coreos-32.20200715.3.0-qemu.x86_64.qcow2 fedora-coreos.qcow2

You should then download the latest fcct and ignition-validate releases from GitHub:

# fcct
curl -OL https://github.com/coreos/fcct/releases/download/v0.6.0/fcct-x86_64-unknown-linux-gnu
curl -OL https://github.com/coreos/fcct/releases/download/v0.6.0/fcct-x86_64-unknown-linux-gnu.asc
gpg --verify fcct-x86_64-unknown-linux-gnu.asc
mv fcct-x86_64-unknown-linux-gnu fcct
chmod a+x fcct

# ignition-validate
curl -OL https://github.com/coreos/ignition/releases/download/v2.5.0/ignition-validate-x86_64-linux
curl -OL https://github.com/coreos/ignition/releases/download/v2.5.0/ignition-validate-x86_64-linux.asc
gpg --verify ignition-validate-x86_64-linux.asc
mv ignition-validate-x86_64-linux ignition-validate
chmod a+x ignition-validate

You may then setup aliases for fcct and ignition-validate:

alias fcct="${PWD}/fcct"
alias ignition-validate="${PWD}/ignition-validate"

Or move those commands to a folder in your $PATH, for example:

mv fcct ignition-validate "${HOME}/.local/bin/"
# Or
mv fcct ignition-validate "${HOME}/bin"

You are now ready to proceed with the first tutorial.