Skip to content

Commit fcac335

Browse files
Merge branch 'dev' into dev
2 parents 6b3661e + 796d3a0 commit fcac335

11 files changed

Lines changed: 690 additions & 111 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @Vinay-Microsoft @aniaroramsft @toherman-msft @nchandhi @dgp10801
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal1-Microsoft @VinaySh-Microsoft @aniaroramsft @toherman-msft @nchandhi @dgp10801

azure.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,3 @@ hooks:
2222
Write-Host ""
2323
shell: pwsh
2424
interactive: true
25-
posix:
26-
run: |
27-
echo ""
28-
echo " ---------------------------------------------------------------------------------------------------"
29-
echo " Note: If deployment fails or you encounter an issue, please open an issue with the deployment logs."
30-
echo " https://github.com/microsoft/content-processing-solution-accelerator/issues"
31-
echo " ---------------------------------------------------------------------------------------------------"
32-
echo ""
33-
shell: sh
34-
interactive: true
35-
postprovision:
36-
posix:
37-
shell: sh
38-
run: sed -i 's/\r$//' ./infra/scripts/post_deployment.sh; bash ./infra/scripts/post_deployment.sh
39-
interactive: true
40-
windows:
41-
shell: pwsh
42-
run: ./infra/scripts/post_deployment.ps1
43-
interactive: true

docs/DeploymentGuide.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,37 @@ azd up
301301

302302
## Step 5: Post-Deployment Configuration
303303

304-
### 5.1 Schema Registration (Automatic)
304+
### 5.1 Run Post Deployment Scripts
305+
306+
1. Run the ACR build and push script from the project root. Use the appropriate command for your shell:
307+
308+
- For Bash (Linux/macOS/WSL):
309+
310+
```bash
311+
bash infra/scripts/acr_build_push.sh
312+
```
313+
314+
- For PowerShell (Windows):
315+
316+
```powershell
317+
infra\scripts\acr_build_push.ps1
318+
```
319+
320+
2. After the ACR build and push completes, run the post-deployment script:
321+
322+
- For Bash (Linux/macOS/WSL):
323+
324+
```bash
325+
bash infra/scripts/post_deployment.sh
326+
```
327+
328+
- For PowerShell (Windows):
329+
330+
```powershell
331+
.\infra\scripts\post_deployment.ps1
332+
```
333+
334+
### 5.2 Schema Registration (Automatic)
305335

306336
> Want to customize the schemas for your own documents? [Learn more about adding your own schemas here.](./CustomizeSchemaData.md)
307337

infra/main.bicep

Lines changed: 57 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ param gptModelVersion string = '2025-11-13'
7272
@description('Optional. Capacity of the GPT deployment: (minimum 10).')
7373
param gptDeploymentCapacity int = 300
7474

75-
@description('Optional. The container registry login server/endpoint for the container images (for example, an Azure Container Registry endpoint).')
76-
param containerRegistryEndpoint string = 'cpscontainerreg.azurecr.io'
77-
78-
@description('Optional. The image tag for the container images.')
79-
param imageTag string = 'latest_v2'
80-
8175
@description('Optional. Enable WAF for the deployment.')
8276
param enablePrivateNetworking bool = false
8377

