4 GitOps Best Practices for DevOps Teams

GitOps can help DevOps teams automate development and deployment workflows. Here are GitOps best practices to help ensure success.

Sean Michael Kerner, Contributor

March 31, 2022

3 Min Read
Programmers working on a computer
Getty Images

GitOps is an emerging practice that has the potential to not only optimize DevOps workflows but also help enable more automation.

The basic idea behind GitOps is that configuration for operations is defined and stored in a code repository, often but not necessarily Git-based, such as GitHub or GitLab. The promise of GitOps is more streamlined operations, as part of a movement to define IT operations as code.

Succeeding with GitOps isn't as easy as pressing a button, or buying a single piece of software. It's often a process involving both technology and cultural changes within an organization. There are, however, GitOps best practices to help you succeed.

"The challenge for developers is which parts of the software stack to automate and how to start using GitOps easily," Steve George, COO of Weaveworks, told ITPro Today.

Here are four GitOps best practices for managing and effectively benefiting from the framework:

1. Start small. DevOps teams should start with either a greenfield application or something that can be easily broken into manageable components, according to Dan Garfield, co-founder and chief open source officer at Codefresh.

"Stick with the crawl, walk, run approach to modernizing these deployment processes and make a plan that involves all the key stakeholders while setting clear expectations," Garfield told ITPro Today.

Related:What the GitOps Model Is and Why It's Taking Off

2. Have a single source of truth. An "obvious" GitOps best practice is having a single source of truth for configuration, Garfield said.

"Following this best practice inherently provides unrivaled traceability for your applications as everything is backed by declarative configuration," he said. "Enforce this rule with your teams and make sure there is consistency on all new applications."

GitOps in a nutshell

GitOps

3. Utilize GitOps tools for active measures. Simply reading configuration isn't quite enough to enable DevOps success. Garfield suggests that DevOps teams use GitOps tools that can take active measures with configuration drift monitoring, continuous reconciliation, and visibility into deployments.

4. Define metrics. For application operations teams, defining the key metrics that you want to improve is critical, according to Weaveworks' George. One set of metrics that can work are DORA metrics.

"If you're looking for agility and speeding up the deployment pipeline, then focusing on the frequency of deployments is a great place to start," he said. "It's simple to measure with GitOps as every deployment to production will have a Git commit, and there's simple automation for this."

Related:A Guide to GitOps in the Age of ‘Everything Ops’ update from May 2020

If the focus is on recovery time, then measuring mean time to recovery (MTTR) is a valuable metric.

"With GitOps, there's a complete definition of the application stack, so it's simple to deploy an application from a known good state, and then the time to bring that system can be measured," George said.

 

About the Author

Sean Michael Kerner

Contributor

Sean Michael Kerner is an IT consultant, technology enthusiast and tinkerer. He consults to industry and media organizations on technology issues.

https://www.linkedin.com/in/seanmkerner/

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like