Provisioning Fedora CoreOS on Vultr

This guide shows how to provision new Fedora CoreOS (FCOS) nodes on Vultr. Vultr publishes FCOS images, but they are out of date, so we do not recommend using the standard Vultr images. Instead, a current FCOS release can be uploaded as a custom image.

Prerequisites

Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see Producing an Ignition File.

Fedora CoreOS has a default core user that can be used to explore the OS. If you want to use it, finalize its configuration by providing e.g. an SSH key.

If you do not want to use Ignition to get started, you can make use of the Afterburn support.

You also need to have access to a Vultr account. The examples below use the vultr-cli and s3cmd command-line tools. Both of these tools are available in Fedora and can be installed via sudo dnf install vultr-cli s3cmd.

Using a custom snapshot

Vultr supports creating custom snapshots from public raw images.

These steps show how to download a FCOS image and upload it to an existing storage bucket, in order to create a snapshot from that.

See Vultr documentation for further details on how to create a bucket and configure s3cmd to use it.

Creating a snapshot

Fedora CoreOS comes in three streams, with different update schedules per stream. These steps show the stable stream as an example, but can be used for other streams too.

  1. Fetch the latest image suitable for your target stream (or download and verify it from the web).

    STREAM='stable'
    coreos-installer download -s "${STREAM}" -p vultr -f raw.xz --decompress
  2. Use s3cmd to upload the raw image to your bucket, and note its public URL.

    BUCKET='my-bucket'
    FCOS_VERSION='...'
    s3cmd put --acl-public "fedora-coreos-${FCOS_VERSION}-vultr.x86_64.raw" "s3://${BUCKET}/"
  3. Create the snapshot from your object URL, and note its ID.

    IMAGE_URL='https://...'
    VULTR_API_KEY='<token>'
    vultr-cli snapshot create-url -u "${IMAGE_URL}"
You’ll need to wait for the snapshot to finish processing before using it. Monitor with vultr-cli snapshot list.

Launching an instance from a snapshot

You can now create a FCOS Vultr instance using the snapshot ID above.

This example creates a 2 vCPU, 4GB RAM instance named instance1 in the New Jersey region. Use vultr-cli regions list and vultr-cli plans list for other options.

NAME='instance1'
SNAPSHOT_ID='...'
REGION='ewr'
PLAN='vc2-2c-4gb'
vultr-cli instance create --region "${REGION}" --plan "${PLAN}" \
  --snapshot "${SNAPSHOT_ID}" --label "${NAME}" --host "${NAME}" \
  --userdata "$(cat example.ign)"
While the Vultr documentation mentions cloud-init and scripts, FCOS does not support cloud-init or the ability to run scripts from user-data. It accepts only Ignition configuration files.
You can find out the instance’s assigned IP by running vultr-cli instance list.

You now should be able to SSH into the instance using the associated IP address.

Example connecting
ssh core@<ip address>