Deployment runbooks and troubleshooting guides. Covers prerequisites, deployment steps, verification, rollback procedures, and per-environment documentation. Trigger: runbook, deployment guide, troubleshooting, rollback, operations.
From dotnet-ai-kitnpx claudepluginhub faysilalshareef/dotnet-ai-kit --plugin dotnet-ai-kitThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
# Deployment Runbook: {Service Name}
## Prerequisites
- [ ] Azure CLI authenticated (`az login`)
- [ ] kubectl configured for target cluster
- [ ] Docker image built and pushed to ACR
- [ ] Database migrations applied (if applicable)
- [ ] Service Bus topics/subscriptions created (if new)
- [ ] Environment secrets configured in K8s
## Pre-Deployment Checks
1. Verify current service health: `kubectl get pods -n {company}-{env}`
2. Check Service Bus dead letter queue is empty
3. Verify database migration status
4. Confirm no active deployments in progress
## Deployment Steps
### Step 1: Apply Database Migrations
```bash
dotnet ef database update \
--project src/{Company}.{Domain}.Command \
--connection "#{CONNECTION_STRING}#"
kubectl apply -f deploy/{env}-manifest.yaml -n {company}-{env}
kubectl rollout status deployment/{domain}-command -n {company}-{env} --timeout=300s
kubectl get pods -l app={domain}-command -n {company}-{env}
curl -f http://{domain}-command:8080/health/ready
kubectl apply -f deploy/{env}-manifest.yaml -n {company}-{env}
kubectl rollout status deployment/{domain}-query -n {company}-{env} --timeout=300s
kubectl apply -f deploy/{env}-manifest.yaml -n {company}-{env}
kubectl rollout status deployment/{domain}-gateway -n {company}-{env} --timeout=300s
kubectl get pods -n {company}-{env}# Rollback to previous version
kubectl rollout undo deployment/{domain}-command -n {company}-{env}
kubectl rollout undo deployment/{domain}-query -n {company}-{env}
kubectl rollout undo deployment/{domain}-gateway -n {company}-{env}
# Verify rollback
kubectl rollout status deployment/{domain}-command -n {company}-{env}
### Troubleshooting Guide
```markdown
## Common Issues
### Pod CrashLoopBackOff
**Symptoms**: Pod restarts repeatedly
**Check**: `kubectl logs {pod-name} -n {company}-{env} --previous`
**Common causes**:
- Missing environment variable or secret
- Database connection string incorrect
- Service Bus connection string expired
**Resolution**: Fix configuration and redeploy
### Service Bus Messages Stuck
**Symptoms**: Messages not being processed, dead letter queue growing
**Check**: Azure portal -> Service Bus -> Topic -> Subscription -> Messages
**Common causes**:
- Processor not running
- Event deserializer missing new event type
- Query database down
**Resolution**: Check processor logs, verify EventDeserializer, check DB
### gRPC Connection Refused
**Symptoms**: Gateway returns 502/503
**Check**: `kubectl get svc -n {company}-{env}` for service endpoints
**Common causes**:
- Target service not running
- Wrong service URL in ExternalServices configuration
- Port mismatch (8080 vs 8081)
**Resolution**: Verify service is running and URL matches K8s service name
| Anti-Pattern | Correct Approach |
|---|---|
| Undocumented deployment steps | Step-by-step runbook for every service |
| No rollback procedure | Always document how to rollback |
| Missing verification steps | Verify after each deployment step |
| Generic troubleshooting | Specific symptoms, checks, and resolutions |
# Find existing runbooks
find . -name "*runbook*" -o -name "*deployment*" | grep -i ".md"
# Find deployment scripts
find . -name "deploy*" -type f
# Find K8s manifests
find . -name "*manifest*" -name "*.yaml"
docs/ directory