Azure deploy

From manu14357/zskills · View interactive version

Azure deploy is an AI agent skill from the GitHub repository manu14357/zskills. Plan and execute Azure deployments safely and repeatably for applications and infrastructure. Use this skill when users ask to deploy, publish, release, or provision workloads in Azure. Covers Infrastructure-as-Code, idempotency, health validation, and rollback strategies.

How to use this skill

Skill file

Azure Deploy

Deploy workloads to Azure with a clear, low-risk process aligned with the Well-Architected Framework.

Emphasis on idempotency, repeatable IaC, comprehensive validation, and reversible rollback paths.

Use This Skill When

Context: Deployment Maturity Model

Stage 1: Manual → Portal-only, error-prone, hard to audit

Stage 2: Semi-Automated → Scripts with some IaC, inconsistent across environments

Stage 3: Fully Automated → Declarative IaC, CI/CD, infrastructure versioned ← Target

Stage 4: GitOps → All changes through pull requests, fully auditable, drift detection

Required Inputs

Decision Tree

Is this infrastructure or application code?
├─ Infrastructure → Use Bicep or Terraform (IaC)
└─ Application → Use Azure DevOps or GitHub Actions pipeline

Is this a net-new deployment or an update?
├─ Net-new → Deploy with full validation suite
└─ Update → Blue-green or canary strategy to minimize blast radius

Do you need instant rollback capability?
├─ Yes → Blue-green deployment (dual environments, instant traffic switch)
└─ Acceptable lag → Canary (gradual rollout with monitoring)

Workflow

Phase 1: Pre-Deployment Validation (Shift-left)

  1. Verify prerequisites:
  1. Review IaC and artifacts:
  1. Validate security posture:

Phase 2: Artifact Preparation

  1. Build application:
  1. Build container (if containerized):
  1. Archive IaC:

Phase 3: Deployment Execution

Option A: Declarative (Recommended)

az deployment group create \
  --resource-group $RG \
  --template-file main.bicep \
  --parameters main.bicepparam \
  --mode Incremental

Option B: Terraform

terraform init -backend-config=backend.tfvars
terraform plan -var-file=prod.tfvars -out=tfplan
terraform apply tfplan
  1. Monitor deployment progress:

Phase 4: Post-Deployment Validation

  1. Smoke test:
  1. Integration test:
  1. Security validation:
  1. Compliance check:

Phase 5: Rollback & Recovery

Immediate Rollback (Minutes):

Longer Rollback (Hours):

Full Disaster Recovery:

Output Contract

Return these sections in order:

  1. Deployment Plan Summary
  1. Pre-Deployment Checklist
  1. Deployment Commands or IaC
  1. Post-Deployment Validation Checklist
  1. Rollback Procedure
  1. Risks and Assumptions

Practical Examples

Example 1: Deploy a Container App with Traffic Split (Canary)

1. Deploy new revision to staging slot: 5% traffic
2. Monitor error rate and latency for 10 minutes
3. Shift to 25%, then 50%, then 100% in 10-minute intervals
4. If error spike detected, instant rollback to previous revision

Example 2: Blue-Green Web App Deployment

1. Deploy new version to unused deployment slot (green)
2. Run smoke and integration tests against green slot
3. Swap slots: green becomes production (instant, no downtime)
4. Keep blue slot warm for quick rollback within 1 hour

Example 3: Bicep Deployment with Parameter Overrides

az deployment group create \
  --resource-group myapp-prod \
  --template-file main.bicep \
  --parameters main.bicepparam \
  --parameters location=eastus vmCount=3 \
  --mode Incremental

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.