Demonstrate the functionalities of Argo CD.
The following tools must be installed on your computer in order to run this demonstration or do the tutorial
- docker
- minikube
- ansible
- helm
First, let's create a minikube cluster and install Argo CD on it
$ cd ansible
$ ansible-playbook all.yml
Then, make sure you can access Argo CD (replace 9080:9443 with the target ports you want to use):
$ kubectl port-forward svc/argocd-server -n argocd 8443:443
Open your browser and go to the url: localhost:8443
and enter the login/password combination admin/admin
You should see several applications. Two app of apps applications and three applications. Depending on the speed of your computer, it can be that some apps are still syncing. But after several minutes, they should all become green and in have the status synced.
Have a look at the settings.
Just copy the application yaml from environments/dev/templates
to environments/pro/templates
Start by creating an empty minikube cluster. Add ingress to it and make sure that kubectl can see this cluster.
$ minikube start -p argo-cd-tutorial
$ minikube addons enable ingress -p argo-cd-tutorial
$ minikube update-context -p argo-cd-tutorial
Once there is a running cluster, install Argo CD using a helm chart. E.g.:
$ helm install argo-cd argo/argo-cd -n argo-cd --create-namespace
This command probably fails, unless the repository containing the Argo CD helm chart is added to helm. So let's do that and rerun the install:
$ helm repo add argo https://argoproj.github.io/argo-helm
$ helm install argo-cd argo/argo-cd -n argo-cd --create-namespace
You should see some instruction in the terminal that allows you to access the web interface.
But... hey... this is cumbersome. I want to provide my own password and ingress, how do I do that? Start by creating a values.yaml file and add the following section to it:
server:
ingress:
enable: true
https: false
hosts:
- argocd.minikube.local
extraArgs:
- --insecure
As certificates is beyond the scope of this tutorial, the ingress is configured without.
This directory contains four ansible playbooks:
-
all.yml : creates and configures a minikube cluster and installs Argo CD on it. It does all steps done by the create_cluster and deploy-helm-argocd playbooks.
-
create_cluster.yml : creates and configures a minikube cluster.
-
delete_cluster.yml : deletes/removes the created minikube cluster.
-
deploy-helm-argocd.yml : Deploys the helm chart for Argo CD and configures Argo CD for this demonstration. This includes adding projects, adding the links to the repositories and deploying two root applications. One for development and one for production. In order to demonstrate the app of apps functionality.
This directory contains all application manifests that should be deployed in the dev namespace and project. For now, it contains two identical applications, one using helm for deployment and one using kustomize.
This directory contains all application manifests that should be deployed in the pro namespace and project. For now, it contains one applications, that uses helm for deployment.
This directory contains the helm-charts for the applications that can be deployed
This directory contains the kustomize definitions for the applications that can be deployed
This directory contains the definition of the integration testing environments that should be deployed.
- Create a directory on a volume that is executable.
- Add this directory by adding
"data-root": "<your-dir>",
to/etc/docker/daemon.json
- run
sudo systemctl restart docker