๐งฐ This repo embodies a GitOps approach to deploying application code, middleware infrastructure and supporting CI/CD tools. ๐งฐ
At its simplest, the repo is an ArgoCD Application which references other helm charts and other kustomize definitions to deploy applications.
The idea is to reference other Charts, Kustomize, YAML snippets from within this framework. This keeps things pluggable
to suit the needs of your team.
๐จ We have evolved the design from the original Labs CI / CD project. The Ubiquitous Journey (UJ
) represents a major milestone in moving to a GitOps approach to tooling, application management and configuration drift using ArgoCD.
- Contributor Covenant Code of Conduct
- ๐ฆ Ubiquitous Journey ๐ฅ
- Common Errors when installing ArgoCD
- ArgoCD Master and Child ๐ฉโ๐ฆ
- Restricted Children
- Bootstrap projects and ArgoCD ๐ป
- Example Application Deploy ๐ฎ
- Cleaning up ArgoCD Apps ๐งน
- Metrics ๐
- Deploy to a custom namespace ๐ฆด
- Help me
- Sealed Secrets Help
- What's in the box? ๐จ
- What it's not...๐คท๐ปโโ๏ธ
- Dashboard ๐
The folder structure of this repo is split as follows:
โโโ archive <=== ๐ where the skeletons live. archived material.
โโโ docs <=== ๐ supporting documentation for UJ.
โโโ pet-battle <=== ๐ the example application `pet-battle`
โโโ templates <=== ๐ helm templates to create ArgoCD Applications and Projects for UJ
โโโ ubiquitous-journey <=== ๐ helm values files containing applications we wish to deploy
โโโ Chart.yaml <=== ๐ we deploy UJ using a helm chart
โโโ values.yaml <=== ๐ UJ's helm chart values
There are two main components to this repository:
Ubiquitous Journey
- Contains all the tools, collaboration software and day2ops to be deployed on Red Hat OpenShift. This includes chat applications, task management apps and tools to support CI/CD workflows and testing. For the complete list and details: What's in the box?๐จ- An demo application called
pet-battle
that shows you how to use the UJ structure with a three tiered application stack.
Each part can be used independently of each other but sequentially they create a full stack.
If you already have an ArgoCD instance running and you want just want to add the tooling to it, move to part 2 in the docs.
You will need:
- OpenShift 4.6+ or greater (cluster admin user required) - Try OpenShift
- Install helm v3+ (cli) or greater - Helm Quickstart
Install an instance of ArgoCD. There are several methods to install ArgoCD in OpenShift. Pick your favorite flavour ๐ฆ
Use the Red Hat supported GitOps Operator (configured by default as cluster wide and to deploy the operator and an instance in labs-ci-cd
)
helm repo add redhat-cop https://redhat-cop.github.io/helm-charts
helm upgrade --install argocd \
--create-namespace \
--namespace labs-ci-cd \
redhat-cop/gitops-operator
โท๏ธ We strongly recommend that you make a copy of the values.yaml
file and make edits that way. This values file can be checked in to this repo and be kept if further changes are needed such as adding in private repositoryCredentials
or other handy stuff such as secrets
and namespaces
etc. For example, you have argocd-values.yaml
file with your changes:
helm upgrade --install argocd \
--create-namespace \
--namespace labs-ci-cd \
-f argocd-values.yaml \
redhat-cop/gitops-operator
If you have trouble ๐ตโ๐ซ - we have documented some common errors when installing ArgoCD which may help.
A handy one liner to deploy all the default software artifacts in this project using their default values. Just make sure the namespace you set below is the same as your ArgoCD namespace from the previous step.
helm upgrade --install uj --namespace labs-ci-cd .
If you login to ArgoCD using the UI here:
echo https://$(oc get route argocd-server --template='{{ .spec.host }}' -n labs-ci-cd)
you should see lots of things spinning up
You can set enabled: true
on all of the application definitions in the values-*.yaml
files if you want to deploy everything ๐งจ .... ๐ฅ
Fork the repo and make your changes in the fork if you wish to GitOp enable things. Update the source
in values.yaml to make sure ArgoCD is pulling from the correct source repo (your fork). If you've already forked the repo and want to deploy quickly you can also run:
helm upgrade --install uj \
--set source=https://github.com/<YOUR_FORK>/ubiquitous-journey.git \
--namespace labs-ci-cd .
Uninstall and delete all resources in the various projects
# This may take a while:
helm delete uj --namespace labs-ci-cd
# Then remove your ArgoCD instance
helm delete argocd --namespace labs-ci-cd
Run the following command to debug one of the UJ values files to see which values are being passed:
# example debugging the ArgoCD `Application` manifests from the example deployment
helm install debug --dry-run -f pet-battle/test/values.yaml .