跳到正文
Skillpedia
部署与云(DevOps)48k · #4374

deployment-procedures

它能做什么

这份指南讲解了安全地将新的计算机程序投入运行(即上线到生产环境)的基本原则。它侧重于思考整个流程的方法,而不是具体的命令。

适用场景

  • ✓发布网站或应用的新版本时。
  • ✓需要确保能够快速、安全地回退到之前的版本时。
  • ✓想了解更新前后需要完成哪些步骤时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/deployment-procedures/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/deployment-procedures/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我怎样才能确保网站更新后不会给用户带来问题?”

每周 5 个新技能,1 分钟读完。

工作原理

AI 会讲解安全发布的通用步骤和关键决策点,例如检查代码、做好备份,以及制定好一旦出问题就撤回改动的方案。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Deployment Procedures

Deployment principles and decision-making for safe production releases. Learn to THINK, not memorize scripts.


⚠️ How to Use This Skill

This skill teaches deployment principles, not bash scripts to copy.

  • Every deployment is unique
  • Understand the WHY behind each step
  • Adapt procedures to your platform

1. Platform Selection

Decision Tree

What are you deploying?
│
├── Static site / JAMstack
│   └── Vercel, Netlify, Cloudflare Pages
│
├── Simple web app
│   ├── Managed → Railway, Render, Fly.io
│   └── Control → VPS + PM2/Docker
│
├── Microservices
│   └── Container orchestration
│
└── Serverless
    └── Edge functions, Lambda

Each Platform Has Different Procedures

Platform Deployment Method
Vercel/Netlify Git push, auto-deploy
Railway/Render Git push or CLI
VPS + PM2 SSH + manual steps
Docker Image push + orchestration
Kubernetes kubectl apply

2. Pre-Deployment Principles

The 4 Verification Categories

Category What to Check
Code Quality Tests passing, linting clean, reviewed
Build Production build works, no warnings
Environment Env vars set, secrets current
Safety Backup done, rollback plan ready

Pre-Deployment Checklist

  • All tests passing
  • Code reviewed and approved
  • Production build successful
  • Environment variables verified
  • Database migrations ready (if any)
  • Rollback plan documented
  • Team notified
  • Monitoring ready

3. Deployment Workflow Principles

The 5-Phase Process

1. PREPARE
   └── Verify code, build, env vars

2. BACKUP
   └── Save current state before changing

3. DEPLOY
   └── Execute with monitoring open

4. VERIFY
   └── Health check, logs, key flows

5. CONFIRM or ROLLBACK
   └── All good? Confirm. Issues? Rollback.

Phase Principles

Phase Principle
Prepare Never deploy untested code
Backup Can't rollback without backup
Deploy Watch it happen, don't walk away
Verify Trust but verify
Confirm Have rollback trigger ready

4. Post-Deployment Verification

What to Verify

Check Why
Health endpoint Service is running
Error logs No new errors
Key user flows Critical features work
Performance Response times acceptable

Verification Window

  • First 5 minutes: Active monitoring
  • 15 minutes: Confirm stable
  • 1 hour: Final verification
  • Next day: Review metrics

5. Rollback Principles

When to Rollback

Symptom Action
Service down Rollback immediately
Critical errors Rollback
Performance >50% degraded Consider rollback
Minor issues Fix forward if quick

Rollback Strategy by Platform

Platform Rollback Method
Vercel/Netlify Redeploy previous commit
Railway/Render Rollback in dashboard
VPS + PM2 Restore backup, restart
Docker Previous image tag
K8s kubectl rollout undo

Rollback Principles

  1. Speed over perfection: Rollback first, debug later
  2. Don't compound errors: One rollback, not multiple changes
  3. Communicate: Tell team what happened
  4. Post-mortem: Understand why after stable

6. Zero-Downtime Deployment

Strategies

Strategy How It Works
Rolling Replace instances one by one
Blue-Green Switch traffic between environments
Canary Gradual traffic shift

Selection Principles

Scenario Strategy
Standard release Rolling
High-risk change Blue-green (easy rollback)
Need validation Canary (test with real traffic)

7. Emergency Procedures

Service Down Priority

  1. Assess: What's the symptom?
  2. Quick fix: Restart if unclear
  3. Rollback: If restart doesn't help
  4. Investigate: After stable

Investigation Order

Check Common Issues
Logs Errors, exceptions
Resources Disk full, memory
Network DNS, firewall
Dependencies Database, APIs

8. Anti-Patterns

❌ Don't ✅ Do

…

常见问题

什么是“回滚”(rollback)?

回滚是指当新版本出现问题时,把程序恢复到之前版本的过程。

为什么不建议在周五部署?

临近周末部署有一定风险。如果出了问题,周末期间可能很难及时获得帮助。

什么是“功能开关”?

功能开关就像一个个开关,可以让你在不进行完整重新部署的情况下,打开或关闭程序中的新功能。

详情

作者的原始描述

Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4374
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能