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-5.1, GPT-Image-1-mini)
- 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-5.1 (or your chosen model)
- GPT-Image-1-mini (or GPT-Image-1.5 - for image generation)
# Login to Azure
azd auth login
# Login to Azure CLI (required for some post-deployment scripts)
az loginAlternatively, login to Azure using a device code (recommended when using VS Code Web):
az login --use-device-code
# Create a new environment
azd env new <environment-name>
# Example:
azd env new content-gen-devThe infra folder contains the main.bicep Bicep script, which defines all Azure infrastructure components for this solution.
By default, the azd up command uses the main.parameters.json file to deploy the solution. This file is pre-configured for a sandbox environment.
For production deployments, the repository also provides main.waf.parameters.json, which applies a Well-Architected Framework (WAF) aligned configuration. This can be used for Production scenarios.
How to choose your deployment configuration:
-
To use sandbox/dev environment — Use the default
main.parameters.jsonfile. -
To use production configuration:
Before running azd up, copy the contents from the production configuration file to your main parameters file:
- Navigate to the
infrafolder in your project. - Open
main.waf.parameters.jsonin a text editor (like Notepad, VS Code, etc.). - Select all content (Ctrl+A) and copy it (Ctrl+C).
- Open
main.parameters.jsonin the same text editor. - Select all existing content (Ctrl+A) and paste the copied content (Ctrl+V).
- Save the file (Ctrl+S).
NOTE: If you are running the latest azd version (version 1.23.9), please run the following command.
azd config set provision.preflight offazd 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
# Set the resource ID of your existing AI Project
azd env set AZURE_EXISTING_AIPROJECT_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_EXISTING_LOG_ANALYTICS_WORKSPACE_RID "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>"After 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_NAME# 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_AI_SERVICE_LOCATION eastus2Error: az acr build failed
Solution: Check the Dockerfile and ensure all required files are present:
# Manual build for debugging
cd src/app
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-5.1, GPT-Image-1-mini) │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
If you've made local modifications to the code and want to deploy them to Azure, follow these steps to swap the configuration files:
Note: To set up and run the application locally for development, see the Local Development Guide.
In the root directory:
- Rename
azure.yamltoazure_custom2.yaml - Rename
azure_custom.yamltoazure.yaml
In the infra directory:
- Rename
main.biceptomain_custom2.bicep - Rename
main_custom.biceptomain.bicep
Run the deployment command:
azd upNote: These custom files are configured to deploy your local code changes instead of pulling from the GitHub repository.