Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
Add this skill
npx mdskills install sickn33/deployment-proceduresTeaches deployment thinking through comprehensive principles, decision trees, and workflows
1---2name: deployment-procedures3description: Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.4allowed-tools: Read, Glob, Grep, Bash5---67# Deployment Procedures89> Deployment principles and decision-making for safe production releases.10> **Learn to THINK, not memorize scripts.**1112---1314## ⚠️ How to Use This Skill1516This skill teaches **deployment principles**, not bash scripts to copy.1718- Every deployment is unique19- Understand the WHY behind each step20- Adapt procedures to your platform2122---2324## 1. Platform Selection2526### Decision Tree2728```29What are you deploying?30│31├── Static site / JAMstack32│ └── Vercel, Netlify, Cloudflare Pages33│34├── Simple web app35│ ├── Managed → Railway, Render, Fly.io36│ └── Control → VPS + PM2/Docker37│38├── Microservices39│ └── Container orchestration40│41└── Serverless42 └── Edge functions, Lambda43```4445### Each Platform Has Different Procedures4647| Platform | Deployment Method |48|----------|------------------|49| **Vercel/Netlify** | Git push, auto-deploy |50| **Railway/Render** | Git push or CLI |51| **VPS + PM2** | SSH + manual steps |52| **Docker** | Image push + orchestration |53| **Kubernetes** | kubectl apply |5455---5657## 2. Pre-Deployment Principles5859### The 4 Verification Categories6061| Category | What to Check |62|----------|--------------|63| **Code Quality** | Tests passing, linting clean, reviewed |64| **Build** | Production build works, no warnings |65| **Environment** | Env vars set, secrets current |66| **Safety** | Backup done, rollback plan ready |6768### Pre-Deployment Checklist6970- [ ] All tests passing71- [ ] Code reviewed and approved72- [ ] Production build successful73- [ ] Environment variables verified74- [ ] Database migrations ready (if any)75- [ ] Rollback plan documented76- [ ] Team notified77- [ ] Monitoring ready7879---8081## 3. Deployment Workflow Principles8283### The 5-Phase Process8485```861. PREPARE87 └── Verify code, build, env vars88892. BACKUP90 └── Save current state before changing91923. DEPLOY93 └── Execute with monitoring open94954. VERIFY96 └── Health check, logs, key flows97985. CONFIRM or ROLLBACK99 └── All good? Confirm. Issues? Rollback.100```101102### Phase Principles103104| Phase | Principle |105|-------|-----------|106| **Prepare** | Never deploy untested code |107| **Backup** | Can't rollback without backup |108| **Deploy** | Watch it happen, don't walk away |109| **Verify** | Trust but verify |110| **Confirm** | Have rollback trigger ready |111112---113114## 4. Post-Deployment Verification115116### What to Verify117118| Check | Why |119|-------|-----|120| **Health endpoint** | Service is running |121| **Error logs** | No new errors |122| **Key user flows** | Critical features work |123| **Performance** | Response times acceptable |124125### Verification Window126127- **First 5 minutes**: Active monitoring128- **15 minutes**: Confirm stable129- **1 hour**: Final verification130- **Next day**: Review metrics131132---133134## 5. Rollback Principles135136### When to Rollback137138| Symptom | Action |139|---------|--------|140| Service down | Rollback immediately |141| Critical errors | Rollback |142| Performance >50% degraded | Consider rollback |143| Minor issues | Fix forward if quick |144145### Rollback Strategy by Platform146147| Platform | Rollback Method |148|----------|----------------|149| **Vercel/Netlify** | Redeploy previous commit |150| **Railway/Render** | Rollback in dashboard |151| **VPS + PM2** | Restore backup, restart |152| **Docker** | Previous image tag |153| **K8s** | kubectl rollout undo |154155### Rollback Principles1561571. **Speed over perfection**: Rollback first, debug later1582. **Don't compound errors**: One rollback, not multiple changes1593. **Communicate**: Tell team what happened1604. **Post-mortem**: Understand why after stable161162---163164## 6. Zero-Downtime Deployment165166### Strategies167168| Strategy | How It Works |169|----------|--------------|170| **Rolling** | Replace instances one by one |171| **Blue-Green** | Switch traffic between environments |172| **Canary** | Gradual traffic shift |173174### Selection Principles175176| Scenario | Strategy |177|----------|----------|178| Standard release | Rolling |179| High-risk change | Blue-green (easy rollback) |180| Need validation | Canary (test with real traffic) |181182---183184## 7. Emergency Procedures185186### Service Down Priority1871881. **Assess**: What's the symptom?1892. **Quick fix**: Restart if unclear1903. **Rollback**: If restart doesn't help1914. **Investigate**: After stable192193### Investigation Order194195| Check | Common Issues |196|-------|--------------|197| **Logs** | Errors, exceptions |198| **Resources** | Disk full, memory |199| **Network** | DNS, firewall |200| **Dependencies** | Database, APIs |201202---203204## 8. Anti-Patterns205206| ❌ Don't | ✅ Do |207|----------|-------|208| Deploy on Friday | Deploy early in week |209| Rush deployment | Follow the process |210| Skip staging | Always test first |211| Deploy without backup | Backup before deploy |212| Walk away after deploy | Monitor for 15+ min |213| Multiple changes at once | One change at a time |214215---216217## 9. Decision Checklist218219Before deploying:220221- [ ] **Platform-appropriate procedure?**222- [ ] **Backup strategy ready?**223- [ ] **Rollback plan documented?**224- [ ] **Monitoring configured?**225- [ ] **Team notified?**226- [ ] **Time to monitor after?**227228---229230## 10. Best Practices2312321. **Small, frequent deploys** over big releases2332. **Feature flags** for risky changes2343. **Automate** repetitive steps2354. **Document** every deployment2365. **Review** what went wrong after issues2376. **Test rollback** before you need it238239---240241> **Remember:** Every deployment is a risk. Minimize risk through preparation, not speed.242
Full transparency — inspect the skill content before installing.