mav3rick177 / argocd-demo

Demo of Argo CD running on Docker for Mac Kubernetes cluster

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

argocd-demo

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

This project is a POC to show the full pipeline of a deployment with multiple "environments" from within a Docker for Mac Kubernetes cluster, requiring no external resources.

If you would like to try out the full GitOps feature set of Argo CD, be sure to fork this repo first so you can push your own commits to trigger changes.

Fork this repo here: https://github.com/caitlin615/argocd-demo/fork.

You'll then have to update spec.source.repoURL in apps/values.yaml to match your forked repo URL for any of this to work.

Requirements

Setup

Install Argo CD

Install Argo CD

make init

This will expose Argo CD at http://localhost:8080 and output the default password for the admin user. Change the password in the UI, or with argocd login localhost:8080, then argocd account update-password.

Deploy "Parent" Applications

For the purposes of this demo, we will be using the app of apps pattern. This means we create an app that will create all of our apps.

img

There are two parent applications that represent each "environment":

  • production
  • pre-production

Deploying

make deploy

Force a sync

Now that you've deployed both apps, along with their child apps, they will not automatically sync. Force a sync to get the kubernetes resources deployed.

make sync

You will now see something like this at http://localhost:8080. The top two are the guestbook applications, and the bottom two are the parent applications.

img

Access Guestbook

Access each guestbook here:

Playing with GitOps

Now's when the real fun happens!

Make some changes to the guestbook helm chart in charts/guestbook, commit them, and push them to master (make sure you've forked this repo!). Within three minutes (or after running make sync), your changes will deploy!

Try changing image.tag to v2 in charts/guestbook/values-production.yml! Update replicaCount and watch the magic happen!

Github Webhooks

Check out Git Webhook for details on how to configure webhooks. See configure-gh-webhook.sh for an example of how to get this working with ngrok.

Not included

Not included in this POC are:

  • RBAC
  • TLS
  • User/Project management
  • Metrics
  • Secrets
  • CI
  • HA/DR

About

Demo of Argo CD running on Docker for Mac Kubernetes cluster


Languages

Language:Shell 44.2%Language:Makefile 34.9%Language:Mustache 21.0%