Files
claude-howto/zh/07-plugins/devops-automation/README.md
T
Luong NGUYEN b9a973bf32 docs: accuracy pass against Claude Code v2.1.220 (#155)
Internal accuracy pass against v2.1.220 — no missing upstream features, but broken example code, disagreeing counts, and metadata drift.

Functional fixes: pre-commit.sh now exits 2 so it actually blocks; dependency-check.sh reads file_path from stdin JSON instead of $1; database-mcp.json uses ${DATABASE_URL}; broken fences repaired; three command templates had invalid skill names.

Factual corrections: /fork and /subtask unswapped and /subtask added; /fewer-permission-prompts; permissions.defaultMode; dontAsk/auto unreversed; 31 hook events verified name-by-name; subagent depth 3; skill precedence enterprise > project > personal; /output-style removed not deprecated; permissionDecision gained defer.

Follow-up review fixed defects the pass left behind: zh/vi headers claiming 31 events above 25-name lists, a surviving hardcoded DB credential in the MCP README examples, an unbalanced fence swallowing a metadata footer, and non-canonical tool names. All four translated CATALOG summary tables were recounted so their arithmetic holds.

Full detail in CHANGELOG.md under v2.1.220-r2.
2026-08-04 15:41:12 +07:00

115 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: DevOps 自动化插件
description: 为部署、监控和故障处理提供自动化工作流
tags: plugins, devops, automation
---
# DevOps 自动化插件
完整的 DevOps 自动化工作流,覆盖部署、监控和事故响应。
## 功能
✅ 自动化部署
✅ 回滚流程
✅ 系统健康监控
✅ 事故响应工作流
✅ Kubernetes 集成
## 安装
```bash
/plugin install devops-automation
```
## 包含内容
### Slash 命令
- `/deploy` - 部署到生产或预发环境
- `/rollback` - 回滚到上一个版本
- `/status` - 检查系统健康
- `/incident` - 处理生产事故
### 子 agents
- `deployment-specialist` - 部署操作
- `incident-commander` - 事故协调
- `alert-analyzer` - 系统健康分析
### MCP 服务器
- Kubernetes 集成
### 脚本
- `deploy.sh` - 部署自动化
- `rollback.sh` - 回滚自动化
- `health-check.sh` - 健康检查工具
### Hooks
- `pre-deploy.js` - 部署前验证
- `post-deploy.js` - 部署后任务
## 使用
### 部署到预发环境
```
/deploy staging
```
### 部署到生产环境
```
/deploy production
```
### 回滚
```
/rollback production
```
### 检查状态
```
/status
```
### 处理事故
```
/incident
```
## 要求
- Claude Code 2.1+
- Kubernetes CLIkubectl
- 已配置集群访问
## 配置
设置 Kubernetes 配置:
```bash
export KUBECONFIG=~/.kube/config
```
## 示例工作流
```
用户:/deploy production
Claude:
1. 运行 pre-deploy hook(验证 kubectl 和集群连接)
2. 将部署委派给 deployment-specialist subagent
3. 运行 deploy.sh 脚本
4. 通过 Kubernetes MCP 监控部署进度
5. 运行 post-deploy hook(等待 pods 就绪,执行 smoke tests
6. 提供部署总结
结果:
✅ 部署完成
📦 版本:v2.1.0
🚀 Pods3/3 已就绪
⏱️ 用时:2m 34s
```