Skip to content

Commit 23d4e64

Browse files
VishalS-MicrosoftShreyas-Microsoft
andauthored
feat: Standardize Bicep Parameters for Client Advisor (#563)
* update CustomizingAzdParameters.md * update main.bicepparam * update deployment guide * update key names * Update CustomizingAzdParameters.md * Update main.bicepparam * Update DeploymentGuide.md * update customizingazdparameter file * updates files * update documents --------- Co-authored-by: Shreyas-Microsoft <v-swaikar@microsft.com>
1 parent 2f5a18e commit 23d4e64

File tree

3 files changed

+47
-51
lines changed

3 files changed

+47
-51
lines changed

docs/CustomizingAzdParameters.md

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,35 @@
33
By default this template will use the environment name as the prefix to prevent naming collisions within Azure. The parameters below show the default values. You only need to run the statements below if you need to change the values.
44

55

6-
> To override any of the parameters, run `azd env set <key> <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.
6+
> 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 charaters alphanumeric unique name.
7+
8+
## Parameters
9+
10+
| Name | Type | Default Value | Purpose |
11+
| -----------------------------| ------- | ------------------- | ---------------------------------------------------------------------------------------------------- |
12+
| `AZURE_ENV_NAME` | string | `azdtemp` | Used as a prefix for all resource names to ensure uniqueness across environments. |
13+
| `AZURE_ENV_COSMOS_LOCATION` | string | `eastus2` | Location of the Cosmos DB instance. Choose from (allowed values: `swedencentral`, `australiaeast`). |
14+
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
15+
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o-mini` | Set the GPT model name (allowed values: `gpt-4o`). |
16+
| `AZURE_ENV_MODEL_VERSION` | string | `2025-01-01-preview` | Set the Azure OpenAI API version (allowed values: 2024-08-06). |
17+
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Set the model capacity for GPT deployment. Choose based on your Azure quota and usage needs. |
18+
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Set the model name used for embeddings. |
19+
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Set the capacity for embedding model deployment. |
20+
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the image tag (allowed values: `latest`, `dev`, `hotfix`). |
21+
| `AZURE_ENV_OPENAI_LOCATION` | string | `eastus2` | Location of the Azure OpenAI resource. Choose from (allowed values: `swedencentral`, `australiaeast`). |
22+
| `AZURE_LOCATION` | string | `japaneast` | Sets the Azure region for resource deployment. |
23+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of provisioning a new one. |
24+
25+
## How to Set a Parameter
26+
To customize any of the above values, run the following command **before** `azd up`:
27+
28+
```bash
29+
azd env set <PARAMETER_NAME> <VALUE>
730

8-
9-
Change the Secondary Location (example: eastus2, westus2, etc.)
10-
11-
```shell
12-
azd env set AZURE_ENV_SECONDARY_LOCATION eastus2
13-
```
14-
15-
Change the Model Deployment Type (allowed values: Standard, GlobalStandard)
16-
17-
```shell
18-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard
19-
```
20-
21-
Set the Model Name (allowed values: gpt-4, gpt-4o)
22-
23-
```shell
24-
azd env set AZURE_ENV_MODEL_NAME gpt-4o
25-
```
26-
27-
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
28-
29-
```shell
30-
azd env set AZURE_ENV_MODEL_CAPACITY 30
31-
```
32-
33-
Change the Embedding Model
34-
35-
```shell
36-
azd env set AZURE_ENV_EMBEDDING_MODEL_NAME text-embedding-ada-002
37-
```
38-
39-
Change the Embedding Deployment Capacity (choose a number based on available embedding model capacity in your subscription)
40-
41-
```shell
42-
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY 80
4331
```
4432

45-
Set the Log Analytics Workspace Id if you need to reuse the existing workspace which is already existing
33+
**Example:**
4634

47-
```shell
48-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
35+
```bash
36+
azd env set AZURE_LOCATION westus2
4937
```

docs/DeploymentGuide.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,23 @@ Consider the following settings during your deployment to modify specific settin
104104

105105
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](CustomizingAzdParameters.md):
106106

107-
| **Setting** | **Description** | **Default value** |
108-
|------------|----------------| ------------|
109-
| **Azure OpenAI Location** | The region where OpenAI deploys | eastus2 |
110-
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | byocatemplate |
111-
| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 |
112-
| **Deployment Type** | Select from a drop-down list. | Global Standard |
113-
| **GPT Model** | OpenAI GPT model | gpt-4o-mini |
114-
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
115-
| **Embedding Model** | OpenAI embedding model | text-embedding-ada-002 |
116-
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
117-
| **Existing Log analytics workspace** | To reuse the existing Log analytics workspace Id. | |
107+
108+
| **Setting** | **Description** | **Default value** |
109+
| ------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------ |
110+
| **Azure OpenAI Location** | The region where Azure OpenAI deploys. Choose from `swedencentral`, `australiaeast`, etc. | `eastus2` |
111+
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | `azdtemp` |
112+
| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | `eastus2` |
113+
| **Deployment Type** | Select from a drop-down list (`Standard`, `GlobalStandard`). | `GlobalStandard` |
114+
| **GPT Model** | Azure OpenAI GPT model to deploy. | `gpt-4o-mini` |
115+
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. Choose based on Azure OpenAI quota. | `30` |
116+
| **Embedding Model** | OpenAI embedding model used for vector similarity. | `text-embedding-ada-002` |
117+
| **Embedding Model Capacity** | Set the capacity for **embedding models**. Choose based on usage and quota. | `80` |
118+
| **Image Tag** | The version of the Docker image to use (e.g., `latest`, `dev`, `hotfix`). | `latest` |
119+
| **Azure OpenAI API Version** | Set the API version for OpenAI model deployments. | `2025-01-01-preview` |
120+
| **AZURE\_LOCATION** | Sets the Azure region for resource deployment. | `japaneast` |
121+
| **Existing Log Analytics Workspace** | To reuse an existing Log Analytics Workspace ID instead of creating a new one. | *(empty)* |
122+
123+
118124

119125

120126
</details>

infra/main.bicepparam

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'byocatemplate
44
param cosmosLocation = readEnvironmentVariable('AZURE_ENV_COSMOS_LOCATION', 'eastus2')
55
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
66
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o-mini')
7+
param azureOpenaiAPIVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2025-01-01-preview')
78
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
8-
9+
param embeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
910
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))
11+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest')
1012
param AzureOpenAILocation = readEnvironmentVariable('AZURE_ENV_OPENAI_LOCATION', 'eastus2')
1113
param AZURE_LOCATION = readEnvironmentVariable('AZURE_LOCATION', '')
1214
param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')

0 commit comments

Comments
 (0)