SOP Create RHCOS ignition files

Signed-off-by: David Kirwan <dkirwan@redhat.com>
This commit is contained in:
David Kirwan 2021-09-15 12:51:22 +09:00
parent 746afc6e30
commit c894cc2304
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,38 @@
== Create MachineConfigs to Configure RHCOS
=== Resources
- [1] https://coreos.github.io/butane/getting-started/[Butane Getting Started]
- [2] https://docs.openshift.com/container-platform/4.8/post_installation_configuration/machine-configuration-tasks.html#installation-special-config-chrony_post-install-machine-configuration-tasks[OCP4 Post Installation Configuration]
=== Butane
"Butane (formerly the Fedora CoreOS Config Transpiler) is a tool that consumes a Butane Config and produces an Ignition Config, which is a JSON document that can be given to a Fedora CoreOS machine when it first boots." [1]
Butane is available in a container image, we can pull the latest version locally like so:
----
# Pull the latest release
podman pull quay.io/coreos/butane:release
# Run butane using standard in and standard out
podman run -i --rm quay.io/coreos/butane:release --pretty --strict < your_config.bu > transpiled_config.ign
# Run butane using files.
podman run --rm -v /path/to/your_config.bu:/config.bu:z quay.io/coreos/butane:release --pretty --strict /config.bu > transpiled_config.ign
----
We can create a CLI alias to make running the Butane container much easier like so:
----
alias butane='podman run --rm --tty --interactive \
--security-opt label=disable \
--volume ${PWD}:/pwd --workdir /pwd \
quay.io/coreos/butane:release'
----
For more detailed information on how to structure your Butane file see [1]. Once created you can convert the butane config to an igntion file like so:
----
butane master_chrony_machineconfig.bu -o master_chrony_machineconfig.yaml
butane worker_chrony_machineconfig.bu -o worker_chrony_machineconfig.yaml
----

View file

@ -2,3 +2,4 @@
- xref:sop_installation.adoc[SOP Openshift 4 Installation on Fedora Infra]
- xref:sop_configure_baremetal_pxe_uefi_boot.adoc[SOP Configure Baremetal PXE-UEFI Boot]
- xref:sop_create_machineconfigs.adoc[SOP Create MachineConfigs to Configure RHCOS]