S
StaffLoansapp
Deployment Runbook
Step-by-step procedures for safe, reliable deployments
1Pre-Deployment
1
Create feature branch
git checkout -b feature/xyz2
Develop and test locally
npm run test3
Push to GitHub
git push origin feature/xyz4
Create pull request
PR template applies automatically5
Code review & approval
Requires 2 approvals2Staging Deployment
1
Merge to develop
git merge --squash feature/xyz2
CI/CD pipeline runs
Tests, lint, security scan3
Auto-deploy to staging
kubectl apply -f k8s/staging/4
Run smoke tests
npm run test:smoke:staging5
Notify team in Slack
Automatic @here notification3Production Deployment
1
Create release branch
git checkout -b release/v1.2.32
Update version numbers
npm version minor3
Create GitHub release
Tag: v1.2.34
Create database backup
backup-db production5
Run migrations
npm run migrate:prod6
Deploy to production
kubectl apply -f k8s/production/7
Health check (5 retries)
curl https://api.staffloans.com/health8
Smoke tests on production
npm run test:smoke:prod9
Notify stakeholders
Slack + email4Post-Deployment
1
Monitor error rate
Check Sentry dashboard2
Monitor latency
Check Datadog metrics3
Monitor throughput
Check request volume4
Watch logs
tail -f logs/production.log5
Be ready to rollback
kubectl rollout undo deployment/apiEmergency Contacts
Deployment Lead
On-call: @devops-oncall (Slack)
Quick Rollback
Channel: #incidents (notify all)
Post-Mortem
Due: 24 hours after incident