Configuration: Making a Server Ready
Provisioning gave Sam a server. But if he logged into it right now, he'd find it almost bare — a running machine with none of the things Pageturn needs to actually run. Creating the server was only half the job.
The other half is configuration management: installing the software, applying the settings, and putting the right files in place so the server is genuinely ready to run Pageturn. Like provisioning, it's done from a file rather than by hand — the same steps applied to every server, identically. Ansible is the best-known tool for this half.
The empty server problem
A freshly provisioned server is a clean room with the lights on and nothing else. The machine runs, but Pageturn needs particular things present to work: the runtime that executes its code, a few supporting tools, specific settings, certain files in certain places. None of that arrives by default.
So between "the server exists" and "the server runs Pageturn" sits a list of setup work. Someone, or something, has to do that work on the bare machine — and doing it badly is its own source of the drift and inconsistency we saw two topics ago.
What configuration management does
Configuration management is automating that setup: capturing the install-and-configure steps so a tool performs them on the server instead of a person doing it by hand. Point the tool at the empty machine, and it installs the runtime, lays down the settings, and puts the files where they belong — turning a bare server into a ready one.
Think of a newly built house. Provisioning is the construction crew handing you the finished shell — walls, roof, a working front door. But you can't live in it yet: the plumbing has to be connected, the appliances installed, the furniture placed. Configuration is all of that fit-out work, the part that makes an empty structure into a place that actually functions.
Described in a file, applied to every server
The setup lives in a file, just as provisioning did. That's what makes it reliable: the same described steps get applied to every server, identically, whether it's one machine or fifty. This is the automation idea from Chapter 2 pointed at server setup — write the steps down once, let a machine repeat them exactly, and stop trusting a tired human to remember step fourteen.
It also means setup isn't a one-time event. The tool can be run again to re-apply the file and pull a server back in line if something on it has drifted, keeping every machine matching the same written description over time. Consistency isn't set once and hoped for; it's re-asserted from the file.
Provision versus configure
Now the two halves of the chapter sit side by side. Provisioning creates the infrastructure — it makes the server exist. Configuration makes it ready — it installs and sets up what runs on that server. One brings the machine into being; the other furnishes it for work.
Real teams often use both together: a provisioning tool like Terraform to create the servers, then a configuration tool like Ansible to make them ready. Keeping the two ideas distinct is the thing to carry forward — "create the machine" and "make it ready" are different jobs, done by different tools, and together they're what people mean by infrastructure as code.
- "Provisioning and configuration are the same step." They're two halves. Provisioning creates the empty server; configuration installs and sets up what runs on it. Different jobs, often different tools.
- "You configure each server by hand after creating it." That's exactly what configuration management replaces. The setup is described in a file and applied automatically, the same way on every machine.
- "Configuration is a one-time thing." It's re-applied. Running the tool again re-asserts the file and corrects any server that has drifted, keeping them all consistent over time.
- "Configuration writes the application itself." No — it installs and sets up what the app needs to run. Pageturn's actual code still comes from the developers and the repo.
- This completes the infrastructure-as-code picture: provisioning creates, configuration makes ready — the two halves you'll keep meeting together.
- It's the direct "why" behind Ansible Deep Dive, where you'll actually write configuration files and apply them to real servers.
- Describing setup in a file is how teams keep dozens of servers identical, and how they pull a drifted one back into line without logging in and fixing it by hand.
- Knowing that "create" and "make ready" are separate jobs explains why real teams pair a provisioning tool with a configuration tool, rather than expecting one to do both.
Knowledge Check
What is the job of configuration management?
- Installing software and applying settings so a server is ready to run the app
- Creating the server, its network, and its storage from scratch before anything else
- Writing the application's features and business logic
- Watching the running app and alerting when it breaks
How do provisioning and configuration relate to each other?
- Provisioning creates the server; configuration makes it ready to use
- They are really just two different names for one and the same single step
- Configuration happens first, then provisioning installs the server
- Configuration replaces the need for any cloud provider
Why is configuration described in a file rather than done by hand?
- So the same setup is applied identically to every server, again and again
- Because writing it in a file makes the server's underlying hardware physically run faster
- Because the file contains the application's own source code
- So the team no longer needs the server at all
You got correct