Fedora CoreOS - Producing an Ignition File
This guide provides easy, step-by-step instructions to produce a basic Ignition file.
Fedora CoreOS (FCOS) Ignition files specify the configuration of FCOS. The process begins with a YAML configuration file. The FCOS Configuration Transpiler (FCCT) converts the human-friendly YAML file into machine-friendly JSON.
|Once FCOS boots and ingests the Ignition file, the configuration is meant to be immutable. Therefore, plan your Ignition file with the full configuration specifications that you will need.|
Create a basic Ignition file that modifies the default FCOS user
core to allow this user login with an SSH key.
The overall steps are as follows:
Write the Fedora CoreOS Configuration (FCC) file in the YAML format.
Download and install the Fedora CoreOS Configuration Transpiler (
fcctto convert the FCC file into an Ignition (JSON) file.
core user on your local machine, and generate an SSH key for this user. When the user logs in via SSH, you will use the SSH key from the local host.
Copy the following example into a text editor:
variant: fcos version: 1.0.0 passwd: users: - name: core ssh_authorized_keys: - ssh-rsa AAAA...
Replace the above line starting from
sshwith the contents of core’s SSH public key file.
Save the file with the name
YAML files must have consistent indentation. Although
fcct, the Fedora CoreOS Config Transpiler, is a tool that produces a JSON Ignition file from the YAML FCC file. Using the FCC file, an FCOS machine can be told to create users, create filesystems, set up the network, install systemd units, and more.
An easy way to use
fcct is to run it in a container with
Pull the container for
podman pull quay.io/coreos/fcct:release
Run fcct on the FCC file:
podman run -i --rm quay.io/coreos/fcct:release --pretty --strict < example.fcc > example.ign
example.ignfile to boot FCOS.
Refer to Provisioning and Configuration for the full configuration specification.