@@ -722,11 +716,6 @@ module avmAiServices 'modules/account/aifoundry.bicep' = {
722716
customSubDomainName: 'aif-${solutionSuffix}'
723717
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspace!.outputs.resourceId }] : null
724718
roleAssignments: [
725-
{
726-
principalId: avmManagedIdentity.outputs.principalId
727-
roleDefinitionIdOrName: '8e3af657-a8ff-443c-a75c-2fe8c4bcb635' // Owner role
728-
principalType: 'ServicePrincipal'
729-
}
730719
{
731720
principalId: avmContainerApp.outputs.systemAssignedMIPrincipalId!
732721
roleDefinitionIdOrName: 'Cognitive Services OpenAI User'
@@ -888,19 +877,24 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.22.1' = {
888877
environmentResourceId: avmContainerAppEnv.outputs.resourceId
889878
workloadProfileName: 'Consumption'
890879
enableTelemetry: enableTelemetry
891-
registries: null
880+
registries: [
881+
{
882+
server: avmContainerRegistry.outputs.loginServer
883+
identity: avmContainerRegistryReader.outputs.resourceId
884+
}
885+
]
892886
managedIdentities: {
893887
systemAssigned: true
894888
userAssignedResourceIds: [
895889
avmContainerRegistryReader.outputs.resourceId
896890
]
897891
}
898-
892+
899893
containers: [
900894
{
901895
name: 'ca-${solutionSuffix}'
902-
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'
903-
896+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
897+
904898
resources: {
905899
cpu: 4
906900
memory: '8.0Gi'
@@ -957,7 +951,12 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
957951
environmentResourceId: avmContainerAppEnv.outputs.resourceId
958952
workloadProfileName: 'Consumption'
959953
enableTelemetry: enableTelemetry
960-
registries: null
954+
registries: [
955+
{
956+
server: avmContainerRegistry.outputs.loginServer
957+
identity: avmContainerRegistryReader.outputs.resourceId
958+
}
959+
]
961960
tags: tags
962961
managedIdentities: {
963962
systemAssigned: true
@@ -968,7 +967,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
968967
containers: [
969968
{
970969
name: 'ca-${solutionSuffix}-api'
971-
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
970+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
972971
resources: {
973972
cpu: 4
974973
memory: '8.0Gi'
@@ -1079,7 +1078,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
10791078
}
10801079
}
10811080
}
1082-
1081+
10831082
//========== Container App Web ========== //
10841083
module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
10851084
name: take('avm.res.app.container-app-web.${solutionSuffix}', 64)
@@ -1089,7 +1088,12 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
10891088
environmentResourceId: avmContainerAppEnv.outputs.resourceId
10901089
workloadProfileName: 'Consumption'
10911090
enableTelemetry: enableTelemetry
1092-
registries: null
1091+
registries: [
1092+
{
1093+
server: avmContainerRegistry.outputs.loginServer
1094+
identity: avmContainerRegistryReader.outputs.resourceId
1095+
}
1096+
]
10931097
tags: tags
10941098
managedIdentities: {
10951099
systemAssigned: true
@@ -1119,7 +1123,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
11191123
containers: [
11201124
{
11211125
name: 'ca-${solutionSuffix}-web'
1122-
image: '${containerRegistryEndpoint}/contentprocessorweb:${imageTag}'
1126+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
11231127
resources: {
11241128
cpu: 4
11251129
memory: '8.0Gi'
@@ -1162,7 +1166,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
11621166
]
11631167
}
11641168
}
1165-
1169+
11661170
// ========== Container App Workflow ========== //
11671171
module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
11681172
name: take('avm.res.app.container-app-wkfl.${solutionSuffix}', 64)
@@ -1172,7 +1176,12 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
11721176
environmentResourceId: avmContainerAppEnv.outputs.resourceId
11731177
workloadProfileName: 'Consumption'
11741178
enableTelemetry: enableTelemetry
1175-
registries: null
1179+
registries: [
1180+
{
1181+
server: avmContainerRegistry.outputs.loginServer
1182+
identity: avmContainerRegistryReader.outputs.resourceId
1183+
}
1184+
]
11761185
tags: tags
11771186
managedIdentities: {
11781187
systemAssigned: true
@@ -1183,7 +1192,7 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
11831192
containers: [
11841193
{
11851194
name: 'ca-${solutionSuffix}-wkfl'
1186-
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
1195+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
11871196
resources: {
11881197
cpu: 4
11891198
memory: '8.0Gi'
@@ -1550,7 +1559,12 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
15501559
enableTelemetry: enableTelemetry
15511560
environmentResourceId: avmContainerAppEnv.outputs.resourceId
15521561
workloadProfileName: 'Consumption'
1553-
registries: null
1562+
registries: [
1563+
{
1564+
server: avmContainerRegistry.outputs.loginServer
1565+
identity: avmContainerRegistryReader.outputs.resourceId
1566+
}
1567+
]
15541568
tags: tags
15551569
managedIdentities: {
15561570
systemAssigned: true
@@ -1561,8 +1575,8 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
15611575
containers: [
15621576
{
15631577
name: 'ca-${solutionSuffix}'
1564-
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'
1565-
1578+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
1579+
15661580
resources: {
15671581
cpu: 4
15681582
memory: '8.0Gi'
@@ -1623,7 +1637,7 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
16231637
cognitiveServicePrivateEndpoint
16241638
]
16251639
}
1626-
1640+
16271641
module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' = {
16281642
name: take('avm.res.app.container-app-api.update.${solutionSuffix}', 64)
16291643
params: {
@@ -1632,19 +1646,24 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
16321646
enableTelemetry: enableTelemetry
16331647
environmentResourceId: avmContainerAppEnv.outputs.resourceId
16341648
workloadProfileName: 'Consumption'
1635-
registries: null
1649+
registries: [
1650+
{
1651+
server: avmContainerRegistry.outputs.loginServer
1652+
identity: avmContainerRegistryReader.outputs.resourceId
1653+
}
1654+
]
16361655
tags: tags
16371656
managedIdentities: {
16381657
systemAssigned: true
16391658
userAssignedResourceIds: [
16401659
avmContainerRegistryReader.outputs.resourceId
16411660
]
16421661
}
1643-
1662+
16441663
containers: [
16451664
{
16461665
name: 'ca-${solutionSuffix}-api'
1647-
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
1666+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
16481667
resources: {
16491668
cpu: 4
16501669
memory: '8.0Gi'
@@ -1758,7 +1777,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
17581777
cognitiveServicePrivateEndpoint
17591778
]
17601779
}
1761-
1780+
17621781
// ========== Container App Workflow Update ========== //
17631782
module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22.1' = {
17641783
name: take('avm.res.app.container-app-wkfl.update.${solutionSuffix}', 64)
@@ -1768,7 +1787,12 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
17681787
enableTelemetry: enableTelemetry
17691788
environmentResourceId: avmContainerAppEnv.outputs.resourceId
17701789
workloadProfileName: 'Consumption'
1771-
registries: null
1790+
registries: [
1791+
{
1792+
server: avmContainerRegistry.outputs.loginServer
1793+
identity: avmContainerRegistryReader.outputs.resourceId
1794+
}
1795+
]
17721796
tags: tags
17731797
managedIdentities: {
17741798
systemAssigned: true
@@ -1779,7 +1803,7 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
17791803
containers: [
17801804
{
17811805
name: 'ca-${solutionSuffix}-wkfl'
1782-
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
1806+
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
17831807
resources: {
17841808
cpu: 4
17851809
memory: '8.0Gi'

0 commit comments

Comments
 (0)