Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
--parameters \
solutionName="${{ env.SOLUTION_PREFIX }}" \
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
imageVersion="${IMAGE_TAG}" \
imageTag="${IMAGE_TAG}" \
createdBy="Pipeline" \
tags="{'Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"

Expand Down
24 changes: 12 additions & 12 deletions docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ By default this template will use the environment name as the prefix to prevent
| `AZURE_LOCATION` | string | `<User selects during deployment>` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
| `AZURE_ENV_AI_SERVICE_LOCATION` | string | `<User selects during deployment>` | Location of the Azure resources. Controls where the Azure AI Services will be deployed. |
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Set the Model Name (allowed values: gpt-4o). |
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Set the Azure model version (allowed values: 2024-08-06) |
| `AZURE_ENV_MODEL_CAPACITY` | integer | `150` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). |
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
| `AZURE_ENV_GPT_MODEL_NAME` | string | `gpt-4o` | Set the Model Name (allowed values: gpt-4o). |
| `AZURE_ENV_GPT_MODEL_VERSION` | string | `2024-08-06` | Set the Azure model version (allowed values: 2024-08-06) |
| `AZURE_ENV_GPT_MODEL_CAPACITY` | integer | `150` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). |
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID`| string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
| `AZURE_ENV_JUMPBOX_SIZE` | string | `Standard_DS2_v2` | Specifies the size of the Jumpbox Virtual Machine. Set a custom value if `enablePrivateNetworking` is `true`. |
| `AZURE_ENV_JUMPBOX_ADMIN_USERNAME` | string | `JumpboxAdminUser` | Specifies the administrator username for the Jumpbox Virtual Machine. |
| `AZURE_ENV_JUMPBOX_ADMIN_PASSWORD` | string | `JumpboxAdminP@ssw0rd1234!` | Specifies the administrator password for the Jumpbox Virtual Machine. |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | *(not set by default)* | Specifies the secondary region for Cosmos DB. Required if `enableRedundancy` is `true`. |
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | *(not set by default)* | Specifies the existing AI Foundry Project Resource ID if it needs to be reused. |
| `AZURE_ENV_ACR_NAME` | string | `cmsacontainerreg.azurecr.io` | Specifies the Azure Container Registry name to use for container images. |
| `AZURE_ENV_VM_SIZE` | string | `Standard_DS2_v2` | Specifies the size of the Jumpbox Virtual Machine. Set a custom value if `enablePrivateNetworking` is `true`. |
| `AZURE_ENV_VM_ADMIN_USERNAME` | string | `JumpboxAdminUser` | Specifies the administrator username for the Jumpbox Virtual Machine. |
| `AZURE_ENV_VM_ADMIN_PASSWORD` | string | `JumpboxAdminP@ssw0rd1234!` | Specifies the administrator password for the Jumpbox Virtual Machine. |
| `AZURE_ENV_SECONDARY_LOCATION` | string | *(not set by default)* | Specifies the secondary region for Cosmos DB. Required if `enableRedundancy` is `true`. |
| `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | *(not set by default)* | Specifies the existing AI Foundry Project Resource ID if it needs to be reused. |
| `AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT`| string | `cmsacontainerreg.azurecr.io` | Specifies the Azure Container Registry endpoint to use for container images. |

---

Expand All @@ -36,12 +36,12 @@ azd env set <PARAMETER_NAME> <VALUE>

Set the Log Analytics Workspace Id if you need to reuse the existing workspace
```shell
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
```

Set the Azure Existing AI Foundry Project Resource ID if you need to reuse the existing AI Foundry Project
```shell
azd env set AZURE_EXISTING_AI_PROJECT_RESOURCE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>'
azd env set AZURE_ENV_FOUNDRY_PROJECT_RID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.CognitiveServices/accounts/<account-name>/projects/<project-name>'
```

