Skip to content

Commit 198bd50

Browse files
Merge branch 'psl-hb-infrachanges' of https://github.com/Harsh-Microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator into psl-hb-infrachanges
2 parents 79f0677 + 4420a7b commit 198bd50

26 files changed

Lines changed: 2184 additions & 2393 deletions

azure.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@ hooks:
1111
shell: pwsh
1212
interactive: true
1313
posix:
14-
run: |
15-
Blue='\033[0;34m'
16-
Green='\033[0;32m'
17-
Yellow='\033[1;33m'
18-
NC='\033[0m'
19-
20-
printf "\n"
21-
22-
printf "${Yellow}===============================================================\n"
23-
printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n"
24-
printf "${Yellow}===============================================================${NC}\n\n"
25-
26-
printf "Upload Team Configurations and index sample data:\n"
27-
printf " 👉 Run the following command in Bash:\n"
28-
printf " ${Blue}bash infra/scripts/post-provision/selecting_team_config_and_data.sh${NC}\n\n"
29-
30-
printf "🌐 Access your deployed Frontend application at:\n"
31-
printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname"
32-
14+
run: bash infra/scripts/post-provision/post_deploy.sh
3315
shell: sh
3416
interactive: true

azure_custom.yaml

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -46,62 +46,10 @@ services:
4646
hooks:
4747
postdeploy:
4848
windows:
49-
run: |
50-
# Detect if running in Git Bash or similar Bash environment
51-
if ($env:SHELL -like "*bash*" -or $env:MSYSTEM) {
52-
# Running in Git Bash/MSYS2 environment
53-
Write-Host ""
54-
Write-Host "===============================================================" -ForegroundColor Yellow
55-
Write-Host " POST-DEPLOYMENT STEPS (Bash)" -ForegroundColor Green
56-
Write-Host "===============================================================" -ForegroundColor Yellow
57-
Write-Host ""
58-
59-
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
60-
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
61-
Write-Host " bash infra/scripts/post-provision/selecting_team_config_and_data.sh" -ForegroundColor Cyan
62-
Write-Host ""
63-
64-
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
65-
Write-Host " https://$env:webSiteDefaultHostname" -ForegroundColor Cyan
66-
Write-Host ""
67-
} else {
68-
# Running in PowerShell
69-
Write-Host ""
70-
Write-Host "===============================================================" -ForegroundColor Yellow
71-
Write-Host " POST-DEPLOYMENT STEP (PowerShell) " -ForegroundColor Green
72-
Write-Host "===============================================================" -ForegroundColor Yellow
73-
Write-Host ""
74-
75-
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
76-
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
77-
Write-Host " infra\scripts\post-provision\Selecting-Team-Config-And-Data.ps1" -ForegroundColor Cyan
78-
Write-Host ""
79-
80-
Write-Host "🌐 Access your deployed Frontend application at:" -ForegroundColor Green
81-
Write-Host " https://$env:webSiteDefaultHostname" -ForegroundColor Cyan
82-
Write-Host ""
83-
}
84-
49+
run: infra/scripts/post-provision/post_deploy.ps1
8550
shell: pwsh
8651
interactive: true
8752
posix:
88-
run: |
89-
Blue='\033[0;34m'
90-
Green='\033[0;32m'
91-
Yellow='\033[1;33m'
92-
NC='\033[0m'
93-
94-
printf "\n"
95-
96-
printf "${Yellow}===============================================================\n"
97-
printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n"
98-
printf "${Yellow}===============================================================${NC}\n\n"
99-
100-
printf "Upload Team Configurations and index sample data:\n"
101-
printf " 👉 Run the following command in Bash:\n"
102-
printf " ${Blue}bash infra/scripts/post-provision/selecting_team_config_and_data.sh${NC}\n\n"
103-
104-
printf "🌐 Access your deployed Frontend application at:\n"
105-
printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname"
53+
run: bash infra/scripts/post-provision/post_deploy.sh
10654
shell: sh
10755
interactive: true

infra/avm/main.bicep

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -555,37 +555,6 @@ var aiSearchIndexNameForRFPSummary = 'macae-rfp-summary-index'
555555
var aiSearchIndexNameForRFPRisk = 'macae-rfp-risk-index'
556556
var aiSearchIndexNameForRFPCompliance = 'macae-rfp-compliance-index'
557557

558-
// var aiFoundryRoleIds = {
559-
// foundryUser: '53ca6127-db72-4b80-b1b0-d745d6d5456d'
560-
// azureAiDeveloper: '64702f94-c441-49e6-a78b-ef80e0188fee'
561-
// cognitiveServicesOpenAIUser: '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'
562-
// }
563-
564-
// var existingAiFoundryManagedIdentityRoles = [
565-
// {
566-
// suffix: 'managedidentity-foundry-user'
567-
// roleDefinitionId: format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/{1}', aiFoundryAiServicesSubscriptionId, aiFoundryRoleIds.foundryUser)
568-
// }
569-
// {
570-
// suffix: 'managedidentity-ai-developer'
571-
// roleDefinitionId: format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/{1}', aiFoundryAiServicesSubscriptionId, aiFoundryRoleIds.azureAiDeveloper)
572-
// }
573-
// {
574-
// suffix: 'managedidentity-openai-user'
575-
// roleDefinitionId: format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/{1}', aiFoundryAiServicesSubscriptionId, aiFoundryRoleIds.cognitiveServicesOpenAIUser)
576-
// }
577-
// ]
578-
579-
// var existingAiFoundryDeployerRoles = [
580-
// {
581-
// suffix: 'deployer-foundry-user'
582-
// roleDefinitionId: format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/{1}', aiFoundryAiServicesSubscriptionId, aiFoundryRoleIds.foundryUser)
583-
// }
584-
// {
585-
// suffix: 'deployer-ai-developer'
586-
// roleDefinitionId: format('/subscriptions/{0}/providers/Microsoft.Authorization/roleDefinitions/{1}', aiFoundryAiServicesSubscriptionId, aiFoundryRoleIds.azureAiDeveloper)
587-
// }
588-
// ]
589558

