Blog

How can GitOps help you improve the process and quality of developments

Blog
We invite you to find out the secrets of GitOps, a trending practice in IT. We’re going to compare it with DevOps and tell you about the first time we implemented it in redbee.

We invite you to find out the secrets of GitOps, a trending practice in IT. We’re going to compare it with DevOps and tell you about the first time we implemented it in redbee.

The digital transformation doesn’t mean just to implement technologies, but also to change the work mindset. DevOps methodologies contribute to that, because they not only guarantee shared responsibility and a fast feedback delivery, but also enhance transparency. However, technology allows us to go even further, and here we find GitOps.

GitOps can be seen as an evolution of DevOps, but in reality, both approaches can be used simultaneously. In this article we’ll explore GitOps against DevOps, and we’ll take you to the backstage of one of the projects where we implemented it.

What We Talk About When We Talk About Gitops?

“The perfect match between Infrastructure as Code (Iac) and the best of DevOps.”

That would be one way of defining it. Others would say it’s a combination of IaC and a set of practices that make it easier to manage applications and infrastructures setting.

The secret of GitOps (not much of a secret since it’s in its name) is that is uses Git as the single source of truth. This open-source system for versions control is used to implement and manage the declarative infrastructure and applications. El modus operandi es a través de pull requests o solicitudes de cambios o de extracción.

Let’s see a bit of GitOps in function.

  1. To apply these practices, first you need an infrastructure that can be managed in a declarative way (for example, Kubernetes). This means it’s capable of following a statement of the status to be achieved rather than following a sequence of commands.
  2. Then, it’s necessary to state in a declarative way the desired status of the system. Any change you wish to make should be made through pull requests in Git, that is, you have to modify the files containing the desired status code, which can be found in the Git repository. You have to use a tool or agent (for example, ArgoCD or Gitlab CI) that takes into account the changes made through pull requests and implements them in the infrastructure using mechanisms like webhooks (for integration with the Git repository).

We can consider GitOps as a method that uses Git pull requests to verify and implement changes in the system infrastructure automatically. But for Martín Cortez, DevOps at redbee, there’s more to it and its efficiency.

“The collaborative approach is key. Code reviews among the team can be made through pull (merge) requests. Another key functionality is versions control. If anything goes wrong, you can go back to a previous state or version with a Git command. Also, you can automate infrastructure through continuous implementation and continuous delivery (CI/CD) pipelines”.

Hay aún más beneficios que hacen a GitOps más que tentador para los desarrolladores. ¿No nos creés? Seguí leyendo.

GitOps Wins the Heart of Developers

A los beneficios principales, los dejamos en manos de nuestro DevOps. “One of the advantages of applying a GitOps approach is that, since it takes Git as the single source of truth, the system status is reflected in the last productive version of the Git repository,” explains Martín. “In addition, thanks to its collaborative model, the responsibility doesn’t fall in just one person. And it can be integrated to CI/CD pipelines.”

We can add other benefits as well. For example, the ease of adoption by using common tools –Git is a standard system for versions control. Besides, it can increase team productivity by allowing to try and test new settings in the infrastructure, and go back if needed.

The concept of “single source of truth” is based on the fact that the system of versions control allows teams to track each change and, if needed, audit them to check security, for example. This in turn results in benefits such as transparency and clarity for organizations implementing GitOps.

On one hand, DevOps can be seen as a change of mindset of the entire organization. GitOps?

On one hand, DevOps can be seen as a change of mindset of the entire organization.“DevOps is a philosophy and work culture that enhances collaboration between Development and Operations teams, combined with a set of practices and tools to provide quality software to the client as quick as possible,” says Martín.

We can put it this way: DevOps focuses on transforming culture, while GitOps provides the tools and the framework to achieve it. “The GitOps approach defines the tools useful for maintaining agility in collaboration, focused on the system’s architecture by automating IaC,” describes Martín.

DevOps and GitOps don’t stand on opposites sides. In fact, they can be used simultaneously. Martín describes how they can work together. “GitOps relies on Infrastructure as a Service suppliers but it isn’t limited to that, since it allows other type of code definitions, such as those of orchestrators like Kubernetes, to be managed inside CI/CD collaborative pipelines.

Where does DevOps fit in? “DevOps teams can maintain order and service quality for clients, building a collaborative and controlled work framework without losing agility,” he adds.

Spicing Projects up With GitOps at redbee

Martín recalled a payment wallet project that redbee worked on some time ago. Back then, Kubernetes and AWS were trending and our client wanted to migrate to the cloud. Being so popular, access to Kubernetes and AWS support and documentation was easy. Even so, we suggested to take a step further and implement IaC as well.

Doing things manually wasn’t an option, although the team knew how to. “It was costly because we had to learn a lot from new,” he remembers. “When that project ended, there was a lot of repeated code, so we started to eliminate parts in order to reduce redundancy.”

At redbee we implement methodologies with added-value for our clients’ projects. It’s not about riding the trend. We strive to go beyond and keep improving, and in our path, we found DevOps and GitOps. Now both are widely used by our teams.
Will you too get on board the transformation?

Contacto

Contactanos

¿Cómo podemos ayudarte?