Part 4 of a series reading Continuous Delivery, by Jez Humble and David Farley. Part 1: Continuous Delivery Is a State, Not a Pipeline.
So far this series has treated “the software” as the code. The commits, the tests, the pipeline that proves them.
But the code does not run in a vacuum. It runs on a machine, with a runtime, against a database, holding a fistful of config values. And most teams treat that half of the system as someone else’s job — ops’ problem, handled later, by hand, after the interesting part is done.
That is the gap where releasable software quietly stops being releasable.
The book’s position is blunt: your environment is part of your program. The config, the infrastructure, the OS packages — all of it is input your code depends on, so all of it belongs in version control, right next to the code.
Configuration is code
Start with the smallest version of the problem: configuration.
The default way config happens is that someone SSHes into a box and types values in. A connection string here. A pool size tuned at 2am there. It works — until the box dies, or a second box needs the same treatment, or six months pass and nobody remembers why the timeout is five seconds.
Nothing clever changed. The values are the same. What changed is where they live: in a file, in the repo, reviewed like any other change, and identical every time it deploys. Configuration is code — so it gets the same treatment as code. Version controlled, diffable, and reproducible.1
Environments are versioned artifacts
Now scale the same idea up from a config value to a whole machine.
If a value hand-typed into a box is fragile, an entire environment hand-assembled over years is a time bomb. It has a name. Everyone calls it “the prod box,” and everyone is a little afraid of it, because nobody could recreate it if it burned down. That is a snowflake — unique, delicate, and impossible to reproduce.
The book’s answer is infrastructure as code: the environment is described in files you can version, review, and run to produce the machine from scratch.2 The test is simple and ruthless — could you stand up an identical environment tomorrow from what’s in the repo? If yes, it is an artifact. If it lives only in one server’s accumulated history, it is a liability.
Parity is what makes green mean something
Here is why all of this connects back to Continuous Delivery.
The whole point of the pipeline (Part 2) was that a green run is evidence the software is releasable. But that evidence is only as good as the environment it was gathered in. If your tests pass in an environment that looks nothing like production, green tells you almost nothing.
Watch what drift does to that promise.
Nobody chose this. Prod drifted one live edit at a time — a patched library here, a tuned value there — until it is a machine no file describes. The pipeline was green against dev, so the break is a surprise.
Both environments are the same artifact. Provisioned from the same versioned source, so what passed in one passes in the other. A green pipeline now actually predicts production.
The failure in the hand-managed case is not a bug in the code. The code is fine. The bug is that production drifted away from the environment the pipeline tested, one live edit at a time, until “passed in dev” stopped predicting “works in prod.” Environment parity is what keeps the pipeline honest. The closer your environments are — same OS, same runtime, same config source — the more a green bar actually means.
“Works on my machine” is an environment bug
Which reframes the oldest excuse in software.
“Works on my machine” is usually said as a shrug, as if the difference between machines were an act of God. It is not. It is a defect — a difference between two environments that should have been identical and weren’t. Under CD, that sentence is not an excuse. It is a bug report about your environment management.
deep diveIsn't full infra-as-code overkill for a small project?
The principle scales down further than people expect. You don’t need Terraform and a platform team to version your environment — for a small app, “infrastructure as code” can be a Dockerfile, a compose file, and a checked-in config, which together let anyone recreate the setup with one command. The point isn’t the tooling tier; it’s that no part of your running system exists only in a machine’s memory. A single well-chosen config file already buys you most of the parity. The overkill is not versioning your environment — it’s the weekend you lose rebuilding a box nobody could describe.
So, where does the environment fit?
It is not ops’ problem for after the code is written. It is part of the program.
Configuration is code, kept in version control. Environments are artifacts you can reproduce from files, not snowflakes you’re afraid to touch. Parity between them is what lets a green pipeline predict production instead of merely hoping for it. And “works on my machine” is a bug in that parity, not a fact of life.
Get this right and the environment stops being the wildcard that turns a proven build into a surprise outage.
Next in the series: Part 5, data and migrations — the one place a rollback can’t save you, and the pattern that makes zero-downtime schema changes possible anyway.
Footnotes
-
Jez Humble and David Farley, Continuous Delivery — configuration is treated as a first-class input to the system, kept under version control and managed like code. ↩
-
The modern name for the practice is infrastructure as code. See Martin Fowler, InfrastructureAsCode — provisioning environments from versioned definitions so they are reproducible rather than hand-built. ↩

