Very cool @jeremypoulter ! I’d be inclined to agree with @alexandrecuer here - we have two interlinked problems here - one is reliably/atomically serving updates to the deployed fleet of Emon* devices, and the other is efficiently maintaining the operating system itself so we can stay current with the accelerating pace of security updates in this new world of AI cat and mouse games.
I love the architectural approach - an immutable core OS, A/B boot and update stuff - keep the workloads like emoncms and emonhub in containers, makes it very easy to add HA, ebusd, etc etc onto the same hardware, and move away from fragile shell scripts, git pulls and dpkg crunching away and falling over / running out of disk. Endless OS has been doing an immutable OS with ostree since 2014 way before it was cool.![]()
The RAUC stuff, test harness, etc all looks excellent. If we weren’t on Pi, I’d probably suggest systemd-boot / systemd-sysupdated which is where all of the UAPI / Image Based Linux / systemd / Amutable / etc cool cats are investing. But as we’re on Pi, the “when in Rome…” argument carries a lot of water, and EFI firmware on Pi is really janky.
That said, on the other problem of efficiently maintaining the OS so we can stay current with security updates, moving to effectively committing the OEM project to maintaining their own OS seems like a step in very much the wrong direction. Maintaining our own Buildroot makes every glibc, libpng, etc etc CVE our own responsibility. I know I’m hardly a seasoned contributor here, but I would go far as strongly advising against it. ![]()
Back to the “when in Rome” argument, given that Raspberry Pi maintain the OS for Raspberry Pi, and Debian maintains the rest, and on the whole we seem to be a Debian shop (I’d assume that our container images will either be Debian based, or Alpine which is kind of just diet Debian for containers), my recommendation would be to keep all of the updater work and infrastructure, and work on a mkosi process to build the OS payloads by unpacking debs. Then we’ll get all of the security updates, latest Pi kernels and firmware, etc for free, and we just have to re-run the image build to get latest everything, rather than keeping on top of dozens of components patches/releases, and hosting multi-TB multi-hour rebuilds. That’s a great deal of human and infrastructure cost for benefits I’d struggle to articulate.
(I’ve not reviewed the code or tried anything yet, but GitHub - valtzu/rpi-mkosi: An example on how to build & distribute images for Raspberry Pi with mkosi · GitHub looks interesting - it goes down the systemd-boot path which I think is overkill, but it might be interesting to look at how they use mkosi.)
Of course, feel free to ignore me - I might be able to find time to play with some of this, but am meant to be reviewing some legal paperwork for work so I can’t promise anything! I’m not the one doing the work and volunteer time is famously non-fungible. Appreciate everything you all do! ![]()