GitOps is a paradigm or a set of practices that empowers developers to perform tasks which typically (only) fall under the purview of operations. It’s a way to do Kubernetes cluster management and application delivery by using Git as a single source of truth for declarative infrastructure and applications. Being Git at the center of delivery pipelines, engineers use familiar tools to make pull requests to accelerate and simplify both application deployments and operations tasks to Kubernetes. GitOps software agents (e.g. ArgoCD, Flux and Jenkins X) can alert on any divergence between Git with what’s running in a cluster, and if there’s a difference, Kubernetes reconcilers automatically update or rollback the cluster depending on the case. This talk will include a demo of ArgoCD/Flux/Jenkins X on how to configure and use it to accelerate and simplify application deployments.
3. https://mccricardo.com @mccricardo
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>
5. https://mccricardo.com @mccricardo
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>
6. https://mccricardo.com @mccricardo
What is GitOps?
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
7. https://mccricardo.com @mccricardo
What can GitOps 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
9. https://mccricardo.com @mccricardo
GitOps CD software agents
“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/
10. https://mccricardo.com @mccricardo
GitOps CD software agents
“Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.”
Image source: https://argoproj.github.io/argo-cd/
11. https://mccricardo.com @mccricardo
GitOps CD software agents
“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/
15. https://mccricardo.com @mccricardo
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.”
17. https://mccricardo.com @mccricardo
Thank you
▪ Senior Site Reliability Engineer at Farfetch (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:
- Website: https://mccricardo.com
- Twitter: @mccricardo
- Linkedin: Ricardo Castro
18. https://mccricardo.com @mccricardo
Links
● What is GitOps
● GitOps - Operations by Pull Request
● The GitOps Pipeline - Part 2
● GitOps Part 3 - Observability
● GitOps Part 4 - Application Delivery Compliance and Secure CICD
● GitOps: High velocity CICD for Kubernetes
● Managing Helm releases the GitOps way
● Guide to GitOps
● Is GitOps the next big thing in DevOps?
● GitOps
● What is GitOps?
● Argo CD
● Flux CD
● Jenkins X
● Introducing Argo Flux - A Weaveworks-Intuit-AWS Collaboration
● GitOps: ‘Git Push’ All the Things
● THE BEST CI/CD TOOL FOR KUBERNETES DOESN’T EXIST