Skip to content

Revision · Hands-On — Ship It

This part made the whole book real on one boring service — Snip, a URL shortener — by wiring every earlier idea into a single pipeline. The throughline is one sentence: one commit reaches production safely, automatically, and observably, with copy-pasteable config at every step.

  • The plan: commit → production — the entire path drawn on one page before building any piece, from commit through CI, GitOps, and canary, with the target DORA metrics the pipeline is designed to hit.
  • Containerize the app — a multi-stage Dockerfile that builds a static binary and ships a small, non-root, distroless image, with a .dockerignore, a healthcheck, and all config injected from the environment (12-factor); layer order is a caching decision.
  • The CI pipeline (GitHub Actions) — build, unit test, and lint, then build and push an immutably-tagged image, gated by a Trivy stop-the-line scan and signed with cosign using a least-privilege OIDC token for keyless signing.
  • The observability stack — instrument Snip with the four golden signals as Prometheus metrics, structured logs, and OpenTelemetry traces, plus a Deployment with probes, a ServiceMonitor to scrape it, an alert rule, and a Grafana panel.
  • Canary deploy — an Argo Rollout goes 10% → 50% → 100% while automated analysis queries the page-5 SLOs to auto-promote a healthy version or auto-roll-back a bad one, and the deploy itself stays a GitOps commit so rollback is a revert.
  • Where to go next — the journey recapped in one breath, what the capstone deliberately left out, and curated directions to go deeper: SRE, platform engineering, and security.

By the end you have the actual files that carry Snip from commit to production, and can point at any one and name the manual step it killed and the outage it prevents. That is the book’s recurring thread — what error-prone step does this remove, and how does it make production safer? — applied end to end. The frontier part then lifts your eyes from this one running system to where the field is heading next.