Infrastructure as Code is an important concept of DevOps. With GitOps tools like Argo CD, not only infrastructure can be handled as code, but also custom applications and other Kubernetes resources.
Here is the definition of GitOps from Red Hat.
GitOps uses Git repositories as a single source of truth to deliver infrastructure as code. Submitted code checks the CI process, while the CD process checks and applies requirements for things like security, infrastructure as code, or 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.
Software development is much more than writing source code. Modern software development also requires automation and CI/CD. One way to implement CI/CD is to use pipelines that build images and other resources and deploy them via scripts whenever the pipelines run. While pipelines are still required to build the artefacts, the actual deployment of resources is done more and more via declarative and event based GitOps mechanisms.
GitOps uses Git repos to define the desired state of a system. GitOps tools like Argo CD compare the current state with the desired state. If these states don’t match, synchronisation is triggered automatically to apply, update or delete resources.
Here are some videos I’ve used to learn GitOps:
- What is GitOps, How GitOps works and Why it’s so useful
[ArgoCD Tutorial for Beginners GitOps CD for Kubernetes](https://youtu.be/MeU5_k9ssrs)
- What Is GitOps And Why Do We Want It?
- GitOps Without Pipelines With ArgoCD Image Updater
- Argo CD – Applying GitOps Principles To Manage A Production Environment In Kubernetes
Over the next days I’d like to blog more about GitOps and Terraform and how my team has used these tools to set up Red Hat OpenShift in the IBM Cloud including Watson NLP and a custom application.