Linux DevOps · Final challenge

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.

How this works

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

  1. CI is green. ~/greeter has a CI workflow, and its latest run passes.
  2. The new version is live. Users going through Apache get the new version with search, and the mobile app's /api/tickets works too.
  3. No user saw an error. Not one request through Apache failed during your release. Test first, switch second.
  4. 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 blue container 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.

Complete every objective in the terminal and the challenge is marked done automatically. It's optional, but it goes on your certificate.