Deployment
Overview
Procedure for planning and executing reliable software deployments
Steps
Step 1: Pre-deployment preparation
Prepare for deployment before making any changes:
- Verify artifact is tested and approved
- Review changes being deployed (commits, migrations)
- Check deployment prerequisites (dependencies, config)
- Verify target environment is healthy
- Confirm rollback procedure and verify it works
- Notify stakeholders of deployment
- Ensure team availability for monitoring
Step 2: Create deployment checkpoint
Establish a known-good state to roll back to:
- Record current running version
- Backup relevant data if needed
- Save current configuration state
- Verify backup/checkpoint is complete
- Document checkpoint location and restore procedure
Step 3: Execute deployment
Deploy the artifact to target environment:
- Initiate deployment (manual trigger or CI/CD)
- Monitor deployment progress
- Watch for errors or warnings
- Wait for deployment to complete
- Verify all instances updated
- Execute database migrations if needed
Step 4: Run smoke tests
Verify basic functionality immediately after deployment:
- Run automated smoke test suite
- Verify critical endpoints respond
- Check database connectivity
- Verify external integrations work
- Confirm key user flows function
- Check application logs for errors
Step 5: Gradual traffic migration
Route traffic to new version progressively:
- Start with small percentage (canary) or instant switch (blue-green)
- Monitor error rates and latency
- Check business metrics (conversions, etc.)
- Gradually increase traffic to new version
- Continue monitoring at each stage
- Complete migration when confident
Step 6: Post-deployment verification
Comprehensive verification that deployment is successful:
- Run full integration test suite
- Verify all features function correctly
- Check performance metrics against baseline
- Review error rates and alerts
- Confirm monitoring and alerting is active
- Verify rollback capability still works
Step 7: Finalize or rollback
Complete deployment or execute rollback: If successful:
- Mark deployment as complete
- Update deployment records
- Clean up old version (if blue-green)
- Notify stakeholders of success
- Archive deployment artifacts If issues:
- Execute rollback procedure
- Verify rollback successful
- Notify stakeholders of rollback
- Document issues for investigation
- Plan remediation
When to Use
- Setting up CI/CD pipeline for a project
- Planning deployment strategy for new application
- Preparing to release new features to production
- Improving existing deployment process
- Implementing deployment automation
- Planning rollback procedures
- Deploying to multiple environments
- Managing production releases
Verification
- Deployment artifact matches what was tested
- All smoke tests pass
- Error rates within acceptable thresholds
- Performance metrics stable
- Rollback capability verified
- Stakeholders notified of outcome
- Deployment documented
Input: $ARGUMENTS
Apply this procedure to the input provided.