Steps to install GitOps in OpenShift with SpringBoot Petclinic application.
- OpenShift 4.7
oc
logged in as cluster-admin
- Install OpenShift GitOps from the OperatorHub
- Verify
watch -n 5 oc get pods -n openshift-gitops
You should get output like
NAME READY STATUS RESTARTS AGE
cluster-b5798d6f9-xq7pb 1/1 Running 0 28s
kam-69866d7c48-5pcg6 1/1 Running 0 27s
openshift-gitops-application-controller-0 1/1 Running 0 26s
openshift-gitops-applicationset-controller-6447b8dfdd-tbxgw 1/1 Running 0 25s
openshift-gitops-redis-74bd8d7d96-9pvcx 1/1 Running 0 26s
openshift-gitops-repo-server-c999f75d5-47psw 1/1 Running 0 26s
openshift-gitops-server-6ff4fbc8f6-mb8dn 1/1 Running 0 26s
- Get URL and open ArgoCD in browser
oc get route openshift-gitops-server -n openshift-gitops -o jsonpath='{.spec.host}'
- Get password to log into ArgoCD, username is
admin
oc extract secret/openshift-gitops-cluster -n openshift-gitops --to=-
- Create basic cluster update
oc apply -f https://raw.githubusercontent.com/jkeam/openshift-gitops-getting-started/bugfix/1_1/argo/cluster.yaml
- Verify installation, it will say that it is
OutOfSync
because we chose manual reconciliation
oc get application -n openshift-gitops
- Log into ArgoCD and see that it also says
OutOfSync
. Click theSync
button and thenSynchronize
button. Then view OpenShift and click the app launcher in the upper right to see a new link added to the Developer Blogs. Also a newspring-petclinic
project has been created.
The cluster.yaml
we applied before created the necessary namespace and RoleBinding
to allow us to be able to deploy the spring petclinic app. Let's do that now.
oc apply -f https://raw.githubusercontent.com/jkeam/openshift-gitops-getting-started/bugfix/1_1/argo/app.yaml