This guide covers deploying the Content Generation Solution Accelerator using Azure Developer CLI (azd).
-
Azure Developer CLI (azd) v1.18.0 or higher
# Install on Linux/macOS curl -fsSL https://aka.ms/install-azd.sh | bash # Install on Windows (PowerShell) powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression" # Verify installation azd version
-
Azure CLI
# Install: https://docs.microsoft.com/cli/azure/install-azure-cli az version -
Node.js v18 or higher (for frontend build)
node --version
-
Python 3.11+ (for post-deployment scripts)
python3 --version
-
An Azure subscription with the following permissions:
- Create Resource Groups
- Deploy Azure AI Services (GPT-4o, DALL-E 3 or GPT-Image-1, Text Embeddings)
- Create Container Registry, Container Instances, App Service
- Create Cosmos DB, Storage Account, AI Search
- Assign RBAC roles
-
Quota: Ensure you have sufficient quota for:
- GPT-4o (or your chosen model)
- DALL-E 3 or GPT-Image-1 (for image generation)
- Text-embedding-3-large
# Login to Azure
azd auth login
# Login to Azure CLI (required for some post-deployment scripts)
az logincd content-gen
# Create a new environment
azd env new <environment-name>
# Example:
azd env new content-gen-devThe deployment has sensible defaults, but you can customize:
# Set the Azure region (default: eastus)
azd env set AZURE_LOCATION swedencentral
# Set AI Services region (must support your models)
azd env set AZURE_ENV_OPENAI_LOCATION swedencentral
# GPT Model configuration
azd env set gptModelName gpt-4o
azd env set gptModelVersion 2024-11-20
azd env set gptModelDeploymentType GlobalStandard
azd env set gptModelCapacity 50
# Image generation model (dalle-3 or gpt-image-1)
azd env set imageModelChoice gpt-image-1
azd env set dalleModelCapacity 1
# Embedding model
azd env set embeddingModel text-embedding-3-large
azd env set embeddingDeploymentCapacity 50
# Azure OpenAI API version
azd env set azureOpenaiAPIVersion 2024-12-01-preview# Enable private networking (VNet integration)
azd env set enablePrivateNetworking true
# Enable monitoring (Log Analytics + App Insights)
azd env set enableMonitoring true
# Enable scalability (auto-scaling, higher SKUs)
azd env set enableScalability true
# Enable redundancy (zone redundancy, geo-replication)
azd env set enableRedundancy trueazd upThis single command will:
- Provision all Azure resources (AI Services, Cosmos DB, Storage, AI Search, App Service, Container Registry)
- Build the Docker container image and push to ACR
- Deploy the container to Azure Container Instances
- Build the frontend (React/TypeScript)
- Deploy the frontend to App Service
- Configure RBAC and Cosmos DB roles
- Upload sample data and create the search index
| Parameter | Default | Description |
|---|---|---|
AZURE_LOCATION |
eastus | Primary Azure region |
azureAiServiceLocation |
eastus | Region for AI Services (must support chosen models) |
gptModelName |
gpt-4o | GPT model for content generation |
gptModelVersion |
2024-11-20 | Model version |
gptModelDeploymentType |
GlobalStandard | Deployment type |
gptModelCapacity |
50 | TPM capacity (in thousands) |
imageModelChoice |
dalle-3 | Image model: dalle-3 or gpt-image-1 |
dalleModelCapacity |
1 | Image model capacity |
embeddingModel |
text-embedding-3-large | Embedding model |
embeddingDeploymentCapacity |
50 | Embedding TPM capacity |
enablePrivateNetworking |
false | Enable VNet and private endpoints |
enableMonitoring |
false | Enable Log Analytics + App Insights |
enableScalability |
false | Enable auto-scaling |
enableRedundancy |
false | Enable zone/geo redundancy |
# Set the resource ID of your existing AI Project
azd env set AZURE_EXISTING_AI_PROJECT_RESOURCE_ID "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.MachineLearningServices/workspaces/<project-name>"# Set the resource ID of your existing Log Analytics workspace
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>"# Set the name of your existing ACR
azd env set ACR_NAME myexistingacrAfter azd up completes, you'll see output like:
===== Deployment Complete =====
Access the web application:
https://app-<env-name>.azurewebsites.net
- Open the Web App URL in your browser
- Sign in with your Azure AD account
- Navigate to the Products page to verify sample data was loaded
- Create a test marketing content document
# View all environment values
azd env get-values
# Get the web app URL
azd env get-value WEB_APP_URL
# Get resource group name
azd env get-value RESOURCE_GROUP_NAMEAfter making code changes:
# Rebuild and redeploy everything
azd up
# Or just redeploy (no infra changes)
azd deploy# Get ACR and ACI names
ACR_NAME=$(azd env get-value ACR_NAME)
ACI_NAME=$(azd env get-value CONTAINER_INSTANCE_NAME)
RG_NAME=$(azd env get-value RESOURCE_GROUP_NAME)
# Build and push new image
az acr build --registry $ACR_NAME --image content-gen-app:latest --file ./src/WebApp.Dockerfile ./src
# Restart ACI to pull new image
az container restart --name $ACI_NAME --resource-group $RG_NAMEcd src/app/frontend
npm install && npm run build
cd ../frontend-server
zip -r frontend-deploy.zip static/ server.js package.json package-lock.json
az webapp deploy \
--resource-group $(azd env get-value RESOURCE_GROUP_NAME) \
--name $(azd env get-value APP_SERVICE_NAME) \
--src-path frontend-deploy.zip \
--type zip# Backend container logs
az container logs \
--name $(azd env get-value CONTAINER_INSTANCE_NAME) \
--resource-group $(azd env get-value RESOURCE_GROUP_NAME) \
--follow
# App Service logs
az webapp log tail \
--name $(azd env get-value APP_SERVICE_NAME) \
--resource-group $(azd env get-value RESOURCE_GROUP_NAME)# Delete all Azure resources and the environment
azd down --purge
# Or just delete resources (keep environment config)
azd down# List environments
azd env list
# Delete an environment
azd env delete <environment-name>Error: InsufficientQuota
Solution: Check your quota in the Azure portal or run:
az cognitiveservices usage list --location <region>Request a quota increase or choose a different region.
Error: The model 'gpt-4o' is not available in region 'westeurope'
Solution: Set a different region for AI Services:
azd env set AZURE_ENV_OPENAI_LOCATION eastusError: az acr build failed
Solution: Check the Dockerfile and ensure all required files are present:
# Manual build for debugging
cd src
docker build -f WebApp.Dockerfile -t content-gen-app:test .Error: az webapp deploy failed
Solution: Ensure the frontend builds successfully:
cd src/app/frontend
npm install
npm run buildError: Authorization failed
Solution: Ensure you have Owner or User Access Administrator role on the subscription.
For more verbose output:
azd up --debugIf deployment gets into a bad state:
# Re-run provisioning
azd provisionWhen enablePrivateNetworking is enabled:
┌─────────────────────────────────────────────────────────────────┐
│ Azure Resource Group │
│ │
│ ┌──────────────────┐ ┌───────────────────────────────┐ │
│ │ App Service │ │ Virtual Network │ │
│ │ (Node.js Proxy) │──────│ ┌─────────────────────────┐ │ │
│ │ │ │ │ Container Instance │ │ │
│ └──────────────────┘ │ │ (Python Backend) │ │ │
│ │ │ └─────────────────────────┘ │ │
│ │ │ │ │
│ ┌───────▼──────────┐ │ ┌─────────────────────────┐ │ │
│ │ Azure AI Search │◄─────│──│ Private Endpoints │ │ │
│ └──────────────────┘ │ └─────────────────────────┘ │ │
│ │ └───────────────────────────────┘ │
│ ┌───────▼──────────┐ │
│ │ Cosmos DB │ │
│ └──────────────────┘ │
│ │ │
│ ┌───────▼──────────┐ ┌───────────────────────────────┐ │
│ │ Storage Account │ │ Azure AI Services │ │
│ └──────────────────┘ │ (GPT-4o, DALL-E, Embeddings) │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