paint-brush
GitOps. GitOps? What is GitOps?by@asadfaizi
228 reads

GitOps. GitOps? What is GitOps?

by Asad FaiziJanuary 2nd, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

GitOps is a set of practices that enable continuous deployment and configuration management for applications using Git as the version controlling mechanism. In GitOps, Git is used as the single source of truth for declarative application and infrastructure configurations. This approach allows users to centrally manage these configurations while gaining a better understanding of the system with a trackable and auditable change history. GitOps enables integrating infrastructure to the same delivery pipelines and makes infrastructure and application configuration management a core part of the software delivery process.

Company Mentioned

Mention Thumbnail
featured image - GitOps. GitOps? What is GitOps?
Asad Faizi HackerNoon profile picture


GitOps has changed the way we look at cloud-native software development and deployment. Yet what exactly is this novel concept about? Here we will try to answer all your pressing questions about GitOps and find out how it can help you in the software delivery process.

What is GitOps?

GitOps is a set of practices that enable continuous deployment and infrastructure configuration management for applications using Git as the version controlling mechanism. In GitOps, Git is used as the single source of truth for declarative application and infrastructure configurations.

In GitOps, all the configurations are stored in a version-controlled Git repository, and push or pull-based triggers are used to automate infrastructure provisioning and configurations. This approach allows users to centrally manage these configurations while gaining a better understanding of the system with a trackable and auditable change history. Moreover, GitOps enables integrating infrastructure to the same delivery pipelines and makes infrastructure and application configuration management a core part of the software delivery process.

Who created GitOps?

GitOps was coined in 2017 and introduced to the world by Alexis Richardson, the co-founder, and CEO of Weaveworks. Apart from GitOps, Richardson is also a co-founder of the open-source message broker RabbitMQ and has been a Technical Oversight Committee (TOC) chair at Cloud Native Computing Foundation (CNCF).

How is GitOps Different from DevOps?

DevOps and GitOps both aim to streamline modern software delivery processes. However, DevOps is more focused on bringing a fundamental cultural change at an organizational level. It also enables greater collaboration to build faster and more agile software development lifecycles.

GitOps is focused on providing the necessary tools and practices to bring DevOps to infrastructure management. These tools and practices include collaborative development and deployment, CI/CD pipelines, and automation, integrating infrastructure as part of the SDLC.

This way, GitOps can complement and extend DevOps to create more robust development environments that encompass both application and infrastructure.

Is GitOps just for Kubernetes?

GitOps started its life to facilitate Kubernetes cluster management, and application delivery as so many GitOps pipelines are targeted towards Kubernetes. However, GitOps is not limited to Kubernetes, and it can be adapted to fulfill any infrastructure management need that can be configured declaratively and has IaC support.

What are the Three Core Practices of GitOps?

Following are the three core practices that allow GitOps to function properly.


Complete Declarative Infrastructure
All the infrastructure configurations are configured as declarative and can be treated as code. This leads to configurations that describe the desired state of the infrastructure other than the exact steps to provide the required infrastructure. This declarative nature allows automated provisioning tools to create infrastructure in an optimal way. Furthermore, it provides more flexibility for provisioning and managing infrastructure and facilitating quick rollbacks with minimal disruptions.


System State is versioned in Git
Configurations are stored in Git, with each change tracked with versioning and acting as a single source of truth. Thus, users have an auditable history of all the infrastructure changes, which guarantees straightforward infrastructure rollbacks.


Automated Infrastructure Updates and Continuous Monitoring
The desired infrastructure state is automatically applied to the infrastructure without the need for any manual interventions. Additionally, continuous monitoring ensures that infrastructure is always following the configurations in the Git repository. Any drift in configurations is quickly notified and ratified to ensure the desired state of infrastructure.

How do I start GitOps?

GitOps does not require a radical change in the development process or the application code. The only requirement is that the underlying infrastructure should be able to be managed via a declarative infrastructure as code tools and a Git repository.


The first step in adapting GitsOps is identifying the exact infrastructure requirements for your environment. Then, depending on the use case, users can either import their existing infrastructure to IaC tools or start from the ground up with new configurations. Both these options have their own merits and pitfalls. Importing may be the only option for an existing software project, while it’s better to start with new configurations for new projects. Either way, you can add these confirmations to the Git repo and start managing infrastructure via Git.

Is GitOps the Next Big Thing in DevOps?

The short answer is yes. However, it is highly dependent on the exact needs of the development. GitOps enables users to manage infrastructure as a core part of the development process and provides features such as trackable change management, simplified infrastructure rollbacks, and automated provisioning. However, it also has some downsides like the additional management overhead added to the development process and incompatibility with infrastructure that does not support declarative IaC.


Team composition also plays an integral part in GitOps adoption. The more mature a team, the easier it becomes to learn and adapt to Infrastructure as Code tools and create declarative infrastructure configurations. At first, small or less experienced teams may find it difficult to completely embrace these IaC tools and integrate infrastructure into their delivery pipelines. Additionally, the declarative nature may lead to unintended infrastructure configurations if the declarative code is not written properly compared to more procedural configurations.

All in all, GitOps has the potential to change our perspective on software development and power the next evolution of DevOps.

Conclusion

GitOps aims to incorporate infrastructure configurations into the software development process to enable rapid development cycles while providing the same flexibility of the application development to the infrastructure. It relies on a single source of truth and declarative infrastructure to facilitate all these things.


In addition, GitOps is well suited for cloud-native development and is the perfect tool to use with Kubernetes from deployments to cluster management. However, the management overhead that GitOps can bring to a development pipeline is unavoidable and proper configurations are crucial for automated infrastructure changes. Having said that, the advantages of GitOps far outweigh these minor inconveniences.