Skip to content

Commit 00d289d

Browse files
Merge pull request #177 from microsoft/psl-us18810-cps
feat: Standardize Bicep Parameters for Content Processing
2 parents fb84df0 + 81ff327 commit 00d289d

3 files changed

Lines changed: 25 additions & 27 deletions

File tree

docs/CustomizingAzdParameters.md

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,33 @@
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-
Set the Environment Name Prefix
10-
```shell
11-
azd env set AZURE_ENV_NAME 'cps'
12-
```
10+
| Name | Type | Example Value | Purpose |
11+
| -------------------------------------- | ------- | --------------------------- | ------------------------------------------------------------------------------------- |
12+
| `AZURE_ENV_NAME` | string | `cps` | Sets the environment name prefix for all Azure resources. |
13+
| `AZURE_ENV_SECONDARY_LOCATION` | string | `eastus2` | Specifies a secondary Azure region. |
14+
| `AZURE_ENV_CU_LOCATION` | string | `WestUS` | Sets the location for the Azure Content Understanding service. |
15+
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the model deployment type (allowed values: `Standard`, `GlobalStandard`). |
16+
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Specifies the GPT model name (allowed values: `gpt-4o`).
17+
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Specifies the GPT model version (allowed values: `2024-08-06`). |
18+
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Sets the model capacity (choose based on your subscription's available GPT capacity). |
19+
| `USE_LOCAL_BUILD` | boolean | `false` | Indicates whether to use a local container build for deployment. |
20+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of provisioning a new one. |
1321

14-
Change the Azure Content Understanding Service Location (example: eastus2, westus2, etc.)
15-
```shell
16-
azd env set AZURE_ENV_CU_LOCATION 'West US'
17-
```
1822

19-
Change the Deployment Type (allowed values: Standard, GlobalStandard)
20-
```shell
21-
azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE 'GlobalStandard'
22-
```
23+
## How to Set a Parameter
2324

24-
Set the Model Name (allowed values: gpt-4o)
25-
```shell
26-
azd env set AZURE_ENV_MODEL_NAME 'gpt-4o'
27-
```
25+
To customize any of the above values, run the following command **before** `azd up`:
2826

29-
Change the Model Capacity (choose a number based on available GPT model capacity in your subscription)
30-
```shell
31-
azd env set AZURE_ENV_MODEL_CAPACITY '30'
27+
```bash
28+
azd env set <PARAMETER_NAME> <VALUE>
3229
```
3330

34-
Change if the deployment should use a local build of the containers
35-
```shell
36-
azd env set USE_LOCAL_BUILD 'false'
37-
```
31+
**Example:**
3832

39-
Set the Log Analytics Workspace Id if you need to reuse the existing workspace
40-
```shell
41-
azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '<Existing Log Analytics Workspace Id>'
33+
```bash
34+
azd env set AZURE_LOCATION westus2
4235
```

docs/DeploymentGuide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ This will allow the scripts to run for the current session without permanently c
3636

3737
<br/>
3838

39+
### **Configurable Deployment Settings**
40+
41+
When you start the deployment, most parameters will have **default values**, but you can update the following settings by following the steps [here](../docs/CustomizingAzdParameters.md):
42+
3943
## Deployment Options & Steps
4044

4145
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.

infra/main.bicepparam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using './main.bicep'
22

33
param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'cps')
4+
param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION', 'EastUs2')
45
param contentUnderstandingLocation = readEnvironmentVariable('AZURE_ENV_CU_LOCATION', 'WestUS')
56
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
67
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')

0 commit comments

Comments
 (0)