Stage 4 of 8 ↑ HOME
Stage 04 · Deploy · 10 min
Deploy to OpenShift
Manual deploy to validate the cluster before automating with CI/CD
📝 CLUSTER SETUP
If you want to demonstrate deployment to a live OpenShift cluster, use this environment to provision a cluster with 5 worker nodes, each configured with 16 vCPU and 64 GB RAM, for a total of 80 vCPU and 320 GB RAM.
💬 TALKING POINT · #27
  • Before we automate anything, we deploy manually first. This is intentional — it lets us validate the cluster setup, catch security context issues, and confirm the app actually runs before a pipeline ever touches it.
  • Bob generates a deployment script. We run it, watch what happens, and fix any issues together — live, with Bob's help. This is where real-world problems get solved.
4 · Generate Deployment Script
Create a script deploy-openshift.sh to deploy the app in payment-app-java17 to OpenShift, with namespace deploy-test. Use SDKMAN to install Java 17 if not already installed. Use `oc registry login --insecure=true` to login to the registry. Remember to add the --platform linux/amd64 flag when building the image. REGISTRY=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}' 2>/dev/null || echo "") Also include instructions on how to run the script as comments in the script.
📝 PRESENTER NOTE · #28
Bob will generate deploy-openshift.sh. In a terminal:

1. Login to the cluster:
oc login --token= --server=

2. Make the script executable:
chmod +x payment-app-java17/deploy-openshift.sh

3. Run the deployment script:
./payment-app-java17/deploy-openshift.sh

If anything fails, work through it with Bob live — that's the point of this stage.
💡 TIP · #50
If you see error: deployment "payment-app" exceeded its progress deadline — ask Bob to refer to troubleshooting-guide.md (link TBD). In the guide, we already provide what commands to run in terms of how to troubleshoot in this case, e.g.:

oc get pods -n deploy-test -l app=payment-app
oc describe pods -n deploy-test -l app=payment-app
oc describe deployment payment-app -n deploy-test
oc logs -n deploy-test -l app=payment-app --tail=100
oc get route payment-app -n deploy-test — get app URL once deployment succeeds
deploy-openshift.sh — deployment script
payment-app running in deploy-test namespace