GitOps is an approach to managing infrastructure using git repository and git workflow.
Infrastructure as code is captured in git-managed repositories, while pull requests and merges are used for activating specific configuration states.
Git repositories act as the source of truth for infrastructure and application configurations – so confirming what’s configured on the infrastructure is as easy as reviewing the code in a git repo.
GitOps usually includes a component that registers changes to git branches and applies them to specific environments – so configuration deployments are automatic and git can be used to both deploy and roll changes back.
Benefits of GitOps
- Version control and auditability – every change is captured as a git diff, ready to inspect
- Collaboration and transparency – everyone with access to git repository can see what changes are being made.
- Consistency and reliability – same peer review and deployment procedure are ensured for every deployment.
- Faster Recovery and disaster mitigation – simply reverting to a known-good state in your git repository will automatically roll back the infrastructure to a corresponding (working) configuration
- Automation and efficiency – no changes are actually made manually, all the code is picked up and deployed automatically based on git changes
- Continuous delivery – changes, however small, are continuously applied from the Git repository to target environments.
Here’s a separate page explaining this in greater detail: Top 5 Benefits of GitOps.