homeoffice tekton pipelines Guide
quarkuscoffeeshop homeoffice Tekton pipelines Guide
Requirements
Run the following command beloww
https://github.com/quarkuscoffeeshop/quarkuscoffeeshop-ansible/blob/master/README.md
$ cat >source.env<<EOF
CLUSERTER_DOMAIN_NAME=clustername.example.com
TOKEN=sha256~XXXXXXXXXXXX
ACM_WORKLOADS=y
AMQ_STREAMS=y
CONFIGURE_POSTGRES=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
HOME Office (Backoffice)
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
- homeoffice-ingress
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/homeoffice-ingress
- homeoffice-backend
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/homeoffice-backend
- quarkuscoffeeshop-homeoffice-ui
# Change to internal quay repo
- default: quay.io/quarkuscoffeeshop/quarkuscoffeeshop-homeoffice-ui
# change to your url
- default: >-
http://quarkuscoffeeshop-homeoffice-ui-quarkuscoffeeshop-homeoffice.apps.shop.example.com/graphql
update the transformer-patches.yaml for each microservice
- homeoffice-ingress
this is for the postgres password you can find this at the bottom off the doc
- homeoffice-backend
this is for the postgres password you can find this at the bottom off the doc
update the quarkuscoffeeshop-homeoffice-ui-route.yaml for quarkuscoffeeshop-homeoffice-ui
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-homeoffice-ui argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/quarkuscoffeeshop-homeoffice-ui/quarkuscoffeeshop-homeoffice-ui-template.yaml > argocd/quarkuscoffeeshop-homeoffice-ui/quarkuscoffeeshop-homeoffice-ui.yaml
oc create -f argocd/quarkuscoffeeshop-homeoffice-ui/quarkuscoffeeshop-homeoffice-ui.yaml -n openshift-gitops
homeoffice-backend argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/homeoffice-backend/homeoffice-backend-template.yaml > argocd/homeoffice-backend/homeoffice-backend.yaml
oc create -f argocd/homeoffice-backend/homeoffice-backend.yaml -n openshift-gitops
homeoffice-ingress argo application
sed "s|%REPO_NAME%|'${REPO_URL}'|g" argocd/homeoffice-ingress/homeoffice-ingress-template.yaml > argocd/homeoffice-ingress/homeoffice-ingress.yaml
oc create -f argocd/homeoffice-ingress/homeoffice-ingress.yaml -n openshift-gitops
To run pipelines go to the quarkuscoffeeshop-cicd project
To start the build-and-push-homeoffice-backend pipeline
To start the build-and-push-homeoffice-ingress pipeline
To start the build-and-push-quarkuscoffeeshop-homeoffice-ui pipeline
Deployment Validation
Validate pipeline completes
verify images have been pushed to quay
Verify deployment is successful
Access to homeoffice ui