Skip to content

๐Ÿงฐ Open Innovation Labs Developer Experience - all the tooling for starting a residency

License

Notifications You must be signed in to change notification settings

rht-labs/ubiquitous-journey

Repository files navigation

๐Ÿฆ„ Ubiquitous Journey ๐Ÿ”ฅ

๐Ÿงฐ 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.

Table of Contents

Components

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:

  1. 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?๐Ÿ‘จ
  2. 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.

How do I run it? ๐Ÿƒโ€โ™€๏ธ

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.

Prerequisites

You will need:

Let's go, installing ArgoCD ๐Ÿƒ๐Ÿป

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.

๐Ÿค  Deploying the Ubiquitous Journey

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

argocd-ui

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 .

Cleanup ๐Ÿงค

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

Debugging ๐Ÿคบ

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 .