Skip to content

Commit 075dedd

Browse files
Merge branch 'dev' into azd-local-build
2 parents 7e943a6 + 185aa7b commit 075dedd

File tree

18 files changed

+760
-721
lines changed

18 files changed

+760
-721
lines changed

azure.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ hooks:
1616
Write-Host "Web app URL: "
1717
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
1818
Write-Host "`nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
19-
Write-Host "bash ./infra/scripts/process_sample_data.sh $env:AZURE_RESOURCE_GROUP" -ForegroundColor Cyan
19+
Write-Host "bash ./infra/scripts/process_sample_data.sh" -ForegroundColor Cyan
2020
shell: pwsh
2121
continueOnError: false
2222
interactive: true
@@ -26,7 +26,7 @@ hooks:
2626
echo $WEB_APP_URL
2727
echo ""
2828
echo "Run the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
29-
echo "bash ./infra/scripts/process_sample_data.sh $env:AZURE_RESOURCE_GROUP"
29+
echo "bash ./infra/scripts/process_sample_data.sh"
3030
shell: sh
3131
continueOnError: false
3232
interactive: true

docs/AVMPostDeploymentGuide.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,51 @@
11
# AVM Post Deployment Guide
2+
3+
> **📋 Note**: This guide is specifically for post-deployment steps after using the AVM template. For complete deployment from scratch, see the main [Deployment Guide](./DeploymentGuide.md).
4+
5+
---
6+
27
This document provides guidance on post-deployment steps after deploying the Build Your Own Copilot Accelerator from the [AVM (Azure Verified Modules) repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/build-your-own-copilot).
38

49
## Post Deployment Steps
5-
1. Clone the Repository
6-
First, clone this repository to access the post-deployment scripts:
7-
```bash
8-
git clone https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator.git
9-
```
10-
```bash
11-
cd Build-your-own-copilot-Solution-Accelerator
12-
```
1310

14-
2. Import Sample Data -Run bash command printed in the terminal. The bash command will look like the following:
11+
### 1. Clone the Repository
12+
First, clone this repository to access the post-deployment scripts:
13+
14+
```bash
15+
git clone https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator.git
16+
cd Build-your-own-copilot-Solution-Accelerator
17+
```
18+
19+
### 2. Import Sample Data
20+
21+
**Choose the appropriate command based on your deployment method:**
22+
23+
**If you deployed using custom templates, ARM/Bicep deployments, or `az deployment group` commands:**
24+
```bash
25+
bash ./infra/scripts/process_sample_data.sh <your-resource-group-name>
26+
```
27+
> **Note**: Replace `<your-resource-group-name>` with the actual name of the resource group containing your deployed Azure resources.
28+
29+
> **💡 Tip**: If the deployment metadata does not exist in Azure or has been deleted, the script will prompt you to manually enter the required configuration values.
30+
31+
**If you deployed using `azd up` command:**
32+
```bash
33+
bash ./infra/scripts/process_sample_data.sh
34+
```
35+
> **Note**: The script will automatically take required values from your `azd` environment.
36+
37+
> **💡 Tip**: Since this guide is for AVM deployments, you'll most likely use the first command with your resource group name.
38+
39+
### 3. Configure Authentication
1540

16-
```bash
17-
bash ./infra/scripts/process_sample_data.sh <resourceGroupName>
18-
```
19-
If the deployment does not exist or has been deleted – The script will prompt you to manually enter the required values
41+
Follow the steps in [App Authentication](./AppAuthentication.md) to configure authentication in App Service.
2042

21-
3. Add Authentication Provider
43+
> **Note**: Authentication changes can take up to 10 minutes to propagate.
2244
23-
Follow steps in [App Authentication](https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator/blob/main/docs/AppAuthentication.md) to configure authentication in app service.
24-
>Note that Authentication changes can take up to 10 minutes.
45+
### 4. Troubleshooting: Cleaning Up After a Failed Deployment
2546

26-
4. Deleting Resources After a Failed Deployment
47+
If your deployment fails and you need to clean up resources, follow the steps in [Delete Resource Group](./DeleteResourceGroup.md).
2748

