Because this is GitOps to make changes to the namespaces etc, they should really be committed to git! For example, if you wanted to create a my-ci-cd namespace for all the tooling to be deployed to, the steps are simple. Fork this repo and make the following changes there:
- Run
set-namespace.sh $ci_cd $dev $test $stagingwhere$ci_cd $dev $test $stagingare the namespaces you would like to bootstrap eg./set-namespace.sh my-ci-cd my-dev my-test my-staging. This will update the following files:
bootstrap/values-bootstrap.yaml: theci_cd_namespaceand argocd namespacenamespace: "my-ci-cd".ubiquitous-journey/values-tooling.yaml: thedestination: &ci_cd_ns my-ci-cdexample-deployment/values-applications.yaml: thedestination: &ci_cd_ns my-devargo-app-of-apps.yaml: thedestination: my-ci-cd
-
Manually update
argo-app-of-apps.yamlto pointsource:toMY FORKinstead ofrht-labs. Update the branch frommasterto yourbranchnameif you are not on master in your fork. -
🌈If there is more than one ArgoCD instance in your cluster, update
instancelabelparameter to a unique value inbootstrap/values-bootstrap.yamlfile. e.g:instancelabel: mycompany.com/myapps -
Git commit this change to your fork and run the following Helm Command:
helm template bootstrap --dependency-update -f bootstrap/values-bootstrap.yaml bootstrap | oc apply -f -FYI if you're feeling lazy, you can override the values on the commandline directly but rememeber - this is GitOps 🐙! So don't do that please 😇
-
Login to ArgoCD as described in Tooling section.
-
Run argo create app replacing
MY_FORKas appropriate
argocd app create ubiquitous-journey \
--dest-namespace my-ci-cd \
--dest-server https://kubernetes.default.svc \
--repo https://github.com/MY_FORK/ubiquitous-journey.git \
--path "ubiquitous-journey" --values "values-tooling.yaml"
argocd app sync ubiquitous-journeyOr if you're using just helm3 cli to instead of argocd cli
helm template -f argo-app-of-apps.yaml ubiquitous-journey/ | oc apply -f -
If you're looking to deploy the extra tooling too, the command is the same as above but pointing to the correct project:
argocd app create uj-extras \
--dest-namespace my-ci-cd \
--dest-server https://kubernetes.default.svc \
--repo https://github.com/MY_FORK/ubiquitous-journey.git \
--path "ubiquitous-journey" --values "values-extratooling.yaml"
argocd app sync uj-extras- Deploy
day2opstasks to monitor and audit the cluster
argocd app create uj-day2ops \
--dest-namespace my-ci-cd \
--dest-server https://kubernetes.default.svc \
--repo https://github.com/MY_FORK/ubiquitous-journey.git \
--path "ubiquitous-journey" --values "values-day2ops.yaml"
argocd app sync uj-day2ops