As the software industry began to evolve during the 2000s, we saw DevOps practices begin to gain popularity as it made application delivery seamless in production by continuous integration and continuous delivery. DevOps has quickly become an integral part of any organizations digital transformation, mainly because of the following aspects: it brings a culture of shared responsibility, and it offers transparency and faster feedback. GitOps started to become popular as it started to address some minor issues that started to pop up in the DevOps environment.
GitOps along with DevOps are two approaches that blur the lines between IT operations and development tasks – and while they share some principles, they also have significant differences. This article will look at what Gitops is and how it can work alongside DevOps to reach your organization’s goals.
On the surface, GitOps is rather simple. It is centred on using a version control system (such as Git) to house all information, documentation, and code for a Kubernetes deployment, and then deploying changes to the cluster using automated directors. But, if you start to peel back the layers you will soon realize that it is a lot more complex and intricate.
What Is GitOps
GitOps adheres to the principle that Git is the only source of truth. Version control is required for GitOps, which means anyone can view the entire audit trail of changes. The commits to the desired state are fully traceable and contain committer information, commit identifiers, and time stamps. As a result, both the application and the infrastructure are versioned artefacts and can be audited using gold standards of software development and delivery.
Since GitOps is a Git-based source code management system, GitHub, GitLab, and Bitbucket are natural choices.
How GitOps Works
Since we fix production issues via pull requests rather than directly tinkering with a system, troubleshooting becomes easier and faster. As long as we limit cluster access to a few privileged admins, we can apply the same Git workflow to both operations and development. Modifications to the application and cluster can then be contained to the following activities: Updates to container images, modifications to the declarative specification, or in other words, the desired state and errors in the environment, such as container malfunctions.
“Operating via pull requests reduces the number of variables that transform deployments into crime scenes! Fortunately (or, unfortunately for people who revel in heroics and theatrics), code deployers are no longer awarded “war hero” status for manually moving bits from point A to point B.”[1]
How To Get Started With GitOps
In order to get started with GitOps, you need an infrastructure that can be managed declaratively. Hence, GitOps is often used as an operating model for Kubernetes and cloud native application development, allowing continuous deployment for Kubernetes.
However, Kubernetes is not a requirement for GitOps, however it is highly recommended that you use the two together. GitOps can be applied to many other pipelines and infrastructures. By using GitOps, developers can create pipelines, code applications, manage configurations, provision Kubernetes clusters, and deploy to Kubernetes or container registries.
The Difference Between GitOps and DevOps
DevOps and GitOps do share some of the same principles and objectives. The concept of DevOps revolves around bringing development teams and operations teams together in a collaborative manner.
GitOps lets you take DevOps practices, like collaboration, CI/CD, and version control, and apply them to infrastructure automation and application deployment.
Developers can work in the code repositories they are already familiar with, while operations can put the other pieces in place. GitOps bridges the crucial gap between devops techniques that were originally developed to address system administration challenges and the needs of cloud-hosted applications. The automated convergence provided by various cloud vendors makes GitOps so attractive.
Further Reading
If you are interested in learning more about GitOps and how to implement it into your organisations, below are some links to blogposts that dive deeper into these topics.
https://www.redhat.com/en/topics/devops/what-is-gitops
https://about.gitlab.com/topics/gitops/
https://medium.com/devops-dudes/gitops-evolution-of-devops-bfdb639dc387
https://www.atlassian.com/git/tutorials/gitops
Sources:
https://www.atlassian.com/git/tutorials/gitops
https://www.redhat.com/en/topics/devops/what-is-gitops
https://about.gitlab.com/topics/gitops/
https://medium.com/devops-dudes/gitops-evolution-of-devops-bfdb639dc387
https://www.atlassian.com/git/tutorials/gitops
https://opensource.com/article/21/3/gitops
https://thenewstack.io/what-is-gitops-and-why-it-might-be-the-next-big-thing-for-devops/
[1] https://www.cloudbees.com/gitops/what-is-gitops