What is GitOps?
GitOps, told as a story about a blueprint store where construction starts automatically the moment a new blueprint arrives.
The blueprint gets updated, but the actual construction sometimes gets forgotten.It only catches up much later.
When updating the blueprint and building are two separate steps, people forget one.Split into two steps, and one of them always slips through the cracks.
Drop a new blueprint in the store, and the crew notices it and builds it, automatically.The store is always today's single source of truth.
Drop it in, it's auto-detected, built, and done.No person needs to step in anywhere along the way.
Put a bad blueprint in the store, and it gets built automatically, exactly as it is.A review before it goes in is essential.
GitOps = treating the blueprint store as the single source of truth, so that construction automatically follows whenever a new blueprint goes in.
Running infrastructure by treating a Git repository as the single source of truth. When the repo changes, an automated tool detects the difference and pulls the live environment into sync (pull-based deployment). If reality drifts from the repo, it auto-syncs back, and rolling back is as simple as reverting the repo to an earlier commit.
When grown-ups say it
- GitOps
- A way where construction automatically follows a change to the blueprint store. The next step after infrastructure as code.
- Repo as single source of truth
- The store is always the answer. Reality is what has to match it.
- Auto-sync
- Automatically reconciling reality with the store. No one needs to manually line things up.
- Pull-based deployment
- The crew pulling the blueprint from the store on its own. Nothing is pushed in — it's pulled.
- Infrastructure as Code
- Writing the blueprint down as a single piece of code. This is the blueprint that GitOps operates on. → building the whole park from one blueprint
- Review and approval
- Reviewing before it goes into the store. Catch mistakes here, or they spread automatically.
- Rollback
- Reverting the store to an earlier blueprint. Revert it, and reality follows automatically too.
- CI/CD
- The earlier steps — reviewing and getting the blueprint into the store. GitOps picks up after that, from the store to construction.