Final challenge: Friday release
Two jobs before the weekend. The greeter team wants a CI pipeline that's green, and the tickets app needs its new version with search. The images are already built. Users are using the app right now, so nobody may see an error, not even for a second.
No step-by-step instructions: the objectives say what must be true when you're done. Look around first (podman ps, podman images, the Apache vhost, gh run list). A request to localhost goes through Apache, like a real user's; a request to localhost:PORT goes straight to a container, which is how you test before users can see it. The cheat sheet and search (/) are allowed, and hints are below.
The brief
- CI is green.
~/greeterhas a CI workflow, and its latest run passes. - The new version is live. Users going through Apache get the new version with search, and the mobile app's
/api/ticketsworks too. - No user saw an error. Not one request through Apache failed during your release. Test first, switch second.
- Done the blue-green way. The new version runs in its own container next to the old one, and once users are on it, the old
bluecontainer is stopped.
Stuck? Hints
Open only as many as you need.
1. CI is green
The workflow file waits in ~/examples/ci.yml; it belongs in .github/workflows/. Commit, push, then gh run view --log-failed says why it fails. shellcheck finds the same problem on your machine.
Still stuck: lesson 3.
2. The new version
Start the new image as green on a free port (-p 8082:8080) and test it directly: the home page and /api/tickets. If an image fails your test, look at podman images again.
Still stuck: lesson 6.
3. No errors
Only point Apache at green after green passed every test. Change the port in the vhost, run the config test, then reload Apache (a restart would drop connections).
4. Blue-green
Keep blue running until users are on green; it's your instant rollback. When everything checks out through curl localhost, podman stop blue.