This started as a question every team shipping software has to answer: how do you put a new version in front of users without a window where things are broken? Over an assignment and a midterm, I answered it twice on Azure Container Apps: once by hand, and once as a pipeline that does it without me.
Two services, one private registry
The first step was a small microservice pair: an album API and a web front end that calls it. Both images are built into a private Azure Container Registry and deployed as Container Apps in one environment. The front end never hardcodes where the API lives: the API's address is read at deploy time and passed in as an environment variable, so either side can be redeployed without rebuilding the other.
Blue/green and canary, by hand
With the API in multiple-revision mode, a new version runs beside the old one instead of replacing it. Labels make the two addressable: blue is what users get, green is the new revision, reachable through its own label URL for testing while it carries 0% of real traffic. Switching is one traffic command, and so is rolling back: the old revision never went anywhere.
Canary is the gentler version of the same idea: instead of flipping 100% at once, a small share of traffic goes to the new revision first and grows as it proves itself. Doing both by hand with the Azure CLI made the trade-off concrete: blue/green gives an instant, clean cutover; canary limits how many people a bad release can reach.
Then, making it a pipeline
The midterm turned that runbook into an Azure Pipeline. It runs on a self-hosted agent: an Ubuntu VM I provisioned and registered into its own agent pool, against a repo in Azure Repos where main is protected and every pull request has to pass a build before it can merge.
- Build: the image is built on every run and tagged with both the build ID and the commit SHA, but only pushed to the registry when the run isn't a pull request.
- Validate: confirms that exact tag exists in the registry, that the app is in multiple-revision mode, and runs the image on the agent itself and calls /albums as a smoke test.
- Deploy: gated behind a production environment approval. It finds which label holds 100% of traffic, deploys the new revision under the other label, and leaves production traffic untouched.
- Validation gate: calls the new revision on its own URL with retries, failing fast on a 4xx. If it fails, the pipeline stops and prints the traffic table to prove production was never touched.
- Promote: switches 100% of traffic to the validated label, checks the production URL, and switches straight back on its own if that check fails.
Designing for the bad day
Two run-time parameters exist purely to prove the failure paths work. One simulates a bad release by pointing the validation gate at a route the app doesn't serve, so you can watch promotion get skipped while production keeps serving the old version. The other runs only a rollback stage, which checks that the previous revision still responds before sending any users back to it: rolling back onto something broken is just a second outage.
What I took from it
The deploy itself is the least interesting stage. What makes a release safe is everything around it: a revision that exists before anyone uses it, a test that runs against the real thing, and a way back that's been exercised rather than assumed. Doing it by hand first is what made each pipeline stage obvious when it came time to automate.





