1 of 18

GitOps: yea or nay?

May 4, 2021

DevOpsDays Seattle 2021�Ricardo Castro

2 of 18

Agenda

  • What is GitOps
  • What can GitOps do for me
  • GitOps CD Software Agents
  • Demo
  • Extras

2

@mccricardo

https://mccricardo.com

3 of 18

Story time

Scenario: some random day. The sun is shining. Life is good.

Ricardo: I'm going to make a tricky change. There's the possibility of a system wipeout.

Joe: Are you sure? Let me take a look!

<Looks attentively>

Joe: Looks ok. Good to go!

<Click Enter>

Ricardo: So… Here’s the thing… Remember that Kubernetes cluster? It’s gone...

<CHAOS>

3

@mccricardo

https://mccricardo.com

4 of 18

4

@mccricardo

https://mccricardo.com

5 of 18

Story time, Part II

Ricardo: Thankfully we have everything in Terraform. Let’s relaunch the cluster.

Joe: Cool, it’s up! Let’ figure out what needs to be launched.

<Figuring out happens>

Joe: <Smirk> Fortunately we have a pipeline for everything.

<Activate Pipelines>

Ricardo: Pipeline Alpha-X was deactivated? Any idea why? Shall we ask team Alpha?

Ricardo: Also Pipeline Beta-Y was successful but the application does not work. Any idea why?

Joe: <Thinking> I think team Beta had some manual changes there...

<Headache continues>

5

@mccricardo

https://mccricardo.com

6 of 18

What is GitOps

Principles

  1. The entire system described declarative
  2. The canonical desired system state is versioned in Git
  3. Approved changes that can be automatically applied to the system
  4. Software agents to ensure correctness and alert on divergence

6

@mccricardo

https://mccricardo.com

7 of 18

What GitOps can do for me

  1. Increased Productivity
  2. Enhanced Developer Experience
  3. Improved Stability
  4. Higher Reliability
  5. Consistency and Standardization
  6. Stronger Security Guarantees
  7. Easier Compliance and Auditing

7

@mccricardo

https://mccricardo.com

8 of 18

GitOps CD Software Agents

Image source: https://fluxcd.io/

8

@mccricardo

https://mccricardo.com

9 of 18

GitOps CD Software Agents

Flux CD

“Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating updates to configuration when there is new code to deploy.”

Image source: https://toolkit.fluxcd.io/

9

@mccricardo

https://mccricardo.com

10 of 18

GitOps CD Software Agents

Argo CD

“Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.”

Image source: https://argoproj.github.io/argo-cd/

10

@mccricardo

https://mccricardo.com

11 of 18

GitOps CD Software Agents

Jenkins X

“Jenkins X provides pipeline automation, built-in GitOps, and preview environments to help teams collaborate and accelerate their software delivery at any scale.”

Image source: https://jenkins-x.io/about/

11

@mccricardo

https://mccricardo.com

12 of 18

GitOps CD Software Agents

Image source: https://www.weave.works/blog/gitops-high-velocity-cicd-for-kubernetes

12

@mccricardo

https://mccricardo.com

13 of 18

Demo

Flux CD

DefinedCrowd® confidential

@mccricardo

https://mccricardo.com

14 of 18

Extras

What about secrets?

14

@mccricardo

https://mccricardo.com

15 of 18

Extras

GitOps vs IaC

“One of the main differences between IaC and GitOps is the use of immutable containers as deployable artefacts that can be converged on by a suitable orchestration tool, for example Kubernetes. Your desired state is kept in source control. This isn’t always the case with some of the infrastructure as code tools. IaC implementations vary, and sometimes the source of truth is split between a git repo, and a database, and sometimes spread between a weakly-linked union of multiple git repos.”

“While Infrastructure as Code tools provide a way to manage infrastructure, they don’t manage the entire Cloud Native stack. GitOps on the other hand, allows you to manage the whole platform.”

15

@mccricardo

https://mccricardo.com

16 of 18

Extras

Push vs Pull

Push

Pull

16

@mccricardo

https://mccricardo.com

17 of 18

Thank you

About me

  • Senior Site Reliability Engineer at DefinedCrowd (We’re hiring)
  • DevOps Porto meetup co-organizer
  • DevOpsDays Portugal conference co-organizer
  • Strong believer in culture and teamwork
  • Open source passionate (former Mozilla contributor)
  • Taekwondo amateur
  • Metal lover
  • Where to find me:

17

@mccricardo

https://mccricardo.com

18 of 18

Links

@mccricardo

https://mccricardo.com