Argo deploy yourself

See the movie?

What is GitOps?

  • Describe your desired software system as files stored in git

  • An agent ensures the live system is the same as the state in Git

History of GitOps

Typical CI pipeline
typical CI pipeline

What do you need for GitOps?

  1. Git repository

  2. Agent

  3. Kubernetes cluster

Other useful stuff

  • Manifest generation tool

  • CI system

  • Web UI

Benefits of GitOps

  • Single source of truth

  • Security, compliance and auditing

  • Developer centric

  • Trivializes rollback

  • Declaritive

  • Observable - detect configuration drift

  • Velocity

How does GitOps actually work?

CI/CD

CICD

Git commits are signals

  • Build triggered by commit to Code repo

  • Deployment triggered by commit to Config repo

  • Separate repos? (In the beginning maybe)

Code + chart in same repo?

OneRepoListing
  • This is how we started

Commit history

OneRepoCommits

Commit changes

OneRepoCommitChanges

[skip ci]

OneRepoCommits

Review pipeline again

CICD

Application fragment

$ kubectl get application ops-demo1 -oyaml | yq r - spec.source
helm:
  values: |
    ingress:
      hostname: ops-demo1.us.teamworkops.com
    opsdemo1:
      replicaCount: 3
    config:
      HELLO: "world"
      HOLA: "mundo"
path: chart
repoURL: git@github.com:Teamwork/ops-demo1.git

Best practices

  1. Two repos: One for code the other for deployment

  2. Chose the right number of deployment repos

  3. Test your manifests before you commit

  4. Git manifests should not change to to external influences

  5. Plan how you’ll manage secrets

Thought this talk was about Argo CD?

argocd ui

Tour of the UI

  1. SSO enabled

  2. Multi-tenanted

  3. Visual map of application components

  4. Status

  5. Inspect Yaml and logs

  6. Delete objects

  7. Change app settings

Demo: Build and deploy

  • Commit a change and watch it get built and deployed

Credits

EverythingYouNeedToBecomeaGitOpsNinja
i love questions