Is it possible to modify the embedded Ignition file when you are booted up in the live ISO?

That would open up so many possibilities!

Hypothetical example 1:

An Ignition file that could act as a computer inventory collector.
Boot up each of your computers one after one with the same USB stick.
Hardware information about each computer is collected and stored into the embedded Ignition file.

Hypothetical example 2: (A variation of the first example)

An Ignition file that could act as a Kubernetes cluster configurator and installer.
First boot up each of your computers as in the first example to collect hardware information.
After that the user would be able to enter a configuration mode where some choices need to be
made, with questions like “According to your available hardware, computer A would be suited to act as the kube-apiserver. Do you accept?”
The last mode would be an install mode where you need to boot up all the computers again.

For OpenShift we are already doing something similar to this in https://github.com/openshift/enhancements/blob/master/enhancements/installer/connected-assisted-installer.md

Definitely using the Live ISO model with Ignition works really well for these types of use cases. As far as modifying it…there’s a lot of details there but certainly you can get access to the fetched config and modify/extend it later and then provide it for a persistent install.

To clarify, there are two Ignition configs:

  1. The one that drives the live boot, which is embedded in the ISO image
  2. The one that’s written to disk by coreos-installer, if you’re running an install

Modifying #1 might be possible by re-running coreos-installer iso embed from the live system. It doesn’t make sense in the general case, of course, since CD-ROM discs can’t be rewritten at runtime. :smirk:

Modifying #2 is definitely possible. Rather than using the coreos.inst kargs, you’d use config #1 to create your own systemd service to generate an Ignition config (maybe from a template) and then run coreos-installer.

Thanks for sharing the link! Yes, that is indeed similar.

Thanks for the clarification! I tried out #1 and it worked!

[core@localhost ~]$ cat foobar.ign | sudo coreos-install iso embed -f /dev/sda
[core@localhost ~]$ sudo reboot

After rebooting, the computer booted up according to the information in my ignition file foobar.ign