Skip to content

Commit 4e874e2

Browse files
Merge remote-tracking branch 'origin/dev' into vm-upgrade
2 parents 709eafb + 858077e commit 4e874e2

12 files changed

Lines changed: 1125 additions & 390 deletions

File tree

.github/workflows/deploy-orchestrator.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,25 @@ jobs:
102102
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
103103
secrets: inherit
104104

105+
cleanup-deployment:
106+
if: "!cancelled() && needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
107+
needs: [docker-build, deploy, e2e-test]
108+
uses: ./.github/workflows/job-cleanup-deployment.yml
109+
with:
110+
runner_os: ${{ inputs.runner_os }}
111+
trigger_type: ${{ inputs.trigger_type }}
112+
cleanup_resources: ${{ inputs.cleanup_resources }}
113+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
114+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
115+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
116+
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
117+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
118+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
119+
secrets: inherit
120+
105121
send-notification:
106122
if: "!cancelled()"
107-
needs: [docker-build, deploy, e2e-test]
123+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
108124
uses: ./.github/workflows/job-send-notification.yml
109125
with:
110126
trigger_type: ${{ inputs.trigger_type }}
@@ -119,20 +135,5 @@ jobs:
119135
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
120136
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
121137
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
122-
secrets: inherit
123-
124-
cleanup-deployment:
125-
if: "!cancelled() && needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
126-
needs: [docker-build, deploy, e2e-test]
127-
uses: ./.github/workflows/job-cleanup-deployment.yml
128-
with:
129-
runner_os: ${{ inputs.runner_os }}
130-
trigger_type: ${{ inputs.trigger_type }}
131-
cleanup_resources: ${{ inputs.cleanup_resources }}
132-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
133-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
134-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
135-
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
136-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
137-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
138+
cleanup_result: ${{ needs.cleanup-deployment.result }}
138139
secrets: inherit

.github/workflows/job-send-notification.yml

Lines changed: 64 additions & 180 deletions
Large diffs are not rendered by default.

azure.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
name: modernize-your-code-solution-accelerator
2-
metadata:
3-
template: modernize-your-code-solution-accelerator@1.0
4-
5-
requiredVersions:
6-
azd: '>= 1.18.0'
7-
8-
parameters:
9-
AzureAiServiceLocation:
10-
type: string
11-
default: japaneast
12-
Prefix:
13-
type: string
14-
default: azdtemp
15-
baseUrl:
16-
type: string
17-
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
18-
deployment:
19-
mode: Incremental
20-
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
21-
parameters:
22-
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
23-
Prefix: ${{ parameters.Prefix }}
24-
baseUrl: ${{ parameters.baseUrl }}
1+
name: modernize-your-code-solution-accelerator
2+
metadata:
3+
template: modernize-your-code-solution-accelerator@1.0
4+
5+
requiredVersions:
6+
azd: '>= 1.18.0 != 1.23.9'
7+
8+
parameters:
9+
AzureAiServiceLocation:
10+
type: string
11+
default: japaneast
12+
Prefix:
13+
type: string
14+
default: azdtemp
15+
baseUrl:
16+
type: string
17+
default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator'
18+
deployment:
19+
mode: Incremental
20+
template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder
21+
parameters:
22+
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
23+
Prefix: ${{ parameters.Prefix }}
24+
baseUrl: ${{ parameters.baseUrl }}