**Example:**
Expand Down
32 changes: 16 additions & 16 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ var replicaRegionPairs = {
var replicaLocation = replicaRegionPairs[resourceGroup().location]

@description('Optional. AI model deployment token capacity. Defaults to 150K tokens per minute.')
param gptModelCapacity int = 150
param gptDeploymentCapacity int = 150

@description('Optional. Enable monitoring for the resources. This will enable Application Insights and Log Analytics. Defaults to false.')
param enableMonitoring bool = false

@description('Optional. Enable scaling for the container apps. Defaults to false.')
param enableScaling bool = false
param enableScalability bool = false

@description('Optional. Enable redundancy for applicable resources. Defaults to false.')
param enableRedundancy bool = false
Expand Down Expand Up @@ -95,25 +95,25 @@ param enableTelemetry bool = true

@minLength(1)
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
param gptModelDeploymentType string = 'GlobalStandard'
param deploymentType string = 'GlobalStandard'

@minLength(1)
@description('Optional. Name of the GPT model to deploy. Defaults to gpt-4o.')
param gptModelName string = 'gpt-4o'

@minLength(1)
@description('Optional. Set the Image tag. Defaults to latest_2025-11-10_599.')
param imageVersion string = 'latest_2025-11-10_599'
param imageTag string = 'latest_2025-11-10_599'

@description('Optional. Azure Container Registry name. Defaults to cmsacontainerreg.azurecr.io')
param acrName string = 'cmsacontainerreg.azurecr.io'
@description('Optional. Azure Container Registry endpoint. Defaults to cmsacontainerreg.azurecr.io')
param containerRegistryEndpoint string = 'cmsacontainerreg.azurecr.io'

@minLength(1)
@description('Optional. Version of the GPT model to deploy. Defaults to 2024-08-06.')
param gptModelVersion string = '2024-08-06'

@description('Optional. Use this parameter to use an existing AI project resource ID. Defaults to empty string.')
param azureExistingAIProjectResourceId string = ''
param existingFoundryProjectResourceId string = ''

@description('Optional. Use this parameter to use an existing Log Analytics workspace resource ID. Defaults to empty string.')
param existingLogAnalyticsWorkspaceId string = ''
Expand Down Expand Up @@ -145,8 +145,8 @@ var modelDeployment = {
version: gptModelVersion
}
sku: {
name: gptModelDeploymentType
capacity: gptModelCapacity
name: deploymentType
capacity: gptDeploymentCapacity
}
raiPolicyName: 'Microsoft.Default'
}
Expand Down Expand Up @@ -751,7 +751,7 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
aiServicesPrivateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.aiServices]!.outputs.resourceId
}
: null
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
existingFoundryProjectResourceId: existingFoundryProjectResourceId
disableLocalAuth: true //Should be set to true for WAF aligned configuration
customSubDomainName: 'aif-${solutionSuffix}'
apiProperties: {
Expand Down Expand Up @@ -937,7 +937,7 @@ module containerAppBackend 'br/public:avm/res/app/container-app:0.19.0' = {
containers: [
{
name: 'cmsabackend'
image: '${acrName}/cmsabackend:${imageVersion}'
image: '${containerRegistryEndpoint}/cmsabackend:${imageTag}'
env: concat(
[
{
Expand Down Expand Up @@ -1081,10 +1081,10 @@ module containerAppBackend 'br/public:avm/res/app/container-app:0.19.0' = {
ingressTargetPort: 8000
ingressExternal: true
scaleSettings: {
// maxReplicas: enableScaling ? 3 : 1
// maxReplicas: enableScalability ? 3 : 1
maxReplicas: 1 // maxReplicas set to 1 (not 3) due to multiple agents created per type during WAF deployment
minReplicas: 1
rules: enableScaling
rules: enableScalability
? [
{
name: 'http-scaler'
Expand Down Expand Up @@ -1125,7 +1125,7 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.19.0' = {
value: 'prod'
}
]
image: '${acrName}/cmsafrontend:${imageVersion}'
image: '${containerRegistryEndpoint}/cmsafrontend:${imageTag}'
name: 'cmsafrontend'
resources: {
cpu: 1
Expand All @@ -1136,9 +1136,9 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.19.0' = {
ingressTargetPort: 3000
ingressExternal: true
scaleSettings: {
maxReplicas: enableScaling ? 3 : 1
maxReplicas: enableScalability ? 3 : 1
minReplicas: 1
rules: enableScaling
rules: enableScalability
? [
{
name: 'http-scaler'
Expand Down
Loading
Loading