quarkuscoffeeshop Tekton pipelines Guide
quarkuscoffeeshop Tekton pipelines Guide
Once Postgres Operator Database is installed run the following below
$ cat >source.env<<EOF
CLUSERTER_DOMAIN_NAME=clustername.example.com
TOKEN=sha256~XXXXXXXXXXXX
ACM_WORKLOADS=y
AMQ_STREAMS=y
CONFIGURE_POSTGRES=y
MONGODB_OPERATOR=n
MONGODB=n
HELM_DEPLOYMENT=n
DELETE_DEPLOYMENT=false
EOF
$ podman run -it --env-file=./source.env quay.io/quarkuscoffeeshop/quarkuscoffeeshop-ansible:v4.10.24
Install tkn cli
on linux
# Get the tar.xz
curl -LO https://github.com/tektoncd/cli/releases/download/v0.20.0/tkn_0.20.0_Linux_x86_64.tar.gz
# Extract tkn to your PATH (e.g. /usr/local/bin)
sudo tar xvzf tkn_0.20.0_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn
on mac
brew install tektoncd-cli
Store front microservices
This will build the development environment for the quarkuscoffeeshop store.
The gogs route is found under the quarkuscoffeeshop-cicd project
Use the the following to login
- username:
user1
- password:
openshift
Navigate to the tekton-pipelines
repo
The quay registry is found under the quay-enterprise
project
Create an admin user for the deployment
- username:
admin
- email address:
admin@example.com
- password:
admin123
Create Quarkuscoffeeshop organization for images
- Organization Name:
quarkuscoffeeshop
update the deploy-pipeline.yaml for the following services in gogs
quarkuscoffeeshop-barista tekton pipeline
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-barista
quarkuscoffeeshop-counter tekton pipeline
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-counter
quarkuscoffeeshop-kitchen tekton pipeline
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-kitchen
quarkuscoffeeshop-web tekton pipeline
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-web
update the transformer-patches.yaml for each microservice
- quarkuscoffeeshop-counter
- quarkuscoffeeshop-web
CHANGEME=quarkuscoffeeshop-web-quarkuscoffeeshop-demo.apps.ocp4.example.com
To access Argocd
The password for argocd is found under the following secret
Login to argocd
Terminal clone your git repo
git clone http://gogs-quarkuscoffeeshop-cicd.apps.ocp4.example.com/user1/tekton-pipelines.git
login to OpenShift cluster
oc login --token=sha256~yoursha --server=https://api.ocp4.example.com:6443
cd into tekton pipelines folder
cd tekton-pipelines
update repo url
REPO_URL='http://gogs-quarkuscoffeeshop-cicd.apps.ocp4.example.com/user1/tekton-pipelines.git'
load the argocd application templates for each microservice
quarkuscoffeeshop-barista argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/quarkuscoffeeshop-barista/quarkuscoffeeshop-barista-template.yaml > argocd/quarkuscoffeeshop-barista/quarkuscoffeeshop-barista.yaml
oc create -f argocd/quarkuscoffeeshop-barista/quarkuscoffeeshop-barista.yaml -n openshift-gitops
quarkuscoffeeshop-counter argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/quarkuscoffeeshop-counter/quarkuscoffeeshop-counter-template.yaml > argocd/quarkuscoffeeshop-counter/quarkuscoffeeshop-counter.yaml
oc create -f argocd/quarkuscoffeeshop-counter/quarkuscoffeeshop-counter.yaml -n openshift-gitops
quarkuscoffeeshop-kitchen argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/quarkuscoffeeshop-kitchen/quarkuscoffeeshop-kitchen-template.yaml > argocd/quarkuscoffeeshop-kitchen/quarkuscoffeeshop-kitchen.yaml
oc create -f argocd/quarkuscoffeeshop-kitchen/quarkuscoffeeshop-kitchen.yaml -n openshift-gitops
quarkuscoffeeshop-web argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/quarkuscoffeeshop-web/quarkuscoffeeshop-web-template.yaml > argocd/quarkuscoffeeshop-web/quarkuscoffeeshop-web.yaml
oc create -f argocd/quarkuscoffeeshop-web/quarkuscoffeeshop-web.yaml -n openshift-gitops
To run pipelines go to the quarkuscoffeeshop-cicd project
To start the build-and-push-quarkuscoffeeshop-barista pipeline
To start the build-and-push-quarkuscoffeeshop-counter pipeline
To start the build-and-push-quarkuscoffeeshop-kitchen pipeline
To start the build-and-push-quarkuscoffeeshop-web pipeline
Deployment Validation
WIP