azure_custom.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
name: modernize-your-code-solution-accelerator
2-
metadata:
3-
template: modernize-your-code-solution-accelerator@1.0
4-
5-
requiredVersions:
6-
azd: '>= 1.18.0'
7-
8-
parameters:
9-
azureAiServiceLocation:
10-
type: string
11-
default: japaneast
12-
13-
services:
14-
backend:
15-
project: ./src/backend
16-
host: containerapp
17-
language: python
18-
docker:
19-
path: Dockerfile
20-
remoteBuild: true
21-
frontend:
22-
project: ./src/frontend
23-
host: containerapp
24-
language: js
25-
docker:
26-
path: Dockerfile
27-
remoteBuild: true
28-
29-
infra:
30-
provider: bicep
31-
path: infra
1+
name: modernize-your-code-solution-accelerator
2+
metadata:
3+
template: modernize-your-code-solution-accelerator@1.0
4+
5+
requiredVersions:
6+
azd: '>= 1.18.0 != 1.23.9'
7+
8+
parameters:
9+
azureAiServiceLocation:
10+
type: string
11+
default: japaneast
12+
13+
services:
14+
backend:
15+
project: ./src/backend
16+
host: containerapp
17+
language: python
18+
docker:
19+
path: Dockerfile
20+
remoteBuild: true
21+
frontend:
22+
project: ./src/frontend
23+
host: containerapp
24+
language: js
25+
docker:
26+
path: Dockerfile
27+
remoteBuild: true
28+
29+
infra:
30+
provider: bicep
31+
path: infra

docs/DeploymentGuide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ azd auth login --tenant-id <tenant-id>
268268
> 3. Under the **Overview** section, locate the **Tenant ID** field. Copy the value displayed.
269269
270270
### 4.2 Start Deployment
271+
**NOTE:** If you are running the latest azd version (version 1.23.9), please run the following command.
272+
```bash
273+
azd config set provision.preflight off
274+
```
271275
272276
```shell
273277
azd up

infra/main.bicep

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -742,15 +742,7 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
742742
projectName: 'proj-${solutionSuffix}'
743743
projectDescription: 'proj-${solutionSuffix}'
744744
logAnalyticsWorkspaceResourceId: enableMonitoring ? logAnalyticsWorkspaceResourceId : ''
745-
privateNetworking: enablePrivateNetworking
746-
? {
747-
virtualNetworkResourceId: virtualNetwork!.outputs.resourceId
748-
subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId
749-
cogServicesPrivateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.cognitiveServices]!.outputs.resourceId
750-
openAIPrivateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.openAI]!.outputs.resourceId
751-
aiServicesPrivateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.aiServices]!.outputs.resourceId
752-
}
753-
: null
745+
privateNetworking: null // Private endpoint is handled by the standalone aiFoundryPrivateEndpoint module
754746
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
755747
disableLocalAuth: true //Should be set to true for WAF aligned configuration
756748
customSubDomainName: 'aif-${solutionSuffix}'
@@ -789,6 +781,45 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
789781
}
790782
}
791783

784+
var aiFoundryAiServicesResourceName = 'aif-${solutionSuffix}'
785+
var useExistingAiFoundryAiProject = !empty(azureExistingAIProjectResourceId)
786+
787+
module aiFoundryPrivateEndpoint 'br/public:avm/res/network/private-endpoint:0.8.1' = if (enablePrivateNetworking && !useExistingAiFoundryAiProject) {
788+
name: take('pep-${aiFoundryAiServicesResourceName}-deployment', 64)
789+
params: {
790+
name: 'pep-${aiFoundryAiServicesResourceName}'
791+
customNetworkInterfaceName: 'nic-${aiFoundryAiServicesResourceName}'
792+
location: location
793+
tags: allTags
794+
privateLinkServiceConnections: [
795+
{
796+
name: 'pep-${aiFoundryAiServicesResourceName}-connection'
797+
properties: {
798+
privateLinkServiceId: aiServices.outputs.resourceId
799+
groupIds: ['account']
800+
}
801+
}
802+
]
803+
privateDnsZoneGroup: {
804+
privateDnsZoneGroupConfigs: [
805+
{
806+
name: 'ai-services-dns-zone-cognitiveservices'
807+
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.cognitiveServices]!.outputs.resourceId
808+
}
809+
{
810+
name: 'ai-services-dns-zone-openai'
811+
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.openAI]!.outputs.resourceId
812+
}
813+
{
814+
name: 'ai-services-dns-zone-aiservices'
815+
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.aiServices]!.outputs.resourceId
816+
}
817+
]
818+
}
819+
subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId
820+
}
821+
}
822+
792823
var appStorageContainerName = 'appstorage'
793824

794825
module storageAccount 'modules/storageAccount.bicep' = {

0 commit comments

Comments
 (0)