Skip to content

Commit 2526439

Browse files
Merge pull request #459 from microsoft/psl-us18810-docgen
feat: Standardize Bicep Parameters for DocGen
2 parents c2699e6 + 444e9d3 commit 2526439

File tree

3 files changed

+45
-46
lines changed

3 files changed

+45
-46
lines changed

docs/CustomizingAzdParameters.md

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,36 @@
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 charaters 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.
77
8+
## Parameters
89

9-
Change the Secondary Location (example: eastus2, westus2, etc.)
10+
| Name | Type | Example Value | Purpose |
11+
| -------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------------------------------- |
12+
| `AZURE_LOCATION` | string | `japaneast` | Sets the Azure region for resource deployment. |
13+
| `AZURE_ENV_NAME` | string | `docgen` | Sets the environment name prefix for all Azure resources. |
14+
| `AZURE_ENV_SECONDARY_LOCATION` | string | `eastus2` | Specifies a secondary Azure region. |
15+
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `Standard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
16+
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Specifies the GPT model name (allowed: `gpt-4`, `gpt-4o`). |
17+
| `AZURE_ENV_MODEL_VERSION` | string | `2024-05-13` | Set the Azure model version (allowed values: `2024-08-06`). |
18+
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2024-05-01-preview` | Specifies the API version for Azure OpenAI. |
19+
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity (based on what's available in your subscription). |
20+
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
21+
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
22+
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
23+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
1024

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)
2225

23-
```shell
24-
azd env set AZURE_ENV_MODEL_NAME gpt-4o
25-
```
26+
## How to Set a Parameter
2627

27-
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
28+
To customize any of the above values, run the following command **before** `azd up`:
2829

29-
```shell
30-
azd env set AZURE_ENV_MODEL_CAPACITY 30
30+
```bash
31+
azd env set <PARAMETER_NAME> <VALUE>
3132
```
3233

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
43-
```
34+
**Example:**
4435

45-
Set the Log Analytics Workspace Id if you need to reuse the existing workspace
46-
```shell
47-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '<Existing Log Analytics Workspace Id>'
36+
```bash
37+
azd env set AZURE_LOCATION westus2
4838
```

docs/DeploymentGuide.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
2222

2323
This will allow the scripts to run for the current session without permanently changing your system's policy.
2424

25+
26+
2527
## Deployment Options & Steps
2628

2729
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.
@@ -95,19 +97,23 @@ Consider the following settings during your deployment to modify specific settin
9597
<details>
9698
<summary><b>Configurable Deployment Settings</b></summary>
9799

98-
When you start the deployment, most parameters will have **default values**, but you can update the following settings:
99-
100-
| **Setting** | **Description** | **Default value** |
101-
|------------|----------------| ------------|
102-
| **Azure Region** | The region where resources will be created. | eastus |
103-
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | byctemplate |
104-
| **Secondary Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 |
105-
| **Deployment Type** | Select from a drop-down list. | Global Standard |
106-
| **GPT Model** | Choose from **gpt-4, gpt-4o** | gpt-4o |
107-
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
108-
| **Embedding Model** | Default: **text-embedding-ada-002**. | text-embedding-ada-002 |
109-
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
110-
| **Existing Log analytics workspace** | To reuse the existing Log analytics workspace Id. | |
100+
When you start the deployment, most parameters will have **default values**, but you can update the following settings:[here](../docs/CustomizingAzdParameters.md):
101+
102+
| **Setting** | **Description** | **Default Value** |
103+
| ------------------------------------ | --------------------------------------------------------------------------------------------- | ------------------------ |
104+
| **Azure Region** | The region where resources will be created. | `eastus` |
105+
| **Environment Name** | A **3–20 character alphanumeric** value used to generate a unique ID to prefix the resources. | `byctemplate` |
106+
| **Secondary Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | `eastus2` |
107+
| **Deployment Type** | Model deployment type (allowed: `Standard`, `GlobalStandard`). | `GlobalStandard` |
108+
| **GPT Model** | Choose from **gpt-4**, **gpt-4o**. | `gpt-4o` |
109+
| **GPT Model Version** | Version of the GPT model to use (e.g., `2024-08-06`). | `2024-05-13` |
110+
| **OpenAI API Version** | Azure OpenAI API version used for deployments. | `2024-05-01-preview` |
111+
| **GPT Model Deployment Capacity** | Configure the capacity for **GPT model deployments** (in thousands). | `30k` |
112+
| **Embedding Model** | The embedding model used by the app. | `text-embedding-ada-002` |
113+
| **Embedding Model Capacity** | Configure the capacity for **embedding model deployments** (in thousands). | `80k` |
114+
| **Image Tag** | Image version for deployment (allowed: `latest`, `dev`, `hotfix`). | `latest` |
115+
| **Existing Log Analytics Workspace** | If reusing a Log Analytics Workspace, specify the ID. | *(none)* |
116+
111117

112118
</details>
113119

infra/main.bicepparam

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION'
66
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
77
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
88
param gptModelVersion = readEnvironmentVariable('AZURE_ENV_MODEL_VERSION', '2024-05-13')
9+
param azureOpenaiAPIVersion = readEnvironmentVariable('AZURE_ENV_OPENAI_API_VERSION', '2024-05-01-preview')
910
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
11+
param embeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
12+
param imageTag = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest')
1013

1114
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))
1215
param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')

0 commit comments

Comments
 (0)