Hi all,
I got tired of updating my clusters three times: OS packages, then core, then apps. So I wrote a script that does it all from the leader, in NS8’s own order: OS, core, apps. I also wanted the OS to stay on its Rocky minor until I say so, and to stop wondering “am I up to date?”.
Core and apps are updated on every node, whatever its OS. The OS step covers Rocky Linux nodes only: that’s where NS8 ships its own repos. Debian or other nodes are skipped with a warning.
How it works
A systemd timer runs it on the leader, each Monday between 00:00 and 06:00. It only uses NS8 tools and actions, with no SSH between nodes.
- OS: NS8’s
update-oson each Rocky node, one at a time (ns-baseosandns-appstreamonly). - Core:
update-coreon all nodes, only if a newer core exists. - Apps:
update-moduleson all nodes, only if an app has an update.
Rocky minor guard: if a new minor is in the repos, the OS step is skipped on all nodes with a warning. Core and apps still run. When I’m ready:
ns8-cluster-updater.sh --os --os-allow-minor
Follow it: journalctl -u ns8-cluster-updater.service. Each run also warns when a newer release of the script is out. Releases are on GitHub with SHA256SUMS.
Warning: get a subscription if you can
A subscription is the better choice. NS8 updates are then tested by the community before they reach you. This script always installs the latest versions, so a fresh bug can land on your cluster the night it’s released. With a subscription, the script exits and lets NS8 do the job.
Limitations
- Turn off NS8 automatic updates.
- OS updates on Rocky nodes only, from the NS8 repos. EPEL, Debian and other OSes are up to you.
- It never reboots. It only tells you if the leader needs one.
- The minor guard trusts the NethServer mirror seen by the leader.
It covers my needs now. If you have ideas, tell me here or open an issue.