1.3 KiB
1.3 KiB
KBX Deployment Runbook v22
1. Build once
Commit SHA 하나에서 Release Artifact를 한 번만 빌드한다. Staging 통과 후 Production을 별도로 rebuild하지 않는다.
2. Pre-deploy gates
node scripts/validate-kbx.mjs- frontend/backend build + unit/integration tests
- canonical scenario evidence
- target-environment configuration binding +
ValidateOrThrow() - DbUp migration validation/dry-run
- Release Impact 확인
3. Migration
Production은 Kbx:Database:MigrationsMode=predeploy만 허용한다. Schema 변경 실패를 애플리케이션 첫 요청에서 발견하지 않는다.
Destructive SQL은 기본 금지하며 정말 필요한 경우 KBX-DESTRUCTIVE-MIGRATION-APPROVED: <ticket/ADR> marker와 Migration Guide가 필요하다. Expand → backfill → contract의 단계적 변경을 우선한다.
4. Deploy
환경별 설정/Secret을 외부 주입하고 동일 Artifact를 시작한다. 시작 시 configuration fingerprint와 KBX contract version을 기록한다. Secret 값 자체는 기록하지 않는다.
5. Post-deploy
- readiness/로그/OTel 확인
- Outbox/Inbox/Hangfire backlog 확인
- Runtime banner/Exception Center 확인
- Golden scenario smoke 실행
- 심각한 이상이면 Release rollback 또는 runtime read-only/kill switch 정책 사용