Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)48k · #3876

azd-deployment

Was er macht

Dieses Tool hilft dir, das Deployment containerisierter Anwendungen auf Azure vorzubereiten und zu überprüfen. Es nutzt Konfigurationsdateien, um festzulegen, wie deine App deployt werden soll, und stellt sicher, dass alles bereit ist, bevor Änderungen vorgenommen werden.

Wann du ihn nutzt

  • ✓Wenn du eine Frontend- und eine Backend-Anwendung auf Azure Container Apps deployen möchtest.
  • ✓Wenn du das Image deiner Anwendung remote in Azure bauen willst.
  • ✓Wenn du Zugriffsrechte (Managed Identity) für deine Anwendung einrichten möchtest.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azd-deployment/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azd-deployment/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Ich möchte meine Web-App mit einem Backend auf Azure Container Apps deployen, mit Bicep für die Infrastruktur und einem remote gebauten Image.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Du konfigurierst eine Datei namens azure.yaml, die deine Anwendung und das gewünschte Deployment beschreibt. Danach nutzt du Befehle wie „azd up“, um alles auf Azure vorzubereiten und zu deployen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Azure Developer CLI (azd) Container Apps Deployment

Deploy containerized frontend + backend applications to Azure Container Apps with remote builds, managed identity, and idempotent infrastructure.

Authorization and preparation

Inspect existing project files and the active tenant, subscription and environment first. Provisioning, deployment, role assignments and hook execution change cloud resources and may incur costs. Prepare the exact diff, target, estimated impact and rollback plan; execute only when the user explicitly authorizes that deployment. Do not print environment values or credentials into shared logs.

Quick Start

# Initialize and deploy
azd auth login
azd init                    # Creates azure.yaml and .azure/ folder
azd env new <env-name>      # Create environment (dev, staging, prod)
azd up                      # Provision infra + build + deploy

Core File Structure

project/
├── azure.yaml              # azd service definitions + hooks
├── infra/
│   ├── main.bicep          # Root infrastructure module
│   ├── main.parameters.json # Parameter injection from env vars
│   └── modules/
│       ├── container-apps-environment.bicep
│       └── container-app.bicep
├── .azure/
│   ├── config.json         # Default environment pointer
│   └── <env-name>/
│       ├── .env            # Environment-specific values (azd-managed)
│       └── config.json     # Environment metadata
└── src/
    ├── frontend/Dockerfile
    └── backend/Dockerfile

azure.yaml Configuration

Minimal Configuration

name: azd-deployment
services:
  backend:
    project: ./src/backend
    language: python
    host: containerapp
    docker:
      path: ./Dockerfile
      remoteBuild: true

Full Configuration with Hooks

name: azd-deployment
metadata:
  template: my-project@1.0.0

infra:
  provider: bicep
  path: ./infra

azure:
  location: eastus2

services:
  frontend:
    project: ./src/frontend
    language: ts
    host: containerapp
    docker:
      path: ./Dockerfile
      context: .
      remoteBuild: true

  backend:
    project: ./src/backend
    language: python
    host: containerapp
    docker:
      path: ./Dockerfile
      context: .
      remoteBuild: true

hooks:
  preprovision:
    shell: sh
    run: |
      echo "Before provisioning..."
      
  postprovision:
    shell: sh
    run: |
      echo "After provisioning - set up RBAC, etc."
      
  postdeploy:
    shell: sh
    run: |
      echo "Frontend: ${SERVICE_FRONTEND_URI}"
      echo "Backend: ${SERVICE_BACKEND_URI}"

Key azure.yaml Options

Option Description
remoteBuild: true Build images in Azure Container Registry (recommended)
context: . Docker build context relative to project path
host: containerapp Deploy to Azure Container Apps
infra.provider: bicep Use Bicep for infrastructure

Environment Variables Flow

Three-Level Configuration

  1. Local .env - For local development only
  2. .azure/<env>/.env - azd-managed, auto-populated from Bicep outputs
  3. main.parameters.json - Maps env vars to Bicep parameters

Parameter Injection Pattern

// infra/main.parameters.json
{
  "parameters": {
    "environmentName": { "value": "${AZURE_ENV_NAME}" },
    "location": { "value": "${AZURE_LOCATION=eastus2}" },
    "azureOpenAiEndpoint": { "value": "${AZURE_OPENAI_ENDPOINT}" }
  }
}

Syntax: ${VAR_NAME} or ${VAR_NAME=default_value}

Setting Environment Variables

# Set for current environment
azd env set AZURE_OPENAI_ENDPOINT "https://my-openai.openai.azure.com"
azd env set AZURE_SEARCH_ENDPOINT "https://my-search.search.windows.net"

# Set during init
azd env new prod
azd env set AZURE_OPENAI_ENDPOINT "..." 

Bicep Output → Environment Variable

// In main.bicep - outputs auto-populate .azure/<env>/.env
output SERVICE_FRONTEND_URI string = frontend.outputs.uri
output SERVICE_BACKEND_URI string = backend.outputs.uri
output BACKEND_PRINCIPAL_ID string = backend.outputs.principalId

Deployment Repeatability

Reconciliation and revision changes

  1. Bicep is declarative - Resources reconcile to desired state
  2. Remote builds tag uniquely - Image tags include deployment timestamp
  3. ACR reuses layers - Only changed layers upload

Preserve unmanaged changes deliberately

…

Häufige Fragen

Was bedeutet „remoteBuild: true“?

Es bedeutet, dass das Image deiner Anwendung direkt in Azure gebaut wird und nicht auf deinem lokalen Computer. Das ist in der Regel schneller und effizienter.

Was sind Hooks?

Hooks sind Befehle, die du so einrichten kannst, dass sie vor oder nach bestimmten Deployment-Schritten laufen, etwa bevor die Infrastruktur bereitgestellt wird oder nachdem die Anwendung deployt wurde.

Wie verwaltet azd Umgebungskonfigurationen?

azd nutzt Dateien wie `.env` und `main.parameters.json`, um Konfigurationen für jede Umgebung zu verwalten (etwa Entwicklung, Test oder Produktion), damit die richtigen Informationen verwendet werden.

Details

Originalbeschreibung des Autors

Prepare and verify authorized Azure Container Apps deployments with azd. Use for azure.yaml, Bicep, remote builds, managed identity and post-deploy checks.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#3876
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills