Golden images and lifecycle upgrades
Quick answer
A golden image is a versioned, approved base from which consistent systems can be created. Build and verify the image repeatedly, inject instance-specific configuration at provisioning, and retire unsupported images through an explicit lifecycle.
Keep a manifest of the image build inputs and immutable version identifier. Do not bake shared private host credentials into the image; generate or inject unique identity at provisioning. Verify a replacement instance before retiring the previous one.
Prepare the practice environment
Run python3 lab-fixtures/enterprise/setup.py from the extracted root as an ordinary user. Enter the printed private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. The helper reads fictional records or uses private loopback services and SQLite. No root, external network or real fleet changes are required. Optional native checks require an authorized VM.
Prerequisites
Review: High availability and disaster recovery.
How it works
An image manifest records source artifact digest, architecture, distribution release, package set, build recipe revision, security review, owner and test evidence. Reproducible inputs improve consistency but do not necessarily yield bit-identical images; timestamps and package repositories can change. Do not embed private keys, tokens, host identities or production data. Prepare instance identity using the distribution's supported image preparation procedure; cloud-init can initialize instance-specific settings on supported images, but its data sources and modules are environment-specific. A booted image must still pass network, identity, security, service readiness and persistence checks. Promote a tested image by immutable identifier rather than mutable names alone. For a major upgrade, verify supported upgrade paths, application/database compatibility and rollback constraints. Prefer replacing disposable nodes when appropriate; stateful data requires explicit migration and recovery planning. Keep a known-good version until rollback and retention requirements are met, then retire it and stop new provisioning. This exercise compares fictional manifests only; it does not clone, clean or upgrade a real image.
Try the examples
The candidate changes release and package set; boot evidence is now false. The identity flag is a model, not an actual scan for secrets.
Expected stdout:
changed: boot_test,packages,releaseinstance identity excludedNo boot test means the candidate is not eligible. Passing this limited gate would still not prove production readiness.
Expected stdout:
reject imageOptional read-only version check in a disposable VM with cloud-init installed; no clean or init command is needed.
Manual example; not executed locally. Follow its stated environment restrictions.
Common mistakes
Do not copy host identity or secrets into a reusable image. Never treat a successful build or an image tag as proof of tested boot, compatibility or security.
Practice
Compare images.json, list the evidence needed to approve v2, and design a retirement rule for v1. Include supported OS upgrade path, instance-specific identity, state migration, rollback and a verified application transaction.
Related references
Study: cloud-init. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Golden images and lifecycle upgrades — Knowledge Check
Apply enterprise operations concepts to concrete local examples.
What identifies an approved artifact reliably?
What belongs outside a reusable image?
What proves successful boot?
What needs special handling during rollback?