Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)48k ยท #3876

azd-deployment

Fungsinya

Tool ini membantu menyiapkan dan memverifikasi deployment aplikasi berbasis container ke Azure. Tool ini menggunakan file konfigurasi untuk mendefinisikan cara aplikasi Anda di-deploy dan memastikan semuanya siap sebelum perubahan dilakukan.

Kapan dipakai

  • โœ“Saat Anda ingin men-deploy aplikasi frontend dan backend ke Azure Container Apps.
  • โœ“Saat Anda perlu membangun image aplikasi secara remote di Azure.
  • โœ“Saat Anda ingin mengatur izin akses (managed identity) untuk aplikasi Anda.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azd-deployment/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œSaya ingin men-deploy web app saya beserta backend-nya ke Azure Container Apps, menggunakan Bicep untuk infrastruktur dan membangun image secara remote.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Anda mengonfigurasi file bernama azure.yaml untuk mendeskripsikan aplikasi dan cara men-deploy-nya. Setelah itu, Anda menggunakan perintah seperti 'azd up' untuk menyiapkan dan men-deploy semuanya ke Azure.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

โ€ฆ

Pertanyaan umum

Apa arti 'remoteBuild: true'?

Artinya image aplikasi Anda akan dibangun langsung di Azure, bukan di komputer lokal Anda. Cara ini umumnya lebih cepat dan efisien.

Apa itu 'hooks'?

Hooks adalah perintah yang bisa Anda atur untuk dijalankan sebelum atau sesudah tahap deployment tertentu, misalnya sebelum menyiapkan infrastruktur atau setelah aplikasi di-deploy.

Bagaimana azd mengelola konfigurasi environment?

Azd menggunakan file seperti '.env' dan 'main.parameters.json' untuk mengelola konfigurasi yang spesifik untuk setiap environment (seperti development, testing, atau production), sehingga informasi yang benar yang digunakan.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
48k
Peringkat
#3876
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa