upgrade
An upgrade builds the images from the new checkout and restarts the instance. Each of the two guest artifacts goes into a new directory, and .env must name the new directory.
The commands upgrade an instance
Run the commands in the arizuko checkout. Replace demo with the name of the instance.
git pull # the new release
make build # ./arizuko and the daemon binaries
sudo make images DATA_DIR=/srv/data/arizuko_demo # prints rootfs: <dir>
sudo make kernel DATA_DIR=/srv/data/arizuko_demo # prints kernel: <dir>
sudoedit /srv/data/arizuko_demo/.env # RUNED_ROOTFS_DIR, RUNED_KERNEL_DIR
./arizuko generate -i demo # read every warning it prints
sudoedit /etc/systemd/system/arizuko_demo.service # set the release image tag if it changed
sudo systemctl daemon-reload # load the unit if it changed
sudo systemctl restart arizuko_demo # the service generates and starts
./arizuko send -i demo main "ping" --wait # one reply proves the path
Each artifact goes into a new directory
A turn starts a guest kernel and a root filesystem from the data directory. The name of each directory contains a hash of its content. runed reads the two paths from .env:
make images ──► DATA_DIR/images/rootfs-<image id>/ ◄── RUNED_ROOTFS_DIR
make kernel ──► DATA_DIR/images/kernel-<version>-<hash>/ ◄── RUNED_KERNEL_DIR
make images exports a new rootfs tree only when the arizuko-ant image changed. It prints the directory in both cases. It deletes no tree. arizuko images -i <name> lists every rootfs and kernel tree, and arizuko images -i <name> --prune removes every tree that .env does not name. make kernel builds only when kernel/Dockerfile, kernel/arizuko.fragment, kernel/check-config.sh or kernel/guest-init/*.go changed. In all other cases it prints is current, and RUNED_KERNEL_DIR does not change.
When RUNED_ROOTFS_DIR keeps the old value, the new daemons start the guest of the previous release. No error occurs.
arizuko generate shows its warnings before the restart
systemctl restart runs the generator from the service's release image, then starts Docker Compose. arizuko generate before the restart shows its warnings on the terminal, not in the journal. Two warnings need a fix before the restart: a FROZEN fragment, and a daemon without a store key. A daemon without a store key restarts the whole instance in a loop.
The next turn reads released package assets
Startup installs core. Run arizuko package sync -i NAME to update other selected sources. Release notices use the existing outbound queue and only configured #announce destinations. Package updates start no agent migration turns.
The older rootfs tree rolls back the guest
The older rootfs tree stays on disk. Set RUNED_ROOTFS_DIR to the older tree and restart. The daemons keep the new images. A rollback of the daemons needs a build from the old checkout.
Five gates end a release
A maintainer runs post-deploy gates 1–4 in [gates.md]. The owner may run anteval by hand on a throwaway instance to check agent behavior; never run it against a live instance.