| name | Deployment Planning |
| description | Plan software deployments with rollback strategies, monitoring, and health checks |
| version | 1.0 |
| tags | ["engineering","operations","planning"] |
| complexity | intermediate |
| requires_tools | [] |
Process
- Pre-deployment checklist:
- All tests passing
- Code reviewed and approved
- Database migrations tested
- Environment variables configured
- Dependencies up to date
- Deployment strategy — Choose approach:
- Rolling update: Gradual replacement, zero-downtime
- Blue-green: Switch traffic between two environments
- Canary: Route small percentage of traffic to new version
- Big bang: Replace all at once (simplest, riskiest)
- Rollback plan — How to revert if something goes wrong
- Health checks — What endpoints/metrics confirm the deployment is healthy
- Monitoring — What to watch during and after deployment
- Communication — Who needs to know, when to notify
Output Format
## Deployment Runbook: [Release Name/Version]
### Pre-Deployment
- [ ] Tests passing on CI
- [ ] Database migration tested on staging
- [ ] Environment variables verified
- [ ] Rollback procedure documented
### Deployment Steps
1. [Step-by-step deployment procedure]
### Health Verification
- [ ] Health endpoint returns 200: GET /health
- [ ] Key metric within normal range: [metric name]
- [ ] No error spike in logs (check for 5 minutes)
### Rollback Procedure
1. [Step-by-step rollback if deployment fails]
### Post-Deployment
- [ ] Monitor error rates for 30 minutes
- [ ] Verify key user flows
- [ ] Update status page / notify team
Guidelines
- Always have a rollback plan before deploying
- Test migrations on a copy of production data first
- Deploy during low-traffic periods when possible
- Monitor error rates closely for 30 minutes after deployment
- Keep deployments small — smaller changes are easier to debug
- Document everything — the next person to deploy should be able to follow your runbook