590559
// ============================================================================
591560
// Resource Group Tags
@@ -758,6 +727,7 @@ module virtualMachine './modules/compute/virtual-machine.bicep' = if (enablePriv
758727
location: location
759728
tags: tags
760729
enableTelemetry: enableTelemetry
730+
deployingUserPrincipalId: deployingUserPrincipalId
761731
vmSize: vmSize
762732
adminUsername: vmAdminUsername ?? 'JumpboxAdminUser'
763733
adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!'
@@ -833,32 +803,7 @@ module ai_foundry_project './modules/ai/ai-foundry-project.bicep' = if (!useExis
833803
}
834804
}
835805

836-
// @batchSize(1)
837-
// module existingAiFoundryManagedIdentityRoleAssignments './modules/identity/cross-scope-role-assignment.bicep' = [for role in existingAiFoundryManagedIdentityRoles: if (useExistingAIProject) {
838-
// name: take('module.existing-aif-mi-${role.suffix}.${solutionName}', 64)
839-
// scope: resourceGroup(aiFoundryAiServicesSubscriptionId, aiFoundryAiServicesResourceGroupName)
840-
// params: {
841-
// principalId: managed_identity.outputs.principalId
842-
// roleDefinitionId: role.roleDefinitionId
843-
// roleAssignmentName: guid(solutionSuffix, aiFoundryAiServicesResourceName, role.suffix)
844-
// aiFoundryName: aiFoundryAiServicesResourceName
845-
// principalType: 'ServicePrincipal'
846-
// }
847-
// }]
848-
849-
// @batchSize(1)
850-
// module existingAiFoundryDeployerRoleAssignments './modules/identity/cross-scope-role-assignment.bicep' = [for role in existingAiFoundryDeployerRoles: if (useExistingAIProject) {
851-
// name: take('module.existing-aif-deployer-${role.suffix}.${solutionName}', 64)
852-
// scope: resourceGroup(aiFoundryAiServicesSubscriptionId, aiFoundryAiServicesResourceGroupName)
853-
// params: {
854-
// principalId: deployingUserPrincipalId
855-
// roleDefinitionId: role.roleDefinitionId
856-
// roleAssignmentName: guid(solutionSuffix, aiFoundryAiServicesResourceName, role.suffix)
857-
// aiFoundryName: aiFoundryAiServicesResourceName
858-
// principalType: deployerPrincipalType
859-
// }
860-
// }]
861-
806+
// Commented Private Endpoints as MCP KnowledgeBase Connections doesn't work private endpoints
862807
// module aiFoundryPrivateEndpoint './modules/networking/private-endpoint.bicep' = if (enablePrivateNetworking && !useExistingAIProject) {
863808
// name: take('module.pe-ai-foundry.${solutionName}', 64)
864809
// params: {
@@ -895,12 +840,12 @@ module ai_foundry_project './modules/ai/ai-foundry-project.bicep' = if (!useExis
895840
// }
896841
// }
897842

898-
var aiFoundryAiProjectName = useExistingAIProject ? existing_project_setup!.outputs.aiProjectName : ai_foundry_project!.outputs.projectName
843+
var aiFoundryAiProjectName = useExistingAIProject ? existing_project_setup!.outputs.projectName : ai_foundry_project!.outputs.projectName
899844
var aiFoundryAiProjectEndpoint = useExistingAIProject ? existing_project_setup!.outputs.projectEndpoint : ai_foundry_project!.outputs.projectEndpoint
900-
var aiFoundryAiProjectPrincipalId = useExistingAIProject ? existing_project_setup!.outputs.aiProjectPrincipalId : ai_foundry_project!.outputs.projectIdentityPrincipalId
901-
var aiFoundryAiServicesEndpoint = useExistingAIProject ? existing_project_setup!.outputs.aiFoundryEndpoint : ai_foundry_project!.outputs.endpoint
845+
var aiFoundryAiProjectPrincipalId = useExistingAIProject ? existing_project_setup!.outputs.projectIdentityPrincipalId : ai_foundry_project!.outputs.projectIdentityPrincipalId
846+
var aiFoundryAiServicesEndpoint = useExistingAIProject ? existing_project_setup!.outputs.endpoint : ai_foundry_project!.outputs.endpoint
902847
var aiFoundryOpenAIEndpoint = 'https://${aiFoundryAiServicesResourceName}.openai.azure.com/'
903-
var aiFoundryResourceId = useExistingAIProject ? existing_project_setup!.outputs.aiFoundryResourceId : ai_foundry_project!.outputs.resourceId
848+
var aiFoundryResourceId = useExistingAIProject ? existing_project_setup!.outputs.resourceId : ai_foundry_project!.outputs.resourceId
904849

905850
@batchSize(1)
906851
module model_deployments './modules/ai/ai-foundry-model-deployment.bicep' = [for (deployment, i) in aiModelDeployments: {
@@ -1426,6 +1371,7 @@ module webSite './modules/compute/app-service.bicep' = {
14261371
virtualNetworkSubnetId: enablePrivateNetworking ? virtualNetwork!.outputs.webserverfarmSubnetResourceId : ''
14271372
publicNetworkAccess: 'Enabled'
14281373
diagnosticSettings: monitoringDiagnosticSettings
1374+
applicationInsightResourceId: enableMonitoring ? app_insights!.outputs.resourceId : ''
14291375
}
14301376
}
14311377

0 commit comments

Comments
 (0)