Learning: Production Deployment¶
How to Use This Page¶
- Treat deployment as a controlled experiment.
- Use gates and canaries by default.
- Practice rollback before incidents happen.
Lesson 1: Fundamentals¶
Learn release gates and reproducible CI-driven deployment checks.
What You Learn¶
- How build, test, and eval checks protect releases
- Why release criteria must be explicit and versioned
- How release metadata supports post-incident analysis
Walkthrough¶
- Define required checks before deployment.
- Run CI pipeline and collect release artifacts.
- Record version, config, and policy metadata.
Try It Yourself¶
- Break one required test and confirm gate blocks release.
- Add a required eval threshold for deployment eligibility.
- Generate a release checklist from pipeline output.
Lesson 2: Intermediate Patterns¶
Learn canary rollout and comparative health analysis.
What You Learn¶
- How small-slice canaries reduce blast radius
- Why baseline comparison is required before promotion
- How automated abort logic protects production users
Walkthrough¶
- Route a small traffic slice to canary.
- Compare canary metrics against stable baseline.
- Promote only when thresholds pass.
Try It Yourself¶
- Inject a canary degradation and verify automatic abort.
- Compare promotion decisions under strict vs lenient thresholds.
- Add one canary metric that reflects user-facing quality.
Lesson 3: Production Patterns¶
Learn automated rollback and recovery readiness.
What You Learn¶
- How rollback triggers reduce mean time to recovery
- Why post-release health checks catch delayed failures
- How rollback drills improve operational confidence
Walkthrough¶
- Implement rollback on critical threshold breach.
- Run scheduled post-release health checks.
- Store rollback evidence and incident timeline.
Try It Yourself¶
- Execute a rollback drill in a controlled environment.
- Measure time-to-detect and time-to-recover.
- Propose one pipeline improvement to reduce recovery time.
Code Examples¶
- Starter script:
docs/starter/stage11_deployment.py - Stage architecture notes:
docs/roadmap/stage-11-deployments-ci-and-rollbacks/architecture.md