agentleFS
paulanunes85paulanunes85/three-horizons-accelerator/.github/skills/deploy-orchestration/SKILL.md

deploy-orchestration

Skill2 starsChanged 10 months agoMITView on GitHub

End-to-end platform deployment orchestration — prerequisites, Terraform, Kubernetes verification, and troubleshooting

  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All tools installed (run ./scripts/validate-prerequisites.sh)

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to Use

  • Full platform deployment (new environment)
  • Adding horizons to an existing deployment (e.g., enabling H3)
  • Post-deployment verification
  • Deployment troubleshooting

Prerequisites

  • Azure CLI authenticated (az login)
  • GitHub CLI authenticated (gh auth login)
  • All tools installed (run ./scripts/validate-prerequisites.sh)
  • Environment .tfvars configured

Deployment Phases

Phase 0: Prerequisites

./scripts/validate-prerequisites.sh

Phase 1: Azure Setup

# Login
az login
az account set --subscription "$AZURE_SUBSCRIPTION_ID"

# Register providers
for provider in Microsoft.ContainerService Microsoft.ContainerRegistry \
  Microsoft.KeyVault Microsoft.Network Microsoft.ManagedIdentity \
  Microsoft.Security Microsoft.CognitiveServices Microsoft.Monitor; do
  az provider register --namespace "$provider"
done

Phase 2: Terraform Backend (first time only)

./scripts/setup-terraform-backend.sh \
  --customer-name contoso \
  --environment dev \
  --location brazilsouth

Phase 3: Configuration

# Copy template and edit
cp terraform/terraform.tfvars.example terraform/environments/dev.tfvars
# Edit with your values

# Set sensitive vars
export TF_VAR_azure_subscription_id="..."
export TF_VAR_azure_tenant_id="..."
export TF_VAR_admin_group_id="..."
export TF_VAR_github_org="..."
export TF_VAR_github_token="..."

# Validate
./scripts/validate-config.sh --environment dev

Phase 4: Deploy

cd terraform
terraform init
terraform plan -var-file=environments/dev.tfvars -out=deploy.tfplan
terraform apply deploy.tfplan

Phase 5: Verify

# Get AKS credentials
az aks get-credentials \
  --resource-group "$(terraform output -raw resource_group_name)" \
  --name "$(terraform output -raw aks_cluster_name)"

# Run validation
./scripts/validate-deployment.sh --environment dev

Phase 6: Post-Deployment

# Access ArgoCD
kubectl port-forward svc/argocd-server -n argocd 8080:443
# Visit https://localhost:8080

# Access Grafana
kubectl port-forward svc/prometheus-grafana -n observability 3000:80
# Visit http://localhost:3000

Automated Deployment

# Full deployment
./scripts/deploy-full.sh --environment dev

# Dry run (plan only)
./scripts/deploy-full.sh --environment dev --dry-run

# Deploy specific horizon
./scripts/deploy-full.sh --environment dev --horizon h1

# CI/CD mode (no prompts)
./scripts/deploy-full.sh --environment prod --auto-approve

# Resume after failure
./scripts/deploy-full.sh --environment dev --resume

# Destroy
./scripts/deploy-full.sh --environment dev --destroy

Environment Configurations

EnvironmentModeEstimated CostFeatures
devexpress$50-100/monthMinimal: AKS + ACR + ArgoCD + Observability
stagingstandard$500-1000/monthProduction-like: + Databases + ESO + Defender + AI
prodenterprise$3000+/monthFull HA: + DR + Purview + Runners + RHDH + Cost Mgmt

Deployment Modes

ModeNodesHAGPUBest For
express3 × D4sNoNoDevelopment, testing
standard5 × D4sYesNoProduction workloads
enterprise10 × D8s + workload poolYes (3 zones)OptionalEnterprise, multi-tenant

Troubleshooting

Terraform init fails

# Clear cache and retry
rm -rf terraform/.terraform terraform/.terraform.lock.hcl
terraform init -upgrade

Terraform plan fails with variable errors

# Verify all required vars are set
./scripts/validate-config.sh --environment <env>

AKS cluster unreachable

# Refresh credentials
az aks get-credentials --resource-group <rg> --name <cluster> --overwrite-existing
kubectl get nodes

ArgoCD not starting

kubectl get pods -n argocd
kubectl describe pod -n argocd -l app.kubernetes.io/name=argocd-server
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-server

Rollback

Rollback H3 only

# Disable AI Foundry
# Set enable_ai_foundry = false in tfvars
terraform plan -var-file=environments/<env>.tfvars -out=rollback.tfplan
terraform apply rollback.tfplan

Complete teardown

./scripts/deploy-full.sh --environment <env> --destroy

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.