Case
Template factory
In useFresh, proven VM templates for three Linux distributions every month — without anyone tending to them.
What & why
An automated factory that maintains six VM templates: the latest and the previous version of Rocky Linux, Ubuntu and Debian. Every month it fetches the new install ISOs itself, rebuilds the templates, tests them by rolling out a real VM from each, only then puts them into production, and emails a summary of what went right and wrong.
Templates age quietly. A manual rebuild always ends up at the bottom of the list, so in practice you are still rolling out an image with hundreds of missing updates months later — and only notice when something goes wrong. We wanted the maintenance to happen on its own, and a template to become the shared base only once it is proven you can get a working machine out of it.
Approach
- Fourth Saturday: a check across the upstream releases. If there is a newer ISO, it is fetched, checksum-verified and recorded — including a merge request that carries itself through, so the change is in git before anything is built with it.
- Fourth Sunday: the build. Six templates in a row, each in its own log file, and a failed build does not block the rest.
- Versioning in the content library: the existing template gets the date in its name and stays as an archive; the fresh one takes its place. Rolling back is a matter of choosing, not rebuilding.
- Smoke test: a throwaway VM is rolled out from each fresh template and checked — does the system boot, does the version match, are central users recognised — after which it is cleaned up again, even if the test fails.
- Reporting: one email with, per distribution, the outcome of build and smoke test, so you see at a glance whether the month went well.