Provisioning Fedora CoreOS on Google Cloud Platform

This guide shows how to provision new Fedora CoreOS (FCOS) instances on Google Cloud Platform (GCP).


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.

If you do not want to use Ignition to get started, you can make use of the Afterburn support and provide an SSH key via the cloud provider and continue from there.

You also need to have access to a GCP account. The examples below use the gcloud command-line tool, which must be separately installed and configured beforehand.

Selecting an image family

Fedora CoreOS is designed to be updated automatically, with different schedules per stream.

FCOS images are published under the fedora-coreos-cloud project and further organized into image families, tracking the corresponding stream:

  • fedora-coreos-stable

  • fedora-coreos-testing

  • fedora-coreos-next

Before proceeding, check the details of each update stream and pick the one most suited for your usecase.

You can inspect the current state of an image family as follows:

Inspecting an image family
gcloud compute images describe-from-family --project "fedora-coreos-cloud" "fedora-coreos-${STREAM}"

Launching a VM instance

New GCP instances can be directly created and booted from public FCOS images.

If you just want SSH access and no further customization, you don’t need to pass any custom instance metadata. Depending on your GCP project configuration, relevant SSH public keys will be automatically added to the VM. This provides an easy way to test out FCOS without first creating an Ignition config.

Currently we don’t support logging in using ssh through the GCP web console, using the gcloud beta compute ssh cli method or OS Login. See fedora-coreos-tracker#648 for more information.
Launching a new instance
gcloud compute instances create --image-project "fedora-coreos-cloud" --image-family "fedora-coreos-${STREAM}" "${VM_NAME}"

Once the VM finished booting, you should be able to SSH into the instance using the IP address associated with the instance. If you didn’t change the defaults, the username is core and ssh core@IP should work.

In order to launch a customized FCOS instance, a valid Ignition configuration must be passed as user-data at creation time:

Launching and customizing a new instance
gcloud compute instances create --metadata-from-file "user-data=${CONFIG}" --image-project "fedora-coreos-cloud" --image-family "fedora-coreos-${STREAM}" "${VM_NAME}"
By design, startup scripts are not supported on FCOS. Instead, it is recommended to encode any startup logic as systemd service units in the Ignition configuration.