Gitops Best Practices: Automating Infrastructure Operations
GitOps is an operational framework that takes DevOps best practices used for application development such as version control, collaboration, compliance, and CI/CD, and applies them to infrastructure automation.
As VentureBeat describes enterprise DevOps teams are bypassing the plethora of management consoles required to manage their applications and instead doing so from within the code itself, through ‘GitOps’ automations.
Enterprise organizations like Chick-fil-A utilize these practices.
Their digital properties are powered by a Digital Experience Engine (DXE), a cloud-based microservices architecture composed of about one hundred services, running in a Kubernetes-based application platform.
They utilize GitOps to manage the complexity of rolling out application updates across a distributed mobile and POS digital business system.
What is Gitops?
As the term suggests it’s an approach based on using Git as the central, single source of truth for application development and deployment. There is a ‘source of truth’ for both your infrastructure and application code, allowing development teams to increase velocity and improve system reliability.
GitOps.tech offers this intro guide, where they state: “The fundamental idea of GitOps can be summarized as operations managed and performed in a declarative way with Git as the source-of-truth system.”
Your system configuration is defined and stored in a version control system, with the use of software agents to detect when this changes and automatically update the production environment to match it.
This approach brings many benefits:
- Your apps can be easily deployed and rolled back to and from Kubernetes. And even more importantly, when disaster strikes, your cluster’s infrastructure can also be dependably and quickly reproduced. This trivializes rollbacks; where you can use a `Git revert` to go back to your previous application state.
- When you use Git workflows to manage your cluster, you automatically gain a convenient audit log of all cluster changes outside of Kubernetes. An audit trail of who did what, and when to your cluster can be used to meet SOC 2 compliance and ensure stability.
- Continuous deployment automation with an integrated feedback control loop speeds up Mean Time to Deployment. Your team can ship 30-100 times more changes per day, increasing overall development output 2-3 times.
Your system configuration is defined and stored in a version control system, with the use of software agents to detect when this changes and automatically update the production environment to match it.
CodeFresh provides this helpful guide to explain the relationship between GitOps and DevOps:
“GitOps enhances DevOps by incorporating Git throughout the software delivery process, making it easier to orchestrate projects and keep them in sync. The end goal is to achieve smoother, faster, and more reliable software development and delivery.
GitOps pipelines use Kubernetes concepts, so they are easy to adopt by teams who already work with Kubernetes. They build on traditional DevOps practices, so changes to existing workflows are minimal for teams that have invested time in automating their software delivery.”