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.
- *Docker Desktop on Mac
- *Kubernetes cluster enabled
- *Helm3
- *Argo CLI
- *
brew tap argoproj/tap && brew install argoproj/tap/argocd
- *
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
.
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.
There are two parent applications that represent each "environment":
production
pre-production
make deploy
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.
Access each guestbook here:
- http://localhost:8081 (
production
) - http://localhoust:8082 (
pre-production
)
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!
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 in this POC are:
- RBAC
- TLS
- User/Project management
- Metrics
- Secrets
- CI
- HA/DR