28-
Follow steps in [Delete Resource Group](https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator/blob/main/docs/DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.
49+
---
2950

30-
By following these steps, youll ensure a smooth transition from deployment to hands-on usage.
51+
By following these steps, you'll ensure a smooth transition from deployment to hands-on usage.

docs/DeploymentGuide.md

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ You can run this solution using [GitHub Codespaces](https://docs.github.com/en/c
8686
</details>
8787

8888
<details>
89-
<summary><b>Deploy in VS Code</b></summary>
89+
<summary><b>Deploy in VS Code Dev Containers</b></summary>
9090

9191
### VS Code Dev Containers
9292

@@ -136,26 +136,7 @@ Consider the following settings during your deployment to modify specific settin
136136
<details>
137137
<summary><b>Configurable Deployment Settings</b></summary>
138138

139-
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](CustomizingAzdParameters.md):
140-
141-
142-
| **Setting** | **Description** | **Default value** |
143-
| ------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------ |
144-
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | `azdtemp` |
145-
| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | `eastus2` |
146-
| **Deployment Type** | Select from a drop-down list (`Standard`, `GlobalStandard`). | `GlobalStandard` |
147-
| **GPT Model** | Azure OpenAI GPT model to deploy. | `gpt-4o-mini` |
148-
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. Choose based on Azure OpenAI quota. | `30` |
149-
| **Embedding Model** | OpenAI embedding model used for vector similarity. | `text-embedding-ada-002` |
150-
| **Embedding Model Capacity** | Set the capacity for **embedding models**. Choose based on usage and quota. | `80` |
151-
| **Image Tag** | The version of the Docker image to use (e.g., `latest_waf`, `dev`, `hotfix`). | `latest_waf` |
152-
| **Azure OpenAI API Version** | Set the API version for OpenAI model deployments. | `2025-04-01-preview` |
153-
| **AZURE_LOCATION** | Sets the Azure region for resource deployment. | `<User selects during deployment>` |
154-
| **Existing Log Analytics Workspace** | To reuse an existing Log Analytics Workspace ID instead of creating a new one. | *(empty)* |
155-
| **Existing AI Foundry Project Resource ID** | To reuse an existing AI Foundry Project Resource ID instead of creating a new one. | *(empty)* |
156-
157-
158-
139+
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](CustomizingAzdParameters.md)
159140

160141
</details>
161142

