Skip to content

Commit 8eb2e44

Browse files
local deployment changes
1 parent 7b432a0 commit 8eb2e44

File tree

7 files changed

+2109
-40
lines changed

7 files changed

+2109
-40
lines changed

azure.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,31 @@ name: multi-agent-custom-automation-engine-solution-accelerator
33
metadata:
44
55
requiredVersions:
6-
azd: ">=1.15.0 !=1.17.1"
6+
azd: ">=1.15.0 !=1.17.1"
7+
8+
services:
9+
backend:
10+
project: ./src/backend
11+
language: py
12+
host: containerapp
13+
docker:
14+
image: backend
15+
remoteBuild: true
16+
17+
frontend:
18+
project: ./src/frontend
19+
language: py
20+
host: appservice
21+
dist: ./dist
22+
hooks:
23+
prepackage:
24+
windows:
25+
shell: pwsh
26+
run: ../../infra/scripts/package_frontend.ps1
27+
interactive: true
28+
continueOnError: false
29+
posix:
30+
shell: sh
31+
run: bash ../../infra/scripts/package_frontend.sh
32+
interactive: true
33+
continueOnError: false

infra/main.bicep

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ param existingLogAnalyticsWorkspaceId string = ''
2020

2121
param azureopenaiVersion string = '2025-01-01-preview'
2222

23-
//Get the current deployer's information
24-
var deployerInfo = deployer()
25-
var deployingUserPrincipalId = deployerInfo.objectId
26-
2723
// Restricting deployment to only supported Azure OpenAI regions validated with GPT-4o model
2824
@metadata({
2925
azd : {
@@ -816,36 +812,6 @@ module cogServiceRoleAssignmentsExisting './modules/role.bicep' = if(useExisting
816812
scope: resourceGroup( split(existingFoundryProjectResourceId, '/')[2], split(existingFoundryProjectResourceId, '/')[4])
817813
}
818814

819-
// User Role Assignment for Azure OpenAI - New Resources
820-
module userOpenAiRoleAssignment './modules/role.bicep' = if (aiFoundryAIservicesEnabled && !useExistingResourceId) {
821-
name: take('user-openai-${uniqueString(deployingUserPrincipalId, aiFoundryAiServicesResourceName)}', 64)
822-
params: {
823-
name: 'user-openai-${uniqueString(deployingUserPrincipalId, aiFoundryAiServicesResourceName)}'
824-
principalId: deployingUserPrincipalId
825-
aiServiceName: aiFoundryAiServices.outputs.name
826-
principalType: 'User'
827-
}
828-
scope: resourceGroup(subscription().subscriptionId, resourceGroup().name)
829-
dependsOn: [
830-
aiFoundryAiServices
831-
]
832-
}
833-
834-
// User Role Assignment for Azure OpenAI - Existing Resources
835-
module userOpenAiRoleAssignmentExisting './modules/role.bicep' = if (aiFoundryAIservicesEnabled && useExistingResourceId) {
836-
name: take('user-openai-existing-${uniqueString(deployingUserPrincipalId, aiFoundryAiServicesResourceName)}', 64)
837-
params: {
838-
name: 'user-openai-existing-${uniqueString(deployingUserPrincipalId, aiFoundryAiServicesResourceName)}'
839-
principalId: deployingUserPrincipalId
840-
aiServiceName: aiFoundryAiServices.outputs.name
841-
principalType: 'User'
842-
}
843-
scope: resourceGroup(split(existingFoundryProjectResourceId, '/')[2], split(existingFoundryProjectResourceId, '/')[4])
844-
dependsOn: [
845-
aiFoundryAiServices
846-
]
847-
}
848-
849815
// ========== Cosmos DB ========== //
850816
// WAF best practices for Cosmos DB: https://learn.microsoft.com/en-us/azure/well-architected/service-guides/cosmos-db
851817
module privateDnsZonesCosmosDb 'br/public:avm/res/network/private-dns-zone:0.7.0' = if (virtualNetworkEnabled) {
@@ -920,11 +886,9 @@ module cosmosDb 'br/public:avm/res/document-db/database-account:0.12.0' = if (co
920886
capabilitiesToAdd: [
921887
'EnableServerless'
922888
]
923-
924-
sqlRoleAssignmentsPrincipalIds: concat(
925-
[containerApp.outputs.?systemAssignedMIPrincipalId],
926-
[deployingUserPrincipalId]
927-
)
889+
sqlRoleAssignmentsPrincipalIds: [
890+
containerApp.outputs.?systemAssignedMIPrincipalId
891+
]
928892
sqlRoleDefinitions: [
929893
{
930894
// Replace this with built-in role definition Cosmos DB Built-in Data Contributor: https://docs.azure.cn/en-us/cosmos-db/nosql/security/reference-data-plane-roles#cosmos-db-built-in-data-contributor
@@ -1775,3 +1739,5 @@ output AZURE_AI_MODEL_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDeploymen
17751739
output AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME string = aiFoundryAiServicesModelDeployment.name
17761740
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiServices.outputs.aiProjectInfo.apiEndpoint
17771741
output APP_ENV string = 'Prod'
1742+
output AI_FOUNDRY_RESOURCE_ID string = aiFoundryAiServices.outputs.resourceId
1743+
output COSMOSDB_ACCOUNT_NAME string = cosmosDbResourceName

0 commit comments

Comments
 (0)