One of the things I think has generally worked well about “Linux” and the ecosystem on top of it has been the variety of userspace. There’s obviously some pointless things, but also some genuine innovation. It works well when upstream projects are structured in a way that they can be mixed and matched.
For Fedora CoreOS we are combining two technologies; Ignition and rpm-ostree. Previously they were used independently (Ignition with a ChomeOS style A/B updater) and rpm-ostree with the traditional Fedora-and-derivatives setup of Kickstart for bare metal, and cloud-init for clouds.
Putting the two together has been working well so far, but I’ve recently been working on support for root filesystem reprovisioning which is where the two projects intersect strongly. This has meant a lot of time writing code in the initramfs.
And the topic of this blog is “systemd is well designed” because the design for systemd in the initramfs is very flexible and also well documented. We’re continuing to support Ignition independent of OSTree, as well as OSTree independent of Ignition, while also having both of them work together. Further, the projects are written in different languages; Ignition is Go, OSTree is C, we have the usual (unfortunate) mix of shell script in there, and it’s likely we’ll add some Rust soon too.
This is where systemd excels; we can plug these things together in a coordinated fashion by writing unit files with careful dependencies. They can communicate however they want; in practice, writing files in /run is a common pattern.
Also worth noting is we’re using dracut, which is itself independent of systemd, designed to just implement the systemd boot sequence – our units plug into the “custom initrd services” section. And it all Just Worked. The systemd initramfs boot sequence (and the boot sequence in general) was designed long before either OSTree or Ignition were created, but it’s stood the test of time.