Managing a 100+ VM fleet without losing your mind

ansiblejenkinsautomation

At one point I was responsible for a fleet of 100+ virtual machines, spread across every stage of the software development lifecycle: development, staging, testing, and production. Each environment had to exist, stay consistent, and not fall over when someone needed it. Doing that by hand is not possible. Nobody logs into 100 servers one at a time and configures them consistently. You need the machine to configure the machines. ## The approach Two tools carried the load: Ansible for configuration, Jenkins for orchestration. Ansible made the state of a server a definition, not a memory. Want a new VM to look exactly like the existing ones? The playbook says what it should look like, and that's what you get. No drift, no "I think this one had that package installed". Jenkins was the front door. It triggered provisioning and ran the playbooks, so the process was repeatable and recorded. If something went wrong, the log told you where, instead of you having to guess. ## The habits that made it work Three things separated this from "we have some scripts": 1. **Configurations lived in version control.** A server is a deployable artifact. If the definition is in Git, you can review it, roll it back, and answer "what changed?" without a séance. 2. **Scripts for the boring bits.** Shell scripts handled the daily repetitive work. Small, boring, tested scripts. They run faster than a human and they don't get distracted. 3. **Consistency over cleverness.** The boring solution that works on all 100 machines beats the clever solution that works on one. ## What this looks like in practice A developer needs a staging environment. It gets provisioned from the same playbooks as everything else, joins the same monitoring, and behaves like the rest of the fleet. Nobody re-learns the architecture for each new box. That's the whole point: the infrastructure should be boring, because boring is reliable. If you're running a fleet where every server is an individual snowflake, the fix is not more discipline. It's automation. The machines will behave the same way every time, and you can spend your energy on things that break in interesting ways.