Skip to content

Commit 67204d7

Browse files
Merge pull request #747 from microsoft/dev
fix: merging dev to main
2 parents 0a22d4c + b0e4265 commit 67204d7

22 files changed

+2152
-257
lines changed

azure_custom.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
2+
3+
name: build-your-own-copilot-solution-accelerator
4+
5+
requiredVersions:
6+
azd: ">= 1.18.0"
7+
8+
metadata:
9+
10+
11+
12+
# Infrastructure configuration
13+
infra:
14+
path: ./infra
15+
module: main
16+
parameters:
17+
solutionName: bs-azdtest
18+
cosmosLocation: eastus2
19+
baseUrl: 'https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator'
20+
21+
services:
22+
webapp:
23+
project: ./src/App
24+
language: py
25+
host: appservice
26+
dist: ./dist
27+
hooks:
28+
prepackage:
29+
windows:
30+
shell: pwsh
31+
run: ../../infra/scripts/package_webapp.ps1
32+
interactive: true
33+
continueOnError: false
34+
posix:
35+
shell: sh
36+
run: bash ../../infra/scripts/package_webapp.sh
37+
interactive: true
38+
continueOnError: false

docs/DeploymentGuide.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ If you're not using one of the above options for opening the project, then you'l
116116
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
117117
- [Git](https://git-scm.com/downloads)
118118
- [Microsoft ODBC Driver 18 for SQL Server](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16)
119-
- [sqlcmd(ODBC-Windows)](https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-utility?view=sql-server-ver16&tabs=odbc%2Cwindows%2Cwindows-support&pivots=cs1-bash#download-and-install-sqlcmd) / [sqlcmd(Linux/Mac)](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver16&tabs=redhat-install)
120119

121120
2. Clone the repository or download the project code via command-line:
122121

@@ -236,6 +235,13 @@ This will rebuild the source code, package it into a container, and push it to t
236235
### 🛠️ Troubleshooting
237236
If you encounter any issues during the deployment process, please refer [troubleshooting](../docs/TroubleShootingSteps.md) document for detailed steps and solutions
238237
238+
## Deploy Your local changes
239+
To deploy your local changes rename the below files.
240+
1. Rename `azure.yaml` to `azure_custom2.yaml` and `azure_custom.yaml` to `azure.yaml`.
241+
2. Go to `infra` directory
242+
- Rename `main.bicep` to `main_custom2.bicep` and `main_custom.bicep` to `main.bicep`.
243+
Continue with the [deploying steps](#deploying-with-azd).
244+
239245
## Post Deployment Steps
240246
241247
### 1. Import Sample Data

infra/main.bicep

Lines changed: 28 additions & 31 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

@@ -553,7 +550,7 @@ module avmPrivateDnsZones 'br/public:avm/res/network/private-dns-zone:0.7.1' = [
553550
]
554551

555552
// ==========Key Vault Module ========== //
556-
var keyVaultName = 'KV-${solutionSuffix}'
553+
var keyVaultName = 'kv-${solutionSuffix}'
557554
module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
558555
name: take('avm.res.key-vault.vault.${keyVaultName}', 64)
559556
params: {
@@ -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
@@ -891,7 +888,7 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
891888
bypass: 'AzureServices'
892889
defaultAction: enablePrivateNetworking ? 'Deny' : 'Allow'
893890
}
894-
allowBlobPublicAccess: enablePrivateNetworking ? true : false
891+
allowBlobPublicAccess: false
895892
publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled'
896893
// Private endpoints for blob and queue
897894
privateEndpoints: enablePrivateNetworking
@@ -1111,20 +1108,20 @@ module webSite 'modules/web-sites.bicep' = {
11111108
AZURE_SEARCH_URL_COLUMN: azureSearchUrlColumn
11121109
AZURE_OPENAI_RESOURCE: aiFoundryAiServices.outputs.name
11131110
AZURE_OPENAI_MODEL: gptModelName
1114-
AZURE_OPENAI_ENDPOINT: aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1111+
AZURE_OPENAI_ENDPOINT: aiFoundryAiServices.outputs.endpoint
11151112
AZURE_OPENAI_TEMPERATURE: azureOpenAITemperature
11161113
AZURE_OPENAI_TOP_P: azureOpenAITopP
11171114
AZURE_OPENAI_MAX_TOKENS: azureOpenAIMaxTokens
11181115
AZURE_OPENAI_STOP_SEQUENCE: azureOpenAIStopSequence
11191116
AZURE_OPENAI_SYSTEM_MESSAGE: azureOpenAISystemMessage
1120-
AZURE_OPENAI_PREVIEW_API_VERSION: azureOpenaiAPIVersion
1117+
AZURE_OPENAI_PREVIEW_API_VERSION: azureAIServicesAPIVersion
11211118
AZURE_OPENAI_STREAM: azureOpenAIStream
11221119
AZURE_SEARCH_QUERY_TYPE: azureSearchQueryType
11231120
AZURE_SEARCH_VECTOR_COLUMNS: azureSearchVectorFields
11241121
AZURE_SEARCH_PERMITTED_GROUPS_COLUMN: azureSearchPermittedGroupsField
11251122
AZURE_SEARCH_STRICTNESS: azureSearchStrictness
11261123
AZURE_OPENAI_EMBEDDING_NAME: embeddingModel
1127-
AZURE_OPENAI_EMBEDDING_ENDPOINT : aiFoundryAiServices.outputs.endpoints['OpenAI Language Model Instance API']
1124+
AZURE_OPENAI_EMBEDDING_ENDPOINT : aiFoundryAiServices.outputs.endpoint
11281125
SQLDB_SERVER: sqlServerFqdn
11291126
SQLDB_DATABASE: sqlDbName
11301127
USE_INTERNAL_STREAM: useInternalStream
@@ -1140,7 +1137,7 @@ module webSite 'modules/web-sites.bicep' = {
11401137
USE_AI_PROJECT_CLIENT: useAIProjectClientFlag
11411138
AZURE_AI_AGENT_ENDPOINT: aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
11421139
AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME: gptModelName
1143-
AZURE_AI_AGENT_API_VERSION: azureOpenaiAPIVersion
1140+
AZURE_AI_AGENT_API_VERSION: azureAIServicesAPIVersion
11441141
AZURE_SEARCH_CONNECTION_NAME: aiSearchName
11451142
AZURE_CLIENT_ID: userAssignedIdentity.outputs.clientId
11461143
}
@@ -1345,8 +1342,8 @@ output APPLICATIONINSIGHTS_CONNECTION_STRING string = enableMonitoring
13451342
? applicationInsights!.outputs.connectionString
13461343
: ''
13471344

1348-
@description('The API version used for the Azure AI Agent service.')
1349-
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
13501347

13511348
@description('The endpoint URL of the Azure AI Agent project.')
13521349
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
@@ -1373,13 +1370,13 @@ output AZURE_COSMOSDB_DATABASE string = cosmosDbDatabaseName
13731370
output AZURE_COSMOSDB_ENABLE_FEEDBACK string = azureCosmosDbEnableFeedback
13741371

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

13781375
@description('The name of the Azure OpenAI Embedding model.')
13791376
output AZURE_OPENAI_EMBEDDING_NAME string = embeddingModel
13801377

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

13841381
@description('The maximum number of tokens for Azure OpenAI responses.')
13851382
output AZURE_OPENAI_MAX_TOKENS string = azureOpenAIMaxTokens
@@ -1388,7 +1385,7 @@ output AZURE_OPENAI_MAX_TOKENS string = azureOpenAIMaxTokens
13881385
output AZURE_OPENAI_MODEL string = gptModelName
13891386

13901387
@description('The preview API version for Azure OpenAI.')
1391-
output AZURE_OPENAI_PREVIEW_API_VERSION string = azureOpenaiAPIVersion
1388+
output AZURE_OPENAI_PREVIEW_API_VERSION string = azureAIServicesAPIVersion
13921389

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

0 commit comments

Comments
 (0)