Part 7 Exercises
The final exercises. These are the hardest in the book — and the most rewarding. Complete the capstone and you'll have a real, working DevOps platform you built yourself.
Developer Platforms
What is an Internal Developer Platform (IDP)? Describe the difference between a developer platform and a collection of DevOps tools. What problem does a platform solve that a collection of tools doesn't?
Write a complete catalog-info.yaml for a production Python FastAPI service called inventory-service owned by the warehouse-team. The service is in production lifecycle, depends on a PostgreSQL database resource called inventory-db and another component called notification-service, and has annotations linking to its GitHub repo at myorg/inventory-service.
Explain what a Crossplane Composition does. Why would a platform team prefer to expose a PostgreSQLDatabase custom resource rather than letting developers write raw RDSInstance managed resources directly? Give at least three reasons.
Design (in plain text, no code required) a Backstage Software Template for creating a new Java Spring Boot microservice. List: (1) what parameters you would ask the developer to fill in, (2) what files the template would generate in the new repo, (3) what external actions the template would take automatically (GitHub repo creation, catalog registration, etc.).
AI Ops
What is alert fatigue, and why is it dangerous in a production operations environment? Describe two concrete ways AI Ops techniques reduce alert fatigue without missing real incidents.
Explain the difference between static threshold alerting and anomaly detection. Give a specific example where a static threshold would produce a false positive and where it would miss a real incident, and describe how anomaly detection handles both cases better.
You want to build an LLM-powered alert triage bot. List the five pieces of context you would collect and send to the LLM alongside the alert payload, and explain why each piece helps the model produce a more useful triage summary.
What does it mean to treat an AI model as a "junior engineer" in an AIOps context? Give two examples of tasks where you would let the AI act autonomously, and two examples where you would require a human approval step before the AI's recommended action is executed. Explain your reasoning for each.
Capstone Project — Build a Mini DevOps Platform
This is the final exercise of the book. Build a complete, working DevOps platform for a simple three-service application. Here is the spec:
The Application: Three services — a frontend (Next.js or any static site), an API (Node.js or Python), and a database (PostgreSQL). The services communicate: the frontend calls the API, the API reads/writes the database.
What you must build and demonstrate:
-
Containerisation (Part 2): Write a
Dockerfilefor both the frontend and API. Create adocker-compose.ymlthat runs all three services locally. Verify thatdocker-compose upproduces a working application. - Kubernetes (Part 2): Write Kubernetes manifests for all three services: Deployments, Services, an Ingress, a ConfigMap for non-secret config, and a Secret for the database password. Deploy to a local cluster (k3d, minikube, or kind). Verify the application works through the Ingress.
- CI/CD (Part 2): Write a GitHub Actions workflow that: runs tests on every push, builds and pushes Docker images to GitHub Container Registry (GHCR) on main, and updates the Kubernetes deployment image tag on successful push.
- Infrastructure as Code (Part 4): Write Terraform that provisions a cloud database (AWS RDS, GCP Cloud SQL, or use a local equivalent). The database connection string must be stored as a variable, not hardcoded.
- Observability (Part 6): Add Prometheus metrics to the API (at minimum: request count and duration). Deploy Prometheus and Grafana to the local cluster. Create a Grafana dashboard showing request rate and error rate. Add at least one alerting rule.
- Security (Part 6): Add a Trivy scan step to your GitHub Actions pipeline that blocks deployment if any CRITICAL vulnerabilities are found. Store the database password in HashiCorp Vault (local dev mode) rather than a hardcoded Kubernetes Secret.
-
AI Ops (Part 7, stretch goal): Write a Python script that, given a simulated alert payload (service name, alert name, severity), fetches the last 20 log lines from the affected pod using
kubectl logsand sends them to the Anthropic API with a prompt asking for a triage summary. Print the result to stdout.
How to submit / verify: Write a RUNBOOK.md in your repo that describes every component, how to run it locally from scratch, and what to do when each major component fails. A colleague who has read this book but never seen your repo should be able to follow the runbook and get the platform running.
There is no single right answer. The goal is a working system you understand end-to-end — one you could explain, debug, and extend on your own.