Using RHCOSΒΆ

ClusterWare provides support for installing and using RHCOS.

First create a repo from a RHCOS ISO file. For example:

scyld-clusterctl repos create name=rhcos iso=@rhcos-4.10.3-x86_64-live.x86_64.iso

Once the repo is created, the ISO will be automatically forwarded to all head nodes and will be locally mounted on each. Below are the repository details immediately after the upload completes:

[cwadmin@virthead]$ scyld-clusterctl repos -i rhcos ls -l
Repos
  rhcos
    iso
      chksum: ee4f06946822b55c81c8aa95e21df4f02b9699e8
      filename: 7e9666b05e914b85b59be21f23ce9136
      mtime: 2022-06-17 18:20:52 UTC (0:16:20 ago)
      size: 999.0 MiB (1047527424 bytes)
    isolabel: rhcos-410.84.202201251210-0
    keys: []
    name: rhcos
    urls: []

Now create a boot config that uses this repo:

scyld-bootctl create name=rhcosBoot repo=rhcos

Examine the details of the boot config:

scyld-bootctl -i rhcosBoot ls -l
Boot Configurations
  rhcosBoot
    cmdline: coreos.live.rootfs_url=<BASE_URL>/repo/rhcos/content/images/pxeboot/rootfs.img coreos.inst.install_dev=<attributes[_coreos_install_dev]> coreos.inst.ignition_url=<attributes[_coreos_ignition_url]>
    image: none
    initramfs: repo:images/pxeboot/initrd.img
    kernel: repo:images/pxeboot/vmlinuz
    last_modified: 2022-06-17 18:22:31 UTC (0:03:42 ago)
    name: rhcosBoot
    release: 4.18.0-305.34.2.el8_4.x86_64
    repo: rhcos

Note the _coreos_install_dev and _coreos_ignition_url attributes in the cmdline. These attributes are set by the scyld-nodectl tool for the specific node(s) that use the rhcosBoot boot config.

For example:

scyld-nodectl -in0 set _boot_config=rhcosBoot \
                       _coreos_ignition_url=http://10.20.30.40/path/path/ignition.ign \
                       _coreos_install_dev=/dev/sda

For further information and examples about ignition files, see https://cloud.redhat.com/blog/provision-red-hat-coreos-rhcos-machines-with-custom-v3-ignition-files.

This variable replacement scheme is similar to the variable replacement in kickstart *.ks files.