Fleet inventory and staged patching
Quick answer
A fleet inventory records what systems exist, who owns them and which services depend on them. Staged patching applies an approved update to a small representative cohort first and advances only when defined health gates pass. It reduces blast radius without making updates risk-free.
Choose a small cohort that represents real hardware and service roles. Define success using workload health rather than only package-installation status. If the cohort fails its gate, stop expansion and investigate before changing more systems.
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: Failed mounts and restore drills, CI smoke tests and maintenance, Container security and OCI orientation.
How it works
Record stable host identity, role, owner, distribution, package versions, support lifecycle, failure domain, maintenance window and dependencies. Keep inventory synchronized with actual state; an unknown host or stale package list is a risk, not a successful check. Group by service and failure domain so that redundant peers are not all unavailable together. Review the distribution's security advisory and test dependencies in a comparable VM; an old-looking package version can include backported fixes. Establish baseline health (latency, error rate and business transaction), an observation window, minimum sample size and stop conditions before changes. A canary is a small representative cohort, not merely the first alphabetic host. Ansible serial controls batch size, not successful application-level readiness; its failure thresholds require careful review. Drain traffic where applicable, patch, reboot only if required by the approved plan, verify and rejoin before the next wave. Rollback may require restoring an image or data, since a package downgrade cannot reverse every schema change. The fixtures deliberately model a failed canary and do not patch hosts.
Try the examples
The first wave is explicitly recorded. In practice confirm failure domains and capacity before choosing it.
Expected stdout:
canary: web-a,web-blater: web-cOne canary reports errors and is not ready. The model blocks progression rather than assuming success from package installation.
Expected stdout:
hold wave 2Missing observations do not count as passing health checks. The model uses a strict zero-error rule solely for this tiny fixture.
Expected stdout:
empty and failing cohorts rejectedCommon mistakes
Never infer readiness from a successful package transaction. Avoid patching all redundant peers at once; a rollback needs data compatibility and a recovery path.
Practice
Inspect fleet.json and write a change plan: owner, baseline, canary selection, traffic drain, observation window, stop rule and rollback. Explain why wave 2 is held. In a separate disposable VM, optionally validate a distribution-specific update plan without applying it.
Related references
Study: ansible. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Fleet inventory and staged patching — Knowledge Check
Apply enterprise operations concepts to concrete local examples.
Why use a representative canary?
What follows a failed health gate?
What does Ansible serial control?
What must a rollback plan consider?