Skip to content

Commit 4782a3e

Browse files
added more paramter in bicep file and md file
1 parent f47084a commit 4782a3e

File tree

5 files changed

+42
-12
lines changed

5 files changed

+42
-12
lines changed

docs/CustomizingAzdParameters.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ By default this template will use the environment name as the prefix to prevent
55
> To override any of the parameters, run `azd env set <PARAMETER_NAME> <VALUE>` before running `azd up`. On the first azd command, it will prompt you for the environment name. Be sure to choose 3-20 characters alphanumeric unique name.
66
77
## Parameters
8-
| Name | Type | Default Value | Purpose |
9-
| ---------------------------- | ------ | ----------------- | --------------------------------------------------------------------------------------------------- |
10-
| `AZURE_ENV_NAME` | string | `macae` | Used as a prefix for all resource names to ensure uniqueness across environments. |
11-
| `AZURE_LOCATION` | string | `japaneast` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
12-
| `AZURE_ENV_OPENAI_LOCATION` | string | `swedencentral` | Specifies the region for OpenAI resource deployment. |
13-
| `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. |
8+
9+
| Name | Type | Default Value | Purpose |
10+
| ------------------------------- | ------ | ----------------- | --------------------------------------------------------------------------------------------------- |
11+
| `AZURE_ENV_NAME` | string | `macae` | Used as a prefix for all resource names to ensure uniqueness across environments. |
12+
| `AZURE_LOCATION` | string | `swedencentral` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
13+
| `AZURE_ENV_OPENAI_LOCATION` | string | `swedencentral` | Specifies the region for OpenAI resource deployment. |
14+
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
15+
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Specifies the name of the GPT model to be deployed. |
16+
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Version of the GPT model to be used for deployment. |
17+
| `AZURE_ENV_IMAGETAG` | string | `latest` | Docker image tag used for container deployments. |
18+
| `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. |
1419

1520
---
1621

docs/DeploymentGuide.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,12 @@ When you start the deployment, most parameters will have **default values**, but
139139
| **Setting** | **Description** | **Default value** |
140140
| ------------------------------ | ------------------------------------------------------------------------------------ | ----------------- |
141141
| **Environment Name** | Used as a prefix for all resource names to ensure uniqueness across environments. | macae |
142-
| **Azure Region** | Location of the Azure resources. Controls where the infrastructure will be deployed. | japaneast |
142+
| **Azure Region** | Location of the Azure resources. Controls where the infrastructure will be deployed. | swedencentral |
143143
| **OpenAI Deployment Location** | Specifies the region for OpenAI resource deployment. | swedencentral |
144+
| **Model Deployment Type** | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). | GlobalStandard |
145+
| **GPT Model Name** | Specifies the name of the GPT model to be deployed. | gpt-4o |
146+
| **GPT Model Version** | Version of the GPT model to be used for deployment. | 2024-08-06 |
147+
| **Image Tag** | Docker image tag used for container deployments. | latest |
144148
| **Enable Telemetry** | Enables telemetry for monitoring and diagnostics. | true |
145149

146150

infra/main.bicep

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ param enableTelemetry bool = true
1616
@description('Azure OpenAI Location')
1717
param azureOpenAILocation string
1818

19+
@minLength(1)
20+
@description('Name of the GPT model to deploy:')
21+
param gptModelName string = 'gpt-4o'
22+
23+
param gptModelVersion string = '2024-08-06'
24+
25+
@minLength(1)
26+
@description('GPT model deployment type:')
27+
param modelDeploymentType string = 'GlobalStandard'
28+
29+
@description('Set the image tag for the container images used in the solution. Default is "latest".')
30+
param imageTag string = 'latest'
31+
1932
// @description('Set this if you want to deploy to a different region than the resource group. Otherwise, it will use the resource group location by default.')
2033
// param AZURE_LOCATION string=''
2134
// param solutionLocation string = empty(AZURE_LOCATION) ? resourceGroup().location
@@ -194,7 +207,7 @@ param containerAppConfiguration containerAppConfigurationType = {
194207
containerMemory: '4.0Gi'
195208
containerImageRegistryDomain: 'biabcontainerreg.azurecr.io'
196209
containerImageName: 'macaebackend'
197-
containerImageTag: 'latest'
210+
containerImageTag: imageTag
198211
containerName: 'backend'
199212
ingressTargetPort: 8000
200213
maxReplicas: 1
@@ -218,7 +231,7 @@ param webSiteConfiguration webSiteConfigurationType = {
218231
location: solutionLocation
219232
containerImageRegistryDomain: 'biabcontainerreg.azurecr.io'
220233
containerImageName: 'macaefrontend'
221-
containerImageTag: 'latest'
234+
containerImageTag: imageTag
222235
containerName: 'backend'
223236
tags: tags
224237
environmentResourceId: null //Default value set on module configuration
@@ -731,10 +744,10 @@ var aiFoundryAiServicesResourceName = aiFoundryAiServicesConfiguration.?name ??
731744
var aiFoundryAIservicesEnabled = aiFoundryAiServicesConfiguration.?enabled ?? true
732745
var aiFoundryAiServicesModelDeployment = {
733746
format: 'OpenAI'
734-
name: 'gpt-4o'
735-
version: '2024-08-06'
747+
name: gptModelName
748+
version: gptModelVersion
736749
sku: {
737-
name: 'GlobalStandard'
750+
name: modelDeploymentType
738751
//Curently the capacity is set to 140 for opinanal performance.
739752
capacity: aiFoundryAiServicesConfiguration.?modelCapacity ?? 140
740753
}

infra/main.bicepparam

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ using './main.bicep'
33
param solutionPrefix = readEnvironmentVariable('AZURE_ENV_NAME', 'macae')
44
param solutionLocation = readEnvironmentVariable('AZURE_LOCATION', 'swedencentral')
55
param azureOpenAILocation = readEnvironmentVariable('AZURE_ENV_OPENAI_LOCATION', 'swedencentral')
6+
param modelDeploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
7+
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
8+
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-08-06')
9+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest')
610
param enableTelemetry = bool(readEnvironmentVariable('AZURE_ENV_ENABLE_TELEMETRY', 'true'))
711
param logAnalyticsWorkspaceConfiguration = {
812
dataRetentionInDays: 30

infra/main.waf-aligned.bicepparam

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ using './main.bicep'
33
param solutionPrefix = readEnvironmentVariable('AZURE_ENV_NAME', 'macae')
44
param solutionLocation = readEnvironmentVariable('AZURE_LOCATION', 'swedencentral')
55
param azureOpenAILocation = readEnvironmentVariable('AZURE_ENV_OPENAI_LOCATION', 'swedencentral')
6+
param modelDeploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
7+
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
8+
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-08-06')
9+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest')
610
param enableTelemetry = bool(readEnvironmentVariable('AZURE_ENV_ENABLE_TELEMETRY', 'true'))
711
param virtualMachineConfiguration = {
812
adminUsername: 'adminuser'

0 commit comments

Comments
 (0)