Why Are Organizations Adopting GitOps for Continuous Deployment in 2022?

essidsolutions

The GitOps development process saw tremendous adoption from organizations across sectors in 2021, prominently from users of microservices and container-based platforms. Here, we look at the GitOps concept, its benefits, and how companies can leverage it to deploy applications in a container-based environment like Kubernetes.

To develop infrastructure as code, a DevOps engineer will most likely produce files (such as YAML) locally and put the code in a git repository, which offers him version control for IaC and allows other team members to retrieve and participate. However, while making changes to the code, we may not have a clear protocol in place – such as pull requests, code reviews, or collaboration to discuss modifications made by other team members. It’s even difficult to figure out who did what. Even automated tests to run the codes in repositories are lacking. All of these errors, as well as others, eventually end up in the development environment.

Despite the presence of IaC, the majority of operations are manual and inefficient. This is where the GitOps concept comes in, treating the IaC in the same manner as the application code. Let’s take a look at how GitOps works and, more importantly, why it’s so beneficial.

See More: How To Approach Implementing GitOps in Your Delivery Pipeline

What is GitOps?

GitOps is a technique where infrastructure configuration code (Infrastructure as Code) is stored in a git repository. When a git commit is pushed to source control, it triggers a change that updates the cloud infrastructure, defines Kim SchlesingerOpens a new window , the developer advocate at DigitalOcean. GitOps requires a source control management system like GitHub or BitBucket and a CI/CD system like ArgoCD or Flux. 

Unlike older infrastructure management techniques like defining cloud resources through a web interface or a script, in GitOps, all changes start with an update to a code repository, which means that all alterations can be tracked and audited, Schlesinger adds. It is also possible to have the change run through a continuous integration system to test whether or not the change will break the existing production environment.

                                Source: WeaveworksOpens a new window (GitHub)

Why GitOps?

Steve GeorgeOpens a new window , the chief operations officer at Weaveworks, who pioneered GitOps, enumerated the approach’s benefits. He believes “businesses of any size can benefit from implementing GitOpsOpens a new window , for the simple reason that they will all do better if their cloud applications can be updated faster without compromising the security or stability of their infrastructure.”

Brian LoomisOpens a new window , the director of Architecture for Chef at Progress, states a few other advantages of GitOps. Loomis says that GitOps requires developers to observe specifications within systems that form the base of continuous workflows including, continuous deployment. More benefits include:

    • Companies can create a seamless continuous integration with automation and multiple pipelines and be empowered to make those decisions without relying on IT teams.
    • Moving the QA and infrastructure tasks from what may have been an SRE or operations team, into the engineering and software development teams themselves.
    • With new versions of software being released, developer teams can easily adapt customer feedback in real-time because of the GitOps workflow pattern. 

GitOps upholds the principle that git is the only source of truth, much like with policy as code, leans into the bigger concept of infrastructure as code, and runs into the same challenges. Companies adopt these things to “go fast” but then end up running into existing security/compliance policies which require tickets and reviews, Loomis points out. “Then negating the velocity benefits, this is where policy as code is an enabler for the adoption of things like GitOps and any other developer-driven accelerated process. Version control makes GitOps a powerful workflow pattern because changes are fully traceable and previous versions can be audited compared with archived standards of delivery,” he adds. 

See More: 5 Reasons Your Organization May Migrate to Kubernetes in 2022

GitOps tools

ArgoCDOpens a new window  

Declarative continuous deployment for Kubernetes

AtlantisOpens a new window  

Terraform pull request automation

AutoapplyOpens a new window  

Automatically apply changes from a Git repository to a Kubernetes cluster

CloudBees Feature ManagementOpens a new window   

Feature Flag as-a-Service that leverages GitOps & Config-as-Code (commercial product from CloudBees)
FluxCDOpens a new window   The GitOps Kubernetes operator
Helm OperatorOpens a new window   Automates Helm Chart releases in a GitOps manner
FlaggerOpens a new window   Progressive delivery Kubernetes operator (Canary, A/B testing and Blue/Green deployments automation)
IgniteOpens a new window   A Virtual Machine manager with a container UX and built-in GitOps
FarosOpens a new window   CRD based GitOps controller
GitkubeOpens a new window   Build and deploy docker images to Kubernetes using git push
Jenkins XOpens a new window   A CI/CD platform for Kubernetes that provides pipeline automation, built-in GitOps and preview environments
KubeStackOpens a new window   GitOps framework using Terraform for Cloud Kubernetes distros (AKS, GKE, and EKS) with CI/CD examples for common tools
Weave GitOps CoreOpens a new window   Weave GitOps Core is a free and open source continuous delivery product to run apps in any Kubernetes
Weave CloudOpens a new window   GitOps experience, workflows and dashboard for your cluster(s) (commercial product from Weaveworks)
WerfOpens a new window   GitOps tool with advanced features to build images and deploy them to Kubernetes (integrates with any existing CI system)
PipeCDOpens a new window Continuous Delivery for Declarative Kubernetes, Serverless and Infrastructure Applications

