clay-prod-checklist
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClay Production Checklist
Clay生产环境部署检查清单
Overview
概述
Complete checklist for deploying Clay integrations to production.
完成将Clay集成部署到生产环境的检查清单。
Prerequisites
前置条件
- Staging environment tested and verified
- Production API keys available
- Deployment pipeline configured
- Monitoring and alerting ready
- Staging环境已完成测试与验证
- 已获取生产环境API密钥
- 部署流水线已配置
- 监控与告警已就绪
Instructions
操作步骤
Step 1: Pre-Deployment Configuration
步骤1:部署前配置
- Production API keys in secure vault
- Environment variables set in deployment platform
- API key scopes are minimal (least privilege)
- Webhook endpoints configured with HTTPS
- Webhook secrets stored securely
- 生产环境API密钥已存入安全密钥库
- 已在部署平台中设置环境变量
- API密钥权限遵循最小特权原则
- 已配置HTTPS协议的Webhook端点
- Webhook密钥已安全存储
Step 2: Code Quality Verification
步骤2:代码质量验证
- All tests passing ()
npm test - No hardcoded credentials
- Error handling covers all Clay error types
- Rate limiting/backoff implemented
- Logging is production-appropriate
- 所有测试已通过()
npm test - 代码中无硬编码凭证
- 错误处理已覆盖所有Clay错误类型
- 已实现请求限流/退避机制
- 日志配置符合生产环境要求
Step 3: Infrastructure Setup
步骤3:基础设施设置
- Health check endpoint includes Clay connectivity
- Monitoring/alerting configured
- Circuit breaker pattern implemented
- Graceful degradation configured
- 健康检查端点包含Clay连通性检测
- 已配置监控与告警
- 已实现断路器模式
- 已配置优雅降级机制
Step 4: Documentation Requirements
步骤4:文档要求
- Incident runbook created
- Key rotation procedure documented
- Rollback procedure documented
- On-call escalation path defined
- 已创建事件响应手册
- 已记录密钥轮换流程
- 已记录回滚流程
- 已定义值班升级路径
Step 5: Deploy with Gradual Rollout
步骤5:渐进式部署
bash
undefinedbash
undefinedPre-flight checks
Pre-flight checks
curl -f https://staging.example.com/health
curl -s https://status.clay.com
curl -f https://staging.example.com/health
curl -s https://status.clay.com
Gradual rollout - start with canary (10%)
Gradual rollout - start with canary (10%)
kubectl apply -f k8s/production.yaml
kubectl set image deployment/clay-integration app=image:new --record
kubectl rollout pause deployment/clay-integration
kubectl apply -f k8s/production.yaml
kubectl set image deployment/clay-integration app=image:new --record
kubectl rollout pause deployment/clay-integration
Monitor canary traffic for 10 minutes
Monitor canary traffic for 10 minutes
sleep 600
sleep 600
Check error rates and latency before continuing
Check error rates and latency before continuing
If healthy, continue rollout to 50%
If healthy, continue rollout to 50%
kubectl rollout resume deployment/clay-integration
kubectl rollout pause deployment/clay-integration
sleep 300
kubectl rollout resume deployment/clay-integration
kubectl rollout pause deployment/clay-integration
sleep 300
Complete rollout to 100%
Complete rollout to 100%
kubectl rollout resume deployment/clay-integration
kubectl rollout status deployment/clay-integration
undefinedkubectl rollout resume deployment/clay-integration
kubectl rollout status deployment/clay-integration
undefinedOutput
输出结果
- Deployed Clay integration
- Health checks passing
- Monitoring active
- Rollback procedure documented
- Clay集成已部署完成
- 健康检查全部通过
- 监控已启用
- 回滚流程已记录
Error Handling
错误处理
| Alert | Condition | Severity |
|---|---|---|
| API Down | 5xx errors > 10/min | P1 |
| High Latency | p99 > 5000ms | P2 |
| Rate Limited | 429 errors > 5/min | P2 |
| Auth Failures | 401/403 errors > 0 | P1 |
| 告警 | 触发条件 | 级别 |
|---|---|---|
| API服务不可用 | 5xx错误 > 10次/分钟 | P1 |
| 高延迟 | P99延迟 > 5000毫秒 | P2 |
| 请求受限 | 429错误 > 5次/分钟 | P2 |
| 认证失败 | 401/403错误 > 0 | P1 |
Examples
示例
Health Check Implementation
健康检查实现
typescript
async function healthCheck(): Promise<{ status: string; clay: any }> {
const start = Date.now();
try {
await clayClient.ping();
return { status: 'healthy', clay: { connected: true, latencyMs: Date.now() - start } };
} catch (error) {
return { status: 'degraded', clay: { connected: false, latencyMs: Date.now() - start } };
}
}typescript
async function healthCheck(): Promise<{ status: string; clay: any }> {
const start = Date.now();
try {
await clayClient.ping();
return { status: 'healthy', clay: { connected: true, latencyMs: Date.now() - start } };
} catch (error) {
return { status: 'degraded', clay: { connected: false, latencyMs: Date.now() - start } };
}
}Immediate Rollback
紧急回滚
bash
kubectl rollout undo deployment/clay-integration
kubectl rollout status deployment/clay-integrationbash
kubectl rollout undo deployment/clay-integration
kubectl rollout status deployment/clay-integrationResources
参考资源
Next Steps
后续步骤
For version upgrades, see .
clay-upgrade-migration如需版本升级,请查看。
clay-upgrade-migration