I heard the "GitOps" word first time while learning the terraform. A bunch of new words that have "Ops" suffix have appeared nowadays such as DevOps, NetDevOps, and DevSecOps. I decided to research that word and our hero today is GitOps :)

Initially I want to define what is GitOps?
GitOps is an operational framework. I want to draw your attention to the framework word. If you're a programmer, you might be confused. Please don't compare with the web frameworks. You should think it's like a manifest or a process. It defines the policies, standards, quality metrics and governance.

Git and Ops Combination

It is composed the Git and Ops words. Actually the words itself describes a lot of things when you look at first. Let's inspect them individually.

Git is a version control system. It provides developers the collaboration, integration and central management point for their applications and teams. Beside of that features todays providers such as GitHub and GitLab provides the CI/CD tooling services.

Ops stands for Operations and it consists the set of processes and services that are administrated by an IT department. Ops teams setup the infrastructure that application needs. The IT department has different teams. The teams define different policies and standards than each others due to communication problems and special tasks. They create the servers, installs the operating systems and the services on that servers manually.

If we led to the conclusion, we could say that the developers has an automated development lifecycle thanks to VCS and its processes.
But the ops teams still have a manual process and specialized teams for different tasks. Infrastructure is more complex and larger than ever. Because the need of the modern infrastructure has been changed.

Modern Infrastructure and GitOps

The demands of modern infrastructure is elasticity, easy maintenance and enhanced monitoring. Modern infrastructure needs to have automated provisioning. As DevOps engineers we work on prepare the declarative files of infrastructure. There is a missing point though. The provisioning the infrastructure is still a manual process and needs to have development lifecycle standards and policies. GitOps framework defines that how you could achieve that standards.

GitOps Framework

Speed and scalability are the most important properties of modern applications.

The application can be deployed thousands of time per day, if you are adopted the DevOps culture in your company. DevOps practices allow your company to be ensure the application is passed the standards, policies.
The standards are code review, automated testing, no human interaction in deployment process. The policies are composed code coverage tests and accepted pull requests. It's the DevOps practices.

  • GitOps is used to automate the process of provisioning infrastructure.
  • The developer teams store their source code in version control system (vcs). If you want to adopt the gitops in your company, the ops team should store their configuration files, declarative definitions (infra as code) in vcs.
  • GitOps allow your ops team to be ensure you will have the infrastructure as defined state at the end of the pipeline. The dev team already compiles and gets the binary file at the end of the pipeline. The output of the pipeline is named as artifact.
  • GitOps offers the versioning. The dev team tags their commits then have the versioned artifacts. Thanks to git, your ops team also will have versioned infrastructure.
  • If you have versioning that means also you have rollback scenario. When you revert the commit in vcs, the pipeline triggers and deploy the previous version to environment.
  • GitOps allows greater collaboration. The dev or ops team create the pull requests to deploy their changes to production environment. The team leaders review the code and configurations. If team leader was missed the errors, the pipeline test could reveal them.
  • GitOps = Infra-as-Code + Pull Requests + CI/CD

We examined what is GitOps and advantages of it.  it requires an adoption process like DevOps. Because the team members are going to attempt to edit something in production environments manually. Don't be surprised :) GitOps will work better when you have less "cowboy engineering".
That's it another reason to have fast pipelines. Prevent the cowboy engineering. When you have fast pipelines, the team members would choose to alter the infrastructure or application in proper way. The proper way is GitOps :)

~ Read next post in DevOps ~

How to Build Multi-Arch Container Images

Posted by Abdullah Caliskan

1 min read