Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
216160a
fixed app insights logging issue
AjitPadhi-Microsoft Mar 3, 2026
a8b2519
requirement file updated
AjitPadhi-Microsoft Mar 3, 2026
18dfa2f
updated logging config
AjitPadhi-Microsoft Mar 3, 2026
ada9183
updated logging config
AjitPadhi-Microsoft Mar 9, 2026
8f12f49
updated logging
AjitPadhi-Microsoft Mar 9, 2026
0b31416
updated logging changes
AjitPadhi-Microsoft Mar 9, 2026
b6c3775
updated loggings
AjitPadhi-Microsoft Mar 11, 2026
d812896
added exclude urls
AjitPadhi-Microsoft Mar 11, 2026
3a702f9
updated app logging
AjitPadhi-Microsoft Mar 12, 2026
8da20ea
Updated event config
AjitPadhi-Microsoft Mar 13, 2026
b3eb6ba
Merge remote-tracking branch 'origin/dev' into PSL-US-35960
AjitPadhi-Microsoft Mar 13, 2026
2a02601
updated app code
AjitPadhi-Microsoft Mar 13, 2026
3bede32
Updated event tracking
AjitPadhi-Microsoft Mar 13, 2026
8cfe8ef
Added custom config
AjitPadhi-Microsoft Mar 16, 2026
9a256c3
Refactor Azure parameters and update API versions across Bicep modules
Pavan-Microsoft Mar 17, 2026
3ce0b25
fix: use platform-specific shell setting for subprocess calls in post…
Pavan-Microsoft Mar 17, 2026
2ca3559
fix: update subprocess shell handling for cross-platform compatibility
Pavan-Microsoft Mar 17, 2026
d723ef3
fix: update log analytics workspace condition to include existing log…
Pavan-Microsoft Mar 17, 2026
eb06e0d
fix: update dependency condition for log analytics workspace in Bicep…
Pavan-Microsoft Mar 17, 2026
bef888a
reverted custom logging
AjitPadhi-Microsoft Mar 17, 2026
7b3a4ae
refactor: Azure parameters and update API versions across Bicep modul…
Avijit-Microsoft Mar 17, 2026
6badeb4
Revert "reverted custom logging"
AjitPadhi-Microsoft Mar 17, 2026
e9af432
Merge remote-tracking branch 'origin/dev' into PSL-US-35960
AjitPadhi-Microsoft Mar 18, 2026
2a8abee
updated logging
AjitPadhi-Microsoft Mar 18, 2026
a2a162a
fix: update orchestrator module import and references in test cases
Kanchan-Microsoft Mar 18, 2026
6a15775
edit
Kanchan-Microsoft Mar 18, 2026
31034ac
Merge pull request #782 from microsoft/main
Avijit-Microsoft Mar 19, 2026
4c66aa8
Merge pull request #781 from microsoft/code-quality
Roopan-Microsoft Mar 19, 2026
2c025cb
fix: update rollup and minimatch to resolve high-severity Dependabot …
Shubhangi-Microsoft Mar 19, 2026
015461a
fixed the copilot review comments
Ragini-Microsoft Mar 19, 2026
41240f4
fix: update rollup and minimatch to resolve alerts
Avijit-Microsoft Mar 19, 2026
4e513f0
fix: copilot review comments fixed
Avijit-Microsoft Mar 19, 2026
ed03fe7
Updated azure.yaml file to exclude the 1.23.9 azd version
AjitPadhi-Microsoft Mar 25, 2026
4fc30ed
updated azure file
AjitPadhi-Microsoft Mar 25, 2026
9254d87
Merge pull request #753 from microsoft/PSL-US-35960
Roopan-Microsoft Mar 25, 2026
74af50b
added model deployment module for existing AI services
Ragini-Microsoft Mar 25, 2026
ba01ec0
fix: added model deployment module for existing AI services
Avijit-Microsoft Mar 26, 2026
47e087c
Merge pull request #789 from microsoft/PSL-US-37718
Prajwal-Microsoft Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ USE_FOUNDRY=false
AZURE_AI_PROJECT_ENDPOINT=

# Image model deployment name in Foundry (e.g., gpt-image-1-mini)
AZURE_AI_IMAGE_DEPLOYMENT=gpt-image-1-mini
AZURE_AI_IMAGE_MODEL_DEPLOYMENT=gpt-image-1-mini