@@ -264,22 +245,35 @@ Continue with the [deploying steps](#deploying-with-azd).
264245
265246
## Post Deployment Steps
266247
267-
1. **Import Sample Data**
268-
-Run bash command printed in the terminal. The bash command will look like the following:
269-
```shell
270-
bash ./infra/scripts/process_sample_data.sh
271-
```
272-
if you don't have azd env then you need to pass parameters along with the command. Then the command will look like the following:
273-
```shell
274-
bash ./infra/scripts/process_sample_data.sh <resourceGroupName> <cosmosDbAccountName> <storageAccount> <storageContainerName> <keyvaultName> <sqlServerName> <sqlDatabaseName> <webAppUserManagedIdentityClientId> <webAppUserManagedIdentityDisplayName> <aiFoundryResourceName> <aiSearchResourceName>
275-
```
248+
### 1. Import Sample Data
249+
250+
**Choose the appropriate command based on your deployment method:**
251+
252+
**If you deployed using `azd up` command:**
253+
```bash
254+
bash ./infra/scripts/process_sample_data.sh
255+
```
256+
> **Note**: The script will automatically take required values from your `azd` environment.
257+
258+
**If you deployed using custom templates, ARM/Bicep deployments, or `az deployment group` commands:**
259+
```bash
260+
bash ./infra/scripts/process_sample_data.sh <your-resource-group-name>
261+
```
262+
> **Note**: Replace `<your-resource-group-name>` with the actual name of the resource group containing your deployed Azure resources.
263+
264+
> **💡 Tip**: If the deployment metadata does not exist in Azure or has been deleted, the script will prompt you to manually enter the required configuration values.
265+
266+
> **💡 Tip**: Since this guide is for azd deployment, you'll most likely use the first command without resource group name.
267+
268+
### 2. Configure Authentication
269+
270+
Follow the steps in [App Authentication](./AppAuthentication.md) to configure authentication in App Service.
276271

277-
2. **Add Authentication Provider**
278-
- Follow steps in [App Authentication](./AppAuthentication.md) to configure authentication in app service. Note that Authentication changes can take up to 10 minutes.
272+
> **Note**: Authentication changes can take up to 10 minutes to propagate.
279273

280-
3. **Deleting Resources After a Failed Deployment**
274+
### 3. Troubleshooting: Cleaning Up After a Failed Deployment
281275

282-
- Follow steps in [Delete Resource Group](DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.
276+
If your deployment fails and you need to clean up resources, follow the steps in [Delete Resource Group](./DeleteResourceGroup.md).
283277

284278
## Environment configuration for local development & debugging
285279
> Set APP_ENV in your .env file to control Azure authentication. Set the environment variable to dev to use Azure CLI credentials, or to prod to use Managed Identity for production. **Ensure you're logged in via az login when using dev in local**.

docs/SampleQuestions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
To help you get started, here are some **Sample Prompts** you can ask after selecting the **Karen Berg** client:
44

5+
> _Note: Average response time is 08-30 seconds._ <br>
6+
57
1. Click on **Karen Berg** client.
68
2. Ask the following questions:
79
- What were Karen's concerns during our last meeting?

infra/main.bicep

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ param gptModelVersion string = '2024-07-18'
3333
@description('Optional. Version of the GPT model to deploy.')
3434
param embeddingModelVersion string = '2'
3535

36-
@description('Optional. API version for the Azure OpenAI service.')
37-
param azureOpenaiAPIVersion string = '2025-04-01-preview'
36+
@description('Optional. API version for the Azure AI Services.')
37+
param azureAIServicesAPIVersion string = '2025-04-01-preview'
3838

3939
@minValue(10)
4040
@description('Optional. Capacity of the GPT deployment:')
@@ -494,7 +494,6 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable
494494
// ========== Private DNS Zones ========== //
495495
var privateDnsZones = [
496496
'privatelink.cognitiveservices.azure.com'
497-
'privatelink.openai.azure.com'
498497
'privatelink.services.ai.azure.com'
499498
'privatelink.azurewebsites.net'
500499
'privatelink.blob.${environment().suffixes.storage}'
@@ -509,22 +508,20 @@ var privateDnsZones = [
509508
// DNS Zone Index Constants
510509
var dnsZoneIndex = {
511510
cognitiveServices: 0
512-
openAI: 1
513-
aiServices: 2
514-
appService: 3
515-
storageBlob: 4
516-
storageQueue: 5
517-
storageFile: 6
518-
cosmosDB: 7
519-
keyVault: 8
520-
sqlServer: 9
521-
searchService: 10
511+
aiServices: 1
512+
appService: 2
513+
storageBlob: 3
514+
storageQueue: 4
515+
storageFile: 5
516+
cosmosDB: 6
517+
keyVault: 7
518+
sqlServer: 8
519+
searchService: 9
522520
}
523521

524522
// List of DNS zone indices that correspond to AI-related services.
525523
var aiRelatedDnsZoneIndices = [
526524
dnsZoneIndex.cognitiveServices
527-
dnsZoneIndex.openAI
528525
dnsZoneIndex.aiServices
529526
]
530527

@@ -613,11 +610,11 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
613610
}
614611
{
615612
name: 'AZURE-OPENAI-PREVIEW-API-VERSION'
616-
value: azureOpenaiAPIVersion
613+
value: azureAIServicesAPIVersion
617614
}
618615
{
619616
name: 'AZURE-OPENAI-ENDPOINT'
620-
value: aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
617+
value: aiFoundryAiServices.outputs.endpoint
621618
}
622619
{
623620
name: 'AZURE-OPENAI-EMBEDDING-MODEL'
@@ -631,6 +628,10 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
631628
name: 'AZURE-SEARCH-ENDPOINT'
632629
value: 'https://${aiSearchName}.search.windows.net'
633630
}
631+
{
632+
name: 'AZURE-AI-AGENT-ENDPOINT'
633+
value: aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
634+
}
634635
]
635636
enableTelemetry: enableTelemetry
636637
}
@@ -733,10 +734,6 @@ module aiFoundryAiServices 'modules/ai-services.bicep' = if (aiFoundryAIservices
733734
name: 'ai-services-dns-zone-cognitiveservices'
734735
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.cognitiveServices]!.outputs.resourceId
735736
}
736-
{
737-
name: 'ai-services-dns-zone-openai'
738-
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.openAI]!.outputs.resourceId
739-
}
740737
{
741738
name: 'ai-services-dns-zone-aiservices'
742739
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.aiServices]!.outputs.resourceId
@@ -1066,7 +1063,8 @@ module webServerFarm 'br/public:avm/res/web/serverfarm:0.5.0' = {
10661063
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : null
10671064
// WAF aligned configuration for Scalability
10681065
skuName: enableScalability || enableRedundancy ? 'P1v3' : 'B3'
1069-
skuCapacity: enableScalability ? 3 : 1
1066+
// skuCapacity: enableScalability ? 3 : 1
1067+
skuCapacity: 1 // skuCapacity set to 1 (not 3) due to multiple agents created per type during WAF deployment
10701068
// WAF aligned configuration for Redundancy
10711069
zoneRedundant: enableRedundancy ? true : false
10721070
}
@@ -1110,20 +1108,20 @@ module webSite 'modules/web-sites.bicep' = {
11101108
AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn
11111109
AZURE_OPENAI_RESOURCE: aiFoundryAiServices.outputs.name
11121110
AZURE_OPENAI_MODEL: gptModelName
1113-
AZURE_OPENAI_ENDPOINT: aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1111+
AZURE_OPENAI_ENDPOINT: aiFoundryAiServices.outputs.endpoint
11141112
AZURE_OPENAI_TEMPERATURE: azureOpenAITemperature
11151113
AZURE_OPENAI_TOP_P: azureOpenAITopP
11161114
AZURE_OPENAI_MAX_TOKENS: azureOpenAIMaxTokens
11171115
AZURE_OPENAI_STOP_SEQUENCE: azureOpenAIStopSequence
11181116
AZURE_OPENAI_SYSTEM_MESSAGE: azureOpenAISystemMessage
1119-
AZURE_OPENAI_PREVIEW_API_VERSION: azureOpenaiAPIVersion
1117+
AZURE_OPENAI_PREVIEW_API_VERSION: azureAIServicesAPIVersion
11201118
AZURE_OPENAI_STREAM: azureOpenAIStream
11211119
AZURE_SEARCH_QUERY_TYPE: azureSearchQueryType
11221120
AZURE_SEARCH_VECTOR_COLUMNS: azureSearchVectorFields
11231121
AZURE_SEARCH_PERMITTED_GROUPS_COLUMN: azureSearchPermittedGroupsField
11241122
AZURE_SEARCH_STRICTNESS: azureSearchStrictness
11251123
AZURE_OPENAI_EMBEDDING_NAME: embeddingModel
1126-
AZURE_OPENAI_EMBEDDING_ENDPOINT : aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1124+
AZURE_OPENAI_EMBEDDING_ENDPOINT : aiFoundryAiServices.outputs.endpoint
11271125
SQLDB_SERVER: sqlServerFqdn
11281126
SQLDB_DATABASE: sqlDbName
11291127
USE_INTERNAL_STREAM: useInternalStream
@@ -1139,7 +1137,7 @@ module webSite 'modules/web-sites.bicep' = {
11391137
USE_AI_PROJECT_CLIENT: useAIProjectClientFlag
11401138
AZURE_AI_AGENT_ENDPOINT: aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
11411139
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME: gptModelName
1142-
AZURE_AI_AGENT_API_VERSION: azureOpenaiAPIVersion
1140+
AZURE_AI_AGENT_API_VERSION: azureAIServicesAPIVersion
11431141
AZURE_SEARCH_CONNECTION_NAME: aiSearchName
11441142
AZURE_CLIENT_ID: userAssignedIdentity.outputs.clientId
11451143
}
@@ -1344,8 +1342,8 @@ output APPLICATIONINSIGHTS_CONNECTION_STRING string = enableMonitoring
13441342
? applicationInsights!.outputs.connectionString
13451343
: ''
13461344

1347-
@description('The API version used for the Azure AI Agent service.')
1348-
output AZURE_AI_AGENT_API_VERSION string = azureOpenaiAPIVersion
1345+
@description('The API version used for the Azure AI Agent service.')
1346+
output AZURE_AI_AGENT_API_VERSION string = azureAIServicesAPIVersion
13491347

13501348
@description('The endpoint URL of the Azure AI Agent project.')
13511349
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
@@ -1372,13 +1370,13 @@ output AZURE_COSMOSDB_DATABASE string = cosmosDbDatabaseName
13721370
output AZURE_COSMOSDB_ENABLE_FEEDBACK string = azureCosmosDbEnableFeedback
13731371

13741372
@description('The endpoint URL for the Azure OpenAI Embedding model.')
1375-
output AZURE_OPENAI_EMBEDDING_ENDPOINT string = aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1373+
output AZURE_OPENAI_EMBEDDING_ENDPOINT string = aiFoundryAiServices.outputs.endpoint
13761374

13771375
@description('The name of the Azure OpenAI Embedding model.')
13781376
output AZURE_OPENAI_EMBEDDING_NAME string = embeddingModel
13791377

13801378
@description('The endpoint URL for the Azure OpenAI service.')
1381-
output AZURE_OPENAI_ENDPOINT string = aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1379+
output AZURE_OPENAI_ENDPOINT string = aiFoundryAiServices.outputs.endpoint
13821380

13831381
@description('The maximum number of tokens for Azure OpenAI responses.')
13841382
output AZURE_OPENAI_MAX_TOKENS string = azureOpenAIMaxTokens
@@ -1387,7 +1385,7 @@ output AZURE_OPENAI_MAX_TOKENS string = azureOpenAIMaxTokens
13871385
output AZURE_OPENAI_MODEL string = gptModelName
13881386

13891387
@description('The preview API version for Azure OpenAI.')
1390-
output AZURE_OPENAI_PREVIEW_API_VERSION string = azureOpenaiAPIVersion
1388+
output AZURE_OPENAI_PREVIEW_API_VERSION string = azureAIServicesAPIVersion
13911389

13921390
@description('The Azure OpenAI resource name.')
13931391
output AZURE_OPENAI_RESOURCE string = aiFoundryAiServices.outputs.name

0 commit comments

Comments
 (0)