Free webinar on 5 May: "Improving developer experience with Better DevOps Automation for Jira" (seats are limited!) Sign up now →

What is GitOps and how does it benefit CI/CD?

GitOps basically means doing Ops while using Git as Version Control System for infrastructure configuration files.

The importance of software applications in our personal and business lives puts an ever-growing pressure on DevOps teams operating those applications. One of the most typical problems is updating the underlying infrastructure.

For example, growing usage often calls for additional computing capacity. Experienced admins quickly handle this by manually adding new nodes to the cluster which hosts the distributed application.

Although it immediately mitigates user experience issues, things can go terribly wrong if the infrastructure changes are not applied 100% precisely. Eliminating the human factor is key for standardized and repeatable infrastructure updates.

Infrastructure as Code vs GitOps

If you can build a software version based on a state in a Version Control System, why couldn't you do that for your infrastructure?

Infrastructure as Code (IaC) is a practice for maintaining all the resources that is needed to provision a desired system state. It includes infrastructure, configuration files, security policy and more all declared as code and versioned.

In its vanilla form, IaC is Version Control System agnostic. It only cares about your system being described declaratively as code. It doesn't care if your configuration files are stored in Mercurial, SVN or Git.

In IaC, a single commit or pull request that updates the configuration files which describe the infrastructure is the way to trigger changes on it. The changes can applied manually, of course, by running the corresponding tools like Terraform, Ansible or Chef, but it is full automation what makes it really powerful. (We will go into details in the next section.)

The GitOps practice means that the VCS is Git in the above scenario.

GitOps vs DevOps

GitOps and DevOps are part of the same methodology and can live next to each other.

As we saw, GitOps is a way to manage system infrastructure as code with Git, while DevOps is a set of practices and mindset that can be used when doing GitOps. With GitOps, you encourage collaboration on infrastructure, shared knowledge and understanding.

A key DevOps practice is using automation wherever possible. GitOps can also benefit from that.

With automation, infrastructure changes accepted to the repository can trigger a Continuous Integration and Continuous Delivery (CI/CD) build or just a script which actually deploys the changes automatically system-wide.

Those higher-level workflows that are more closely integrated with the development tasks and the developer team members can be implemented with the Better DevOps Automation for Jira app. In addition to the typical low-level infrastructure-related workflow steps, you can automate Jira issue operations (e.g. transitioning the linked development task to the "Deployed" status), notifications (sending out email or Slack notifications with the linked issues to the team after a successful change) and more with this app.

Alternatives to GitOps

GitOps predicates that you use Git as the Version Control System for managing software infrastructure configurations.

Infrastructure as Code, however, doesn't dictate what VCS do you put behind your strategy. There is nothing stopping you to do SvnOps, MercurialOps or practically AnyVcsOps.

For example, if you happen to use Jira, you can use the Better Commit Policy and Better DevOps Automation for Jira apps linked to your SVN repository. Better Commit Policy ensures the commits pushed to the repository are compliant with your company or project rules. Once there is an accepted change to configuration files, Better DevOps Automation kick-starts a Jira automation rule to run a CI build, run some tests or automatically deploy the changes to the production system.

Benefits of GitOps

In conclusion, you are benefiting from a GitOps strategy in multiple ways:

1. Reduce errors

Systems configurations are defined as code in a declarative way. It makes them repeatable and easy to catch errors before they hit production environments.

2. Collaboration on infrastructure configurations

It gives access to a wider set of people to system configurations, while installing checkpoints such as Pull Requests and commit verification for security.

3. Faster time to market and incident response

Reestablishing system settings are faster done via code then manually. New system variables are deployed faster, changes made faster or if something goes wrong, a previous state of the system components can be restored quicker.

If you want to learn more on how to do GitOps or AnyVCSOPs with Jira, follow the link below!

Automate your GitOps workflow!

 

Be the first to hear about the Midori news, Jira, Confluence, Bitbucket guides, and productivity tips that accelerate your team.

Subscribe now