# =============================================================================
# Azure OpenAI Configuration
Expand Down
211 changes: 211 additions & 0 deletions docs/AVMPostDeploymentGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# AVM Post Deployment Guide

> **📋 Note**: This guide is specifically for post-deployment steps after using the AVM template. For complete deployment from scratch, see the main [Deployment Guide](./DEPLOYMENT.md).

---

This document provides guidance on post-deployment steps after deploying the Content Generation solution accelerator from the [AVM (Azure Verified Modules) repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/content-generation).

## Overview

After successfully deploying the Content Generation Solution Accelerator using the AVM template, you'll need to complete some configuration steps to make the solution fully operational. The AVM deployment provisions all required Azure resources, and the post-deployment process will upload sample data, create search indexes, and verify the application is ready to use.

---

## Prerequisites

Before starting the post-deployment process, ensure you have the following:

### 1. Azure Subscription & Permissions

You need access to an [Azure subscription](https://azure.microsoft.com/free/) with permissions to:
- Create resource groups and resources
- Create app registrations
- Assign roles at the resource group level (Contributor + RBAC)

📖 Follow the steps in [Azure Account Set Up](./AzureAccountSetUp.md) for detailed instructions.

### 2. Deployed Infrastructure

A successful Content Generation solution accelerator deployment from the [AVM repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/content-generation).

The deployment should have created the following resources:
- Azure App Service (frontend web app)
- Azure Container Instance (backend API)
- Azure AI Foundry (AI orchestration)
- Azure OpenAI Service (GPT and Image models)
- Azure Cosmos DB (product catalog and conversations)
- Azure Blob Storage (product images and generated images)
- Azure AI Search (product search index)
- User Assigned Managed Identity
- App Service Plan

**Optional resources** (depending on deployment parameters):
- Log Analytics Workspace and Application Insights (if monitoring is enabled)
- Virtual Network, Private DNS Zones, and Private Endpoints (if private networking is enabled)
- Azure Bastion and Jumpbox VM (if enabled for private network administration)

**Important:** The deployment references an **existing Azure Container Registry** (specified via the `acrName` parameter) that must contain pre-built container images (`content-gen-app` and `content-gen-api`). The ACR is not created by this deployment.

### 3. Required Tools

Ensure the following tools are installed on your machine:

| Tool | Version | Download Link |
|------|---------|---------------|
| PowerShell | v7.0+ | [Install PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.5) |
| Azure CLI | v2.50+ | [Install Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) |
| Python | 3.11+ | [Download Python](https://www.python.org/downloads/) |
| Git | Latest | [Download Git](https://git-scm.com/downloads) |

#### Important Note for PowerShell Users

If you encounter issues running PowerShell scripts due to execution policy restrictions, you can temporarily adjust the `ExecutionPolicy` by running the following command in an elevated PowerShell session:

```powershell
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
```

This will allow the scripts to run for the current session without permanently changing your system's policy.

---

## Post-Deployment Steps

### Step 1: Clone the Repository

Clone this repository to access the post-deployment scripts and sample data:

```powershell
git clone https://github.com/microsoft/content-generation-solution-accelerator.git
cd content-generation-solution-accelerator
```

---

### Step 2: Run the Post-Deployment Script

The AVM deployment provisions the Azure infrastructure but does NOT include automated post-deployment hooks. You need to manually run the post-deployment script to upload sample data and create search indexes.

> **📝 Note**: Unlike `azd up` deployments which run post-deployment hooks automatically via `azure.yaml`, AVM deployments require manual execution of the post-deployment script.

#### 2.1 Login to Azure

```shell
az login
```

> 💡 **Tip**: If using VS Code Web or environments without browser access, use device code authentication:
> ```shell
> az login --use-device-code
> ```

#### 2.2 Set Up Environment

Navigate to the repository root directory and create a Python virtual environment:

**For Windows (PowerShell):**
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r ./scripts/requirements-post-deploy.txt
```

**For Linux/Mac (bash):**
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r ./scripts/requirements-post-deploy.txt
```

#### 2.3 Execute the Post-Deployment Script

Run the post-deployment script with your resource group name. The script will automatically retrieve resource names from the Azure deployment outputs.

**For Windows (PowerShell):**
```powershell
python ./scripts/post_deploy.py -g <your-resource-group-name> --skip-tests
```

**For Linux/Mac (bash):**
```bash
python3 ./scripts/post_deploy.py -g <your-resource-group-name> --skip-tests
```

**Example:**
```powershell
python ./scripts/post_deploy.py -g rg-contentgen-prod --skip-tests
```

> ⚠️ **Important**: The script uses Azure CLI authentication and will automatically discover resource names from deployment outputs. Ensure you're logged in with `az login` before running.

**How it works:**
- The script queries the deployment outputs using the resource group name
- It automatically retrieves App Service, Storage Account, Cosmos DB, and AI Search names
- No need to manually specify individual resource names

**Alternative:** If you prefer to specify resources explicitly, you can use environment variables or command-line arguments:
```powershell
# Using environment variables
$env:RESOURCE_GROUP_NAME = "rg-contentgen-prod"
$env:APP_SERVICE_NAME = "app-contentgen-abc123"
$env:AZURE_BLOB_ACCOUNT_NAME = "stcontentgenabc123"
$env:COSMOSDB_ACCOUNT_NAME = "cosmos-contentgen-abc123"
$env:AI_SEARCH_SERVICE_NAME = "search-contentgen-abc123"
python ./scripts/post_deploy.py --skip-tests
```

The script will:
- Upload sample product data to Cosmos DB
- Upload sample product images to Blob Storage
- Create and populate the Azure AI Search index
- Verify all connections and configurations

---

### Step 3: Access the Application

1. Navigate to the [Azure Portal](https://portal.azure.com)
2. Open the **resource group** created during deployment
3. Locate the **App Service** (name typically starts with `app-contentgen-`)
4. Copy the **URL** from the Overview page (format: `https://app-contentgen-<unique-id>.azurewebsites.net`)
5. Open the URL in your browser to access the application

> 📝 **Note**: It may take a few minutes for the App Service to start up after deployment.

---

### Step 4: Configure Authentication (Optional)

If you want to enable authentication for your application, follow the [App Authentication Guide](./AppAuthentication.md).

> **⚠️ Important**: Authentication changes can take up to 10 minutes to propagate.

---

### Step 5: Verify Data Processing

Confirm your deployment is working correctly:

| Check | Location | How to Verify |
|-------|----------|---------------|
| ✅ Sample data uploaded | Azure Cosmos DB | Navigate to Cosmos DB → Data Explorer → Check `products` and `conversations` containers |
| ✅ Sample images uploaded | Azure Blob Storage | Navigate to Storage Account → Containers → Check `product-images` container |
| ✅ AI Search index created | Azure AI Search | Navigate to AI Search → Indexes → Verify `products-index` exists and has documents |
| ✅ Application loads | App Service URL | Open the web app URL and verify the welcome screen appears |

---

## Getting Started

To learn how to use the Content Generation solution and try sample workflows, see the [Sample Workflow](./DEPLOYMENT.md#sample-workflow) section in the main Deployment Guide.

---

## Clean Up Resources

If you need to delete the resources after testing or a failed deployment:

Follow the steps in [Delete Resource Group](./DeleteResourceGroup.md) to clean up all deployed resources.

> ⚠️ **Warning**: Deleting the resource group will permanently delete all resources and data. This action cannot be undone.
22 changes: 11 additions & 11 deletions docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ By default this template will use the environment name as the prefix to prevent
| -------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------------------------------- |
| `AZURE_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for resource deployment. Allowed: `australiaeast`, `centralus`, `eastasia`, `eastus`, `eastus2`, `japaneast`, `northeurope`, `southeastasia`, `swedencentral`, `uksouth`, `westus`, `westus3`. |
| `AZURE_ENV_NAME` | string | `contentgen` | Sets the environment name prefix for all Azure resources (3-15 characters). |
| `secondaryLocation` | string | `uksouth` | Specifies a secondary Azure region for database creation. |
| `gptModelName` | string | `gpt-5.1` | Specifies the GPT model name to deploy. |
| `gptModelVersion` | string | `2025-11-13` | Sets the GPT model version. |
| `gptModelDeploymentType` | string | `GlobalStandard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
| `gptModelCapacity` | integer | `150` | Sets the GPT model token capacity (minimum: `10`). |
| `imageModelChoice` | string | `gpt-image-1-mini` | Image model to deploy (allowed: `gpt-image-1-mini`, `gpt-image-1.5`, `none`). |
| `imageModelCapacity` | integer | `1` | Sets the image model deployment capacity in RPM (minimum: `1`). |
| `azureOpenaiAPIVersion` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI service. |
| `SECONDARY_LOCATION` | string | `uksouth` | Specifies a secondary Azure region for database creation. |
| `AZURE_OPENAI_GPT_MODEL` | string | `gpt-5.1` | Specifies the GPT model name to deploy. |
| `GPT_MODEL_VERSION` | string | `2025-11-13` | Sets the GPT model version. |
| `GPT_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
| `GPT_MODEL_CAPACITY` | integer | `150` | Sets the GPT model token capacity (minimum: `10`). |
| `AZURE_OPENAI_IMAGE_MODEL` | string | `gpt-image-1-mini` | Image model to deploy (allowed: `gpt-image-1-mini`, `gpt-image-1.5`, `none`). |
| `IMAGE_MODEL_CAPACITY` | integer | `1` | Sets the image model deployment capacity in RPM (minimum: `1`). |
| `AZURE_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI service. |
| `AZURE_ENV_OPENAI_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for OpenAI resource deployment. |
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `""` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID`| string | `""` | Reuses an existing AI Foundry Project instead of creating a new one. |
Expand All @@ -36,8 +36,8 @@ azd env set <PARAMETER_NAME> <VALUE>

```bash
azd env set AZURE_LOCATION westus2
azd env set gptModelName gpt-5.1
azd env set gptModelDeploymentType Standard
azd env set imageModelChoice gpt-image-1-mini
azd env set AZURE_OPENAI_GPT_MODEL gpt-5.1
azd env set GPT_MODEL_DEPLOYMENT_TYPE Standard
azd env set AZURE_OPENAI_IMAGE_MODEL gpt-image-1-mini
azd env set ACR_NAME contentgencontainerreg
```
2 changes: 1 addition & 1 deletion docs/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ When you start the deployment, most parameters will have **default values**, but
| **GPT Model Version** | The version of the selected GPT model. | 2025-11-13 |
| **OpenAI API Version** | The Azure OpenAI API version to use. | 2025-01-01-preview |
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models** (in thousands). | 150k |
| **Image Model** | Choose from **gpt-image-1-mini, gpt-image-1.5** | gpt-image-1-mini |
| **Image Model** | Choose from **gpt-image-1-mini, gpt-image-1.5** | gpt-image-1-mini |
| **Image Tag** | Docker image tag to deploy. Common values: `latest`, `dev`, `hotfix`. | latest |
| **Existing Log Analytics Workspace** | To reuse an existing Log Analytics Workspace ID. | *(empty)* |
| **Existing Azure AI Foundry Project** | To reuse an existing Azure AI Foundry Project ID instead of creating a new one. | *(empty)* |
Expand Down
6 changes: 3 additions & 3 deletions docs/TECHNICAL_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ See `src/backend/settings.py` for all configuration options. Key settings:
| `AZURE_OPENAI_GPT_MODEL` | GPT model deployment name |
| `AZURE_OPENAI_GPT_IMAGE_ENDPOINT` | Azure OpenAI endpoint for GPT image model (if separate) |
| `AZURE_OPENAI_IMAGE_MODEL` | GPT image model deployment name (gpt-image-1-mini) |
| `COSMOS_ENDPOINT` | Azure Cosmos DB endpoint |
| `COSMOS_DATABASE` | Cosmos DB database name |
| `AZURE_STORAGE_ACCOUNT_NAME` | Storage account name |
| `AZURE_COSMOS_ENDPOINT` | Azure Cosmos DB endpoint |
| `AZURE_COSMOS_DATABASE_NAME` | Cosmos DB database name |
| `AZURE_BLOB_ACCOUNT_NAME` | Storage account name |
| `BRAND_*` | Brand guideline parameters |

### Brand Guidelines
Expand Down
Loading
Loading