deploying-to-azure
БесплатноБез исполняемых скриптовНе проверенProvides deployment commands and troubleshooting for Azure Container Apps. Use when running azd commands, deploying containers, debugging deployment failures…
от microsoft-foundry★ 137 звёзд на GitHubОб этом скилле
Deploying to Azure
Subagent Delegation for Deployment Analysis
Container logs and deployment output can be massive (1000+ lines). Delegate to subagent for:
- Analyzing full deployment logs
- Debugging container startup failures
- RBAC permission troubleshooting
- Multi-resource status checks
Delegation Pattern
runSubagent(
prompt: "ANALYSIS task - analyze deployment issue.
**Problem**: [describe the deployment failure]
**Run these commands**:
1. az containerapp logs show --name <app> --resource-group <rg> --tail 200
2. az containerapp show --name <app> --resource-group <rg> --query 'properties.provisioningState'
**Find**:
- Error messages or stack traces
- Resource provisioning failures
- Configuration mismatches
**Return** (max 15 lines):
- Root cause (1-2 sentences)
- Key error lines only (max 5)
- Suggested fix command
Do NOT include full log output.",
description: "Debug: [deployment issue]"
)
When to Delegate vs Inline
| Delegate to Subagent | Keep Inline |
|---|---|
| Full log analysis (100+ lines) | Quick status check |
| Multi-resource debugging | Single az command |
| RBAC permission audit | Container image query |
| Startup failure diagnosis | Provisioning state check |
Quick Commands
| Command | Purpose | Time |
|---|---|---|
azd up |
Full deployment (Entra app + infrastructure + container) | 10-12 min |
azd deploy |
Code-only deployment (Docker rebuild + push) | 3-5 min |
azd provision |
Re-run infrastructure + AI Foundry discovery | 5-7 min |
Deployment Phases
- preprovision → AI Foundry auto-discovery + tenant detection. For CI:
azd env set ENTRA_SERVICE_MANAGEMENT_REFERENCE "<guid>" - provision → Deploy Azure resources via Bicep (infrastructure + Entra app via Microsoft Graph Bicep extension + placeholder container image)
- postprovision → Sets
identifierUrion Entra app + updates redirect URIs + assigns RBAC to AI Foundry + generates local dev config - predeploy → Builds container (local Docker or ACR cloud build)
Implementation:
infra/entra-app.bicep(Entra app registration via Microsoft Graph Bicep extension)deployment/hooks/preprovision.ps1(AI Foundry discovery)deployment/hooks/postprovision.ps1(Entra config + RBAC + local config generation)deployment/hooks/predeploy.ps1(container build + push)deployment/hooks/modules/Get-AIFoundryAgents.ps1(agent discovery via REST)
Docker Multi-Stage Build
Build order: React → .NET → Runtime
- Frontend:
deployment/docker/frontend.Dockerfile - Backend:
deployment/docker/backend.Dockerfile - Custom npm registries: Add
.npmrctofrontend/directory
AI Foundry Resource Configuration
Auto-discovery (azd up): Searches subscription for AI Foundry resources → prompts to select if multiple → discovers agents via REST API → configures RBAC.
Change resource: Run azd provision to re-run discovery, or:
azd env set AI_FOUNDRY_RESOURCE_GROUP <rg>
azd provision
Container Infrastructure
- Health Probes: Liveness (
GET /api/healthevery 30s) and startup (GET /api/healthevery 10s, 5s initial delay) probes configured on the Container App - ACR Pull: Uses a user-assigned managed identity with
AcrPullrole — no admin credentials or secrets. The MI is created inmain-infrastructure.bicepbefore the Container App, avoiding the chicken-and-egg problem. - Resource Defaults: 0.5 vCPU, 1GB RAM, 0-3 replicas (all parameterized in
container-app.bicep)
Troubleshooting
| Issue | Fix |
|---|---|
VITE_ENTRA_SPA_CLIENT_ID not set |
Run azd up to generate .env files |
AI_AGENT_ENDPOINT not configured |
Run azd provision to re-discover AI Foundry |
| No AI Foundry resources found | Create at https://ai.azure.com |
| Multiple AI Foundry resources | Run azd provision to select different resource |
| Container not updating | Check az containerapp logs show --name $app --resource-group $rg |
| Container fails health check | Verify /api/health endpoint returns 200 — check container logs for startup errors |
Useful Commands
# Check current container image
az containerapp show --name $app --resource-group $rg `
--query "properties.template.containers[0].image"
# View container logs
az containerapp logs show --name $app --resource-group $rg --tail 100
# Check RBAC assignments
$principalId = az containerapp show --name $app --resource-group $rg `
--query "identity.principalId" -o tsv
az role assignment list --assignee $principalId
Preprovision Hook Details
File: deployment/hooks/preprovision.ps1
What it does:
- Discovers AI Foundry resources in subscription (prompts if multiple)
- Discovers agents via REST API using
Get-AIFoundryAgents.ps1 - Auto-detects tenant ID
- Sets azd environment variables
Установить deploying-to-azure в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл deploying-to-azure?
Provides deployment commands and troubleshooting for Azure Container Apps. Use when running azd commands, deploying containers, debugging deployment failures, or updating infrastructure in this repository.
Как установить скилл deploying-to-azure?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deploying-to-azure запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic