BOOKS DEEP-READ · CONTINUOUS DELIVERY · CH 2

Configuration Management

Continuous Delivery · Ch 2 · Jez Humble & David Farley · 2010

中文 →

What is this chapter about?

Almost every company has that one server nobody dares touch. Something important runs on it, but how it was originally set up — and who changed what since — is no longer knowable. The day it dies, the company rebuilds it by archaeology on a few long-timers' memories. Chapter 2 of Continuous Delivery is about making that machine extinct: write down how the whole system is assembled, store it, and record every single change to it.

An analogy

A coffee shop wants to open a second location. If the first shop's taste lives in the manager's hands — grams of beans by feel, machine pressure tuned once years ago and never written down — the second shop will never taste the same. But if every step is written into a manual anyone can follow, then opening the tenth shop, or rebuilding the first one after a flood, is just following the manual again. Configuration management builds that manual for a software system — and the manual itself goes into the archive, where each edit leaves a record: who, when, what.

Why the old world was hard

Three things. First, changes happened on the machine, not in the manual: someone logged in at midnight, tweaked a setting, fixed the problem — and from then on that tweak lived only inside that one box. Second, over time no two machines were alike any more: the same package installed fine here and misbehaved there, and nobody could say what the difference was. Third, there was no "yesterday, when it was good" to return to — you only discover you don't know what yesterday looked like once you need it back.

The core idea

Two plain sentences hold the chapter. First: everything that determines what the system looks like goes into the archive — not just the program, but settings, install scripts, third-party parts, even "which operating system and which patches belong on this machine". The acceptance bar is blunt: a brand-new colleague, on a brand-new laptop, should be able to take one copy out of the archive, run one command, and stand the whole system up.

Second: one batch of goods ships to every branch; only the label changes. The package you built is the very same package from testing all the way to going live — never one build per environment. The differences between environments (which database, whether real email goes out, which features are on) are pushed in from outside at install time. That way the thing you tested and the thing users get are the same thing — which is the only reason any of your testing counts.

And one iron rule: from now on, nothing gets changed by hand on a machine. To change something, change the definition in the archive and let automation push it out to every machine.

What you get

A broken machine can be thrown away and rebuilt identical; a bad change can be rewound to any past state; when something breaks you can find who changed which setting when. The honest cost: scripting everything, and then maintaining that manual forever, is clearly slower up front — and once the settings multiply, the manual itself grows into another complicated thing that needs careful tending.

Remember one thing

There is one question that tells you whether configuration management is real: given the archive and a pile of blank machines, can you rebuild the entire system exactly as it was? If yes, you always have a way back. If no, your system still lives in a few people's memories.

Want the mechanisms, the four-question test, the comparison tables and the diagrams? → switch to the deep read