Fedora CoreOS - Getting Started
Fedora CoreOS (FCOS) has no install-time configuration. Every FCOS system begins with a generic disk image. For each deployment mechanism (cloud VM, local VM, bare metal), configuration can be supplied at first boot. FCOS reads and applies the configuration file with Ignition. For cloud deployments, Ignition gathers the configuration via the cloud’s user-data mechanism. In the case of bare metal, Ignition injects the configuration at install time.
|For more information on configuration, refer to the documentation for Producing an Ignition File.|
To launch FCOS on AWS:
Go to the download page to identify the correct AMI.
Specify the Ignition configuration file as the user-data. You can skip this step, but you will want to specify a key using
--key-nameso that you can still access the node. This provides an easy way to test out FCOS without first creating an Ignition configuration.
aws ec2 run-instances <other options> --image-id <ami> --user-data file://example.ign
aws ec2 run-instances <other options> --image-id <ami> --key-name my-key
While the AWS 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.
Go to the download page to retrieve the latest image suitable for QEMU.
Uncompress the file. Assuming that the downloaded file is called
fedora-coreos-qemu.qcow2.xz, the command would be the following:
Ensure the correct ownership of the file:
chown core:kvm fedora-coreos-qemu.qcow2
The above example assumes that you have created the user named
coreon your local machine. If you did not, replace
corewith the user that will boot FCOS on the local host.
Specify the Ignition file to the hypervisor. In the case of QEMU, this is done with the
-fw_cfgparameter, which sets the
opt/com.coreos/configkey in the QEMU firmware configuration device.
You must use absolute file paths here. QEMU cannot resolve relative file paths for these options.Example launching Fedora CoreOS with QEMU
qemu-system-x86_64 -machine accel=kvm -m 2048 -cpu host -nographic \ -drive if=virtio,file=path/to/fedora-coreos-qemu.qcow2 \ -device virtio-rng-pci \ -fw_cfg name=opt/com.coreos/config,file=path/to/example.ignExample launching FCOS with virt-install
virt-install -n fcos --vcpus 2 -r 2048 --os-variant=fedora31 --import --network bridge=virbr0 --disk=/var/lib/libvirt/images/fedora-coreos-30.20190905.0-qemu.qcow2,format=qcow2,bus=virtio --noautoconsole --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/path/to/example.ign"
Once the VM has finished booting, its IP addresses will appear on the serial console.
You can then SSH into the FCOS VM as the
ssh core@<ip address>
Follow the Bare Metal Installation Instructions to install Fedora CoreOS to disk. This procedure injects the specified Ignition configuration at install time.