跳到正文
Skillpedia
部署与云(DevOps)40k · #7216

gem-devops-guidelines

它能做什么

这个工具帮助你规划和审查一个计算机程序如何上线与更新。它涵盖从如何构建程序,到确保程序运行良好,以及出现问题时能够回滚等各个环节。

适用场景

  • ✓规划一个新程序如何发布时。
  • ✓决定如何在不中断服务的情况下更新现有程序时。
  • ✓搭建自动化测试和部署流程时。

技能链接

https://github.com/github/awesome-copilot/blob/main/skills/gem-devops-guidelines/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我想用金丝雀发布的策略安全地发布一个新应用,该怎么做?”

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

工作原理

该工具会分析部署步骤,例如逐步用新版本替换旧版本(滚动式),或复制一套环境(蓝绿式)。它还会检查一些重要配置,比如健康检查,以及出现问题时如何回退到之前的版本。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

DevOps Guidelines

Apply only sections relevant to workload/provider/environment/acceptance criteria. Skip Docker, Kubernetes, mobile, production, rollback, health, feature-flag, security checks when not applicable.

Deployment strategy

  • Rolling (default): gradual, zero-downtime replacement.
  • Blue-green: duplicate environments, atomic cutover, instant rollback, 2× infra.
  • Canary: route small % first; requires traffic splitting.

Docker

  • Pin base-image tags (node:22-alpine); NEVER :latest.
  • Multi-stage builds + non-root user. Copy deps first for caching.
  • .dockerignore: node_modules, .git, tests. Define HEALTHCHECK + resource limits.

Kubernetes

Configure startup, readiness, liveness probes with workload-appropriate initial delays/thresholds.

CI/CD

  • PR: lint -> typecheck -> unit -> integration -> preview.
  • Main: build -> staging -> smoke -> production.

Health and shutdown

  • Simple: GET /health -> { "status": "ok" }.
  • Detailed: dependencies, uptime, version.
  • Services MUST expose meaningful health + gracefully handle SIGTERM when workload requires it.

Configuration

Use environment variables (Twelve-Factor), separated by environment. Validate at startup + fail fast. NEVER commit secrets or hard-code NODE_ENV=production.

Rollback

  • Kubernetes: kubectl rollout undo.
  • Vercel: vercel rollback.
  • Docker: redeploy previous pinned image.

Feature Flags

  • Lifecycle: create -> enable -> 5% -> 25% -> 50% -> 100% -> remove flag + dead code.
  • Every flag MUST have owner, expiration, rollback trigger. Remove within two weeks.

Checklists

  • Pre-deploy: passing tests, code review, env vars, migrations, rollback plan.
  • Post-deploy: healthy, monitored, old pods terminated, outcome documented.
  • Production: passing tests; no hardcoded secrets; JSON logs; meaningful health; pinned versions; validated env vars; resource limits; TLS; CVE scan; CORS; rate limiting; CSP/HSTS/X-Frame-Options; tested rollback; runbook; on-call.
  • Apply security/CVE checks to executable or security-sensitive workloads.

Mobile Deployment

  • EAS: eas build:configure; eas build -p ios|android --profile preview; eas update --branch production; --auto-submit.
  • Fastlane: iOS match/cert/sigh/pilot; Android Gradle/supply.
  • Credentials in env/secret storage, never Git. Automate iOS signing with fastlane match; use keytool + Google Play App Signing for Android.
  • TestFlight: internal instant; external 90 days/100 testers. Google Play: internal/beta/production. Expect 1–7 days review.
  • Rollback: EAS eas update:rollback; native release -> revert build; store release -> reduce phased rollout.
常见问题

什么是“滚动部署”(rolling deployment)?

这是一种更新程序的方式,逐步用新版本替换旧版本,确保服务始终可用。

什么是“蓝绿部署”(blue-green deployment)?

这是一种技术,你有两套完全相同的环境。一套正在运行线上服务(蓝色),另一套准备好接收流量(绿色)。切换几乎是瞬间完成的,因此需要时可以快速回滚。

为什么不应该在 Docker 中使用 ':latest' 标签?

使用 ':latest' 容易造成混淆,也很难确定实际使用或回滚的是哪个版本。最好使用具体的标签,例如 'node:22-alpine'。

详情

作者的原始描述

Design or review infrastructure, deployment, CI/CD, Docker, Kubernetes, health checks, rollback, feature flags, production readiness, and mobile release workflows. Use for DevOps, platform, container, pipeline, or release tasks.

repo: github/awesome-copilot

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能