Five DevOps principles to get 'GitOps ready' in a new golden age for development

By Aled Davies

Git logo on a golden background

Managing cloud infrastructure has never been so easy

Cloud infrastructure is like software: create it, update it and destroy it in a matter of minutes.  Developers can build and deploy applications backed with enterprise grade infrastructure with significantly less manual work than a few years ago. Software development is entering a new golden age. 

But this golden age has given rise to new challenges.

Infrastructure management challenges

  • Ensuring correct governance & control across hundreds of individually provisioned resources
  • Ensuring compliance with national, international, and industrial regulation and laws
  • Managing cloud costs for different services and resources that are priced individually
  • Developing the expertise needed to maximise the impact of a cloud strategy

GitOps will accelerate infrastructure delivery

According to Flexera’s State of the Cloud report last year, 93% of businesses that use cloud do so with multiple cloud providers. The complexity of multi-cloud exacerbates the challenges for fast infrastructure delivery. Overcoming these challenges will be achieved by increasing the adoption of agile software development practices. 

The adoption of DevOps helped to progress agile software development over the last decade. Looking to the next decade, the same will be said of GitOps for infrastructure delivery. 

Are you GitOps ready?

The adoption rate of DevOps is correlated to the adoption rate of GitOps. Though I expect GitOps to be faster. Why? DevOps is a set of principles which can be used to make software delivery more efficient. The focus for introducing DevOps to a business should be based on measuring and improving the delivery of software using values and principles; not on enforcing a strict set of rules to be followed. The transient ubiquitous definition of DevOps means that different people categorise it differently. This has not helped its uptake. 

GitOps is also built on principles and values but – importantly – it is built on the foundation of DevOps. GitLab even refers to DevOps in its definition of GitOps:

on golden background is a quote from Gitlab defining GitOps: “GitOps is an operational framework that takes DevOps best practices used for application development such as version control, collaboration, compliance, and CI/CD, and applies them to infrastructure automation”

The early adopters of GitOps should have already overcome the adoption teething problems of DevOps. GitOps transformation can be achieved by focussing on a few key areas. To begin with, this should involve applying core principles and practices contained within DevOps.  

Five DevOps principles to apply to GitOps

1. Smaller batch sizes means faster release cycles

Deploy infrastructure in the same way as you would approach a software change: keep changes to a minimum size. For example, using Terraform you can break your environments up into small modules and test each module individually before your teams use them. This enables you to create a library of well-tested infrastructure that can be deployed safely at any time.

2. Create constant feedback loops

Have a feedback process in place to quickly decide what is working and what is not. Agree with all stakeholders how best to communicate changes. I am an advocate of Consumer Driven Contracts when designing your infrastructure modules.

3. Encourage End-to-End Responsibility

Organise teams so that they can work closely with each other regardless of the organisation structure. This structure should allow teams to manage their own infrastructure from cradle to grave: enhancing the responsibility and accountability of your team members. The result is usually better quality infrastructure.

4. Automate everything you can

If you have to do something more than once and it is repeatable, automate it! This saves time, accelerates infrastructure delivery and improves the reliability of your deployments. If you can build in automated smoke tests and checks after deployment then this will increase the frequency of feedback loops and help you to troubleshoot faster.

5. Embrace Failure

Infrastructure is fragile. You can encounter errors at the instance level, region level and even at the provider level. It is important not to fear failure. Build redundancy into infrastructure modules: have contingency modules on backup ready to go. GitOps lets you move quickly, so with the right planning in place, errors can be resolved quickly.

Start your GitOps journey today

If you or your team are already invested in DevOps, then GitOps is the natural evolution. Good luck!

As you navigate your GitOps roll out, ground the strategy in your purpose: to improve the speed, visibility or reliability of your infrastructure deployments. Set benchmarks so that you can see how far you have come when you look back in a year from now.