Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,23 @@ azd up

## Step 5: Post-Deployment Configuration

### 5.1 Schema Registration (Automatic)
### 5.1 Run Post Deployment Script

1. You can run the ACR build and push script from the project root. Use the appropriate command for your shell:

- For Bash (Linux/macOS/WSL):

```bash
bash infra/scripts/acr_build_push.sh
```

- For PowerShell (Windows):

```powershell
infra\scripts\acr_build_push.ps1
```

### 5.2 Schema Registration (Automatic)

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

Expand Down
90 changes: 57 additions & 33 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ param gptModelVersion string = '2025-11-13'
@description('Optional. Capacity of the GPT deployment: (minimum 10).')
param gptDeploymentCapacity int = 300

@description('Optional. The container registry login server/endpoint for the container images (for example, an Azure Container Registry endpoint).')
param containerRegistryEndpoint string = 'cpscontainerreg.azurecr.io'

@description('Optional. The image tag for the container images.')
param imageTag string = 'latest_v2'

@description('Optional. Enable WAF for the deployment.')
param enablePrivateNetworking bool = false

Expand Down Expand Up @@ -722,11 +716,6 @@ module avmAiServices 'modules/account/aifoundry.bicep' = {
customSubDomainName: 'aif-${solutionSuffix}'
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspace!.outputs.resourceId }] : null
roleAssignments: [
{
principalId: avmManagedIdentity.outputs.principalId
roleDefinitionIdOrName: '8e3af657-a8ff-443c-a75c-2fe8c4bcb635' // Owner role
principalType: 'ServicePrincipal'
}
{
principalId: avmContainerApp.outputs.systemAssignedMIPrincipalId!
roleDefinitionIdOrName: 'Cognitive Services OpenAI User'
Expand Down Expand Up @@ -888,19 +877,24 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
avmContainerRegistryReader.outputs.resourceId
]
}

containers: [
{
name: 'ca-${solutionSuffix}'
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'

image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -957,7 +951,12 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -968,7 +967,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-api'
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1079,7 +1078,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.22.1' = {
}
}
}

//========== Container App Web ========== //
module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-web.${solutionSuffix}', 64)
Expand All @@ -1089,7 +1088,12 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand Down Expand Up @@ -1119,7 +1123,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-web'
image: '${containerRegistryEndpoint}/contentprocessorweb:${imageTag}'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1162,7 +1166,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.22.1' = {
]
}
}

// ========== Container App Workflow ========== //
module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-wkfl.${solutionSuffix}', 64)
Expand All @@ -1172,7 +1176,12 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
enableTelemetry: enableTelemetry
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1183,7 +1192,7 @@ module avmContainerApp_Workflow 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}-wkfl'
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1550,7 +1559,12 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1561,8 +1575,8 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
containers: [
{
name: 'ca-${solutionSuffix}'
image: '${containerRegistryEndpoint}/contentprocessor:${imageTag}'

image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1623,7 +1637,7 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.22.1' = {
cognitiveServicePrivateEndpoint
]
}

module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-api.update.${solutionSuffix}', 64)
params: {
Expand All @@ -1632,19 +1646,24 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
userAssignedResourceIds: [
avmContainerRegistryReader.outputs.resourceId
]
}

containers: [
{
name: 'ca-${solutionSuffix}-api'
image: '${containerRegistryEndpoint}/contentprocessorapi:${imageTag}'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down Expand Up @@ -1758,7 +1777,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.22.1' =
cognitiveServicePrivateEndpoint
]
}

// ========== Container App Workflow Update ========== //
module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22.1' = {
name: take('avm.res.app.container-app-wkfl.update.${solutionSuffix}', 64)
Expand All @@ -1768,7 +1787,12 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
enableTelemetry: enableTelemetry
environmentResourceId: avmContainerAppEnv.outputs.resourceId
workloadProfileName: 'Consumption'
registries: null
registries: [
{
server: avmContainerRegistry.outputs.loginServer
identity: avmContainerRegistryReader.outputs.resourceId
}
]
tags: tags
managedIdentities: {
systemAssigned: true
Expand All @@ -1779,7 +1803,7 @@ module avmContainerApp_Workflow_update 'br/public:avm/res/app/container-app:0.22
containers: [
{
name: 'ca-${solutionSuffix}-wkfl'
image: '${containerRegistryEndpoint}/contentprocessorworkflow:${imageTag}'
image: 'mcr.microsoft.com/azuredocs/containerapps-helloworld:latest'
resources: {
cpu: 4
memory: '8.0Gi'
Expand Down
Loading