GitOps

This article aims to give a concise vision of what GitOps practice is and how it could be applied in a practical case.

Recently, I was able to use the GitOps practice, in order to implement ArgoCD in a project :https://ammons-organization-1.gitbook.io/vmmon-th0-archives/42-projects/iot-inception-of-things#part-3arrow-up-right it is a declarative continuous delivery tool for Kubernetes.

Before tackling the technical part.

What is GitOps ?

I like the RedHat definition on this topic :

"GitOps uses Git repositories as a single source of truth to deliver infrastructure as code. Submitted code checks the CI process, while the CD processarrow-up-right checks and applies requirements for things like security, infrastructure as code, arrow-up-rightor any other boundaries set for the application framework. All changes to code are tracked, making updates easy while also providing version control should a rollback be needed." https://www.redhat.com/en/topics/devops/what-is-gitopsarrow-up-right

So their philosophy is that the Git repositories is the only source of truth. The fundamental principle of GitOps is that everything needed to build, deploy, and manage an application or infrastructure should be stored in a Git repository. This includes :

  • Configuration files (YAML, JSON, etc.).

  • Automation scripts.

  • Infrastructure definitions (Infrastructure as Code - IaC).

How can it be applied technically ?

Deployment automation

Changes made to the Git repository automatically trigger deployment processes. This is usually done via CI/CD (Continuous Integration/Continuous Deployment) tools such as Jenkins, GitLab CI, CircleCI, or specialized tools like ArgoCD and Flux. You can see a detailed explanation of a practical case with the link I provided at the beginning of the page.

GitOps Tools

GitOps tools continually monitor the Git repository and production environment to ensure they are in sync. Two of the most popular tools are ArgoCD, Flux CD, Jenkins X etc.

Conclusion

The GitOps practice revolutionizes infrastructure management in a way by offering a combination of already existing practices such as Git workflows, CD Pipelines, IaC and other concepts used to optimize management.

Last updated