Figure 1: List of GitOps tools. Source: GitHubOpens a new window

Can GitOps be a powerful workflow pattern for running cloud environments?

GitOps is a powerful workflow pattern, particularly for startups and small businesses, admits Schlesinger, because git commit messages provide transparency around how and why the cloud infrastructure was designed the way it was and can describe why updates are needed. Having infrastructure code in one place also allows a team of people to work on the same infrastructure and reduces the probability of only one person knowing the system. 

Source: VMwareOpens a new window  Opens a new window

“In short, GitOps brings the DevOps approach to the cloud-native world. But GitOps is not simply a piece of software you buy. It’s an operational model, based on a set of principles to make operations teams and developer teams much more efficient. All the software is proven in commercial enterprise environments, as are the GitOps processes,” George said.

According to him, the GitOps development approach requires key pieces of software, such as a coding version control system, Kubernetes, and a container orchestration system. “By utilizing software with which technologists are already familiar, there is only a very gentle learning curve. GitOps workflows can be set up and adopted fast – and everyone can use tools they know,” he says.

“GitOps combines these two systems with monitoring software to create a closed reconciliation loop, in which the application running in production must always match its ‘desired state’, which is recorded in the version control system. Any deviation between the two will be detected automatically.”

“GitOps enables developers to work faster because it allows them to deploy their own code without hands-on input from operations teams,” 

Steve George, chief operations officer at Weaveworks

“All the while, there are guardrails in place to prevent developers from making unauthorized changes to the underlying infrastructure. As well as enabling you to get new features to market faster, GitOps frees up operations teams to evolve into SRE and DevOps roles, where they, in turn, can deliver more business value through a cloud infrastructure,” he adds.

See More: Top 10 Must-Have DevOps Tools in 2021

More organizations integrating GitOps for continuous deployment in 2022

As per DORA’s (DevOps Research and Assessment) 2021 State of DevOps studyOpens a new window , high-performing DevOps teams have more frequent deployments, shorter change lead times, a faster MTTR (mean time to recovery), and a very low change failure rate. The surge in popularity of GitOps, according to George, is due to the desire for speedier application deployment cycles. As a result, an increasing number of businesses are expressing interest in using this framework in 2022.

                                                        

Source: PuppetOpens a new window

GitOps is attractive to organizations because it follows the industry best practice of GitFlow in software development and extends that to a very fragmented operations space, where enterprises especially have many conflicting and siloed toolchains, says Loomis. 

Git is expanding and adopting continuous deployment because of the speed to market for web applications driven by the immense efficiencies of containers and serverless technologies such as K8S, CNCF, helm, JenkinsX, and NGINX. Additionally, customers are moving towards the adoption of standardization on a single DevOps toolchain. 

Emphasizing more on GitOps’ faster deployment, Loomis says, “Git does have its advantages for building web applications, managing microservices. If I’m working with a variety of teams and managing different pipelines – some in Jenkins, some in CircleCI, some in Git, it can be difficult because there is a huge cost to switch with low-end customer value. So by adopting GitOps, we gain process flexibility to take pipelines where they exist today and leverage efficiencies in identifying issues earlier in any given effort.”

Is GitOps a sustainable solution?

George shares the queries most of his clients frequently have related to the GitOps framework. The customers usually love the idea of automation but are often apprehensive if it might bring a big change in their manual approvals. They even intend to go faster with GitOps but respect compliance.

“GitOps, by its nature, already provides an auditable and regulatory compliant method to manage deployments. With GitOps we can guarantee replicas of the desired stack and guarantee that legitimate changes are audited in Git,” he says.

Source: VMwareOpens a new window

Many supporters of GitOps believe it’s the future of DevOps. GitOps cloud-native approach to configuration management makes it relevant now more than ever especially with using infrastructure as code. “In 2022, I think the adoption of GitOps within teams will continue to mature and will become a staple in operations for managing cloud-native applications,” Loomis opines.

Even Schlesinger agrees that there are several open-source projects that provide tooling for CI/CD and GitOps, and as the ecosystem grows, we will see more businesses and startups adopt this process of creating and managing their cloud infrastructure.

Does your organization have a GitOps policy in place? Let us know on LinkedInOpens a new window , TwitterOpens a new window , or FacebookOpens a new window . We would love to hear from you!

MORE ON DEVOPS: