I am trying to achieve a (mostly) “stateless” raspberry pi server setup and currently have the following working:
- Raspberry Pi firmware is set to network boots and loads EDK2 UEFI from TFTP
- EDK2 then PXE boots CoreOS over TFTP
- CoreOS downloads an ignition file
- this sets up a portainer edge agent container, that connects to a central portainer instance that then deploys a docker compose stack
- I also have /var setup as persistent via a USB drive to store the container image files
The issue comes when I try to reboot the server. On the second boot it fails to launch the containers because the docker-compose stack created a network that no longer exists.
Turns out these exist in
/etc/containers/networksas configured by
/usr/share/containers/containers.conf and this directory gets wiped as its running on tempfs in RAM when the server reboots. I have tried using ignition to modify
containers.conf but since this lives on
/usr it is read-only and ignition fails to run.
Does anyone have any ideas on how I might work around this issue? It seems like something that should be supported. The documentation discusses this usecase of running via PXE and persisting containers here: Installing CoreOS on Bare Metal :: Fedora Docs and Running Fedora CoreOS directly from RAM :: Fedora Docs