CD10: Capstone: three DevOps projects for RouteRani

Lesson 1 of 5 ยท reading 15โ€“25 minutes; practice and project time is on the module page

Planning the capstone

๐ŸŽฏYou'll be able to

Plan the capstone: scope, order of work, evidence and time.

๐Ÿ The everyday picture

A builder renovating a shop fixes the foundations and wiring first, then fits the shutters and the alarm, then the CCTV and the extra counters for the festival rush. Fitting CCTV before the walls are rebuilt means doing it twice.

๐Ÿ“˜What it really is

Area What "good" looks like
Images Pinned, slim, non-root, health-checked, starting the app directly (CD1)
Connected safely Private database on a volume, stateless copies behind a load balancer, no secrets in files (CD2)
Infrastructure as code Pinned, validated, no drift, rebuildable, safe replacements (CD3โ€“CD4)
Platform judgement A reasoned view on Kubernetes and a cloud design with access, network and cost (CD5โ€“CD6)
Pipeline Triggers, least privilege, pinned actions, gated deploys (CD7)
Delivery Zero-downtime deploys, verification and automatic rollback (CD8)
Observable and scalable SLIs, dashboard, tested alerts, safe autoscaling (CD9)

๐Ÿ“A worked example

A learner's capstone plan (illustrative):

Week Work Done when
1 Project 1: Dockerfile, .dockerignore, pinned providers, generated password Tests 1 to 3 of npm run test:infra pass
2 Project 1: volume, private database, copies, create_before_destroy, outputs All 10 pass twice in a row
3 Project 2: workflow fixes, version check, test stage Tests 1 to 5 and 10 of npm run test:pipeline pass
4 Project 2: verify and rollback All 10 pass; deploy and fault numbers recorded
5 Project 3: discovery, Grafana, alerts and their tests Tests 1 to 5 of npm run test:observe pass
6 Project 3: autoscaler; capstone checks, demo, self-review and case studies npm test shows 28 passed in one session; every project page saved as self-checked complete

Doing Project 1 first meant the pipeline's rollback could read app_version from Terraform's outputs as soon as it was written.

๐ŸŒWhere it's used

๐Ÿ“Case scenario

A learner starts with the autoscaler because it seems most interesting. It writes app_count to a file, but the starter's Terraform has no such variable and only one fixed container name, so every apply fails. They rewrite the Terraform for Project 1 and then have to change the autoscaler again to read the new outputs. Starting with Project 1 would have avoided the rework.

๐Ÿ–ฑ๏ธTry it

Download the kit, follow routerani/README.md, and run npm test in tests/ once (about 15 minutes; most tests fail at this stage). Then write your plan with a "done when" check for each week. Success: your plan lists all 28 tests across the three projects.

โš ๏ธCommon mistakes

๐Ÿ› ๏ธFor your project

Run the kit's tests once before you plan, so you know what fails now: on the starter, 4 of the 28 pass: the formatting check, the second plan with no changes, destroy and rebuild (the starter's files are consistent, just unsafe), and Project 3 test 8, which passes only because nothing is running for the autoscaler to change yet.

โœ…Quick check

Why build Project 1 before Project 2?

Show the answer

The pipeline needs Project 1's variables, outputs and start-before-stop replacement to deploy and roll back.

What should you record as you go?

Show the answer

Test output and measurements for each project, saved as each one passes.

โ† BackCD10
ProLearners Assist