diff --git a/docs/CustomizingAzdParameters.md b/docs/CustomizingAzdParameters.md index 2585336..48b146d 100644 --- a/docs/CustomizingAzdParameters.md +++ b/docs/CustomizingAzdParameters.md @@ -2,28 +2,32 @@ 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. - > To override any of the parameters, run `azd env set ` 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. -Change the Model Deployment Type (allowed values: Standard, GlobalStandard) +## Parameters -```shell -azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard -``` +| Name | Type | Default Value | Purpose | +| -------------------------------------- | ------- | ---------------- | ---------------------------------------------------------------------------------------------------- | +| `AZURE_ENV_NAME` | string | `'azdtemp'` | Used as a prefix for all resource names to ensure uniqueness across environments. | +| `AZURE_LOCATION` | string | `'japaneast'` | Location of the Azure resources. Controls where the infrastructure 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_CAPACITY` | integer | `'200'` | Set the Model Capacity (choose a number based on available GPT model capacity in your subscription). | +| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `''` | 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) | -Set the Model Name (allowed values: gpt-4) +--- -```shell -azd env set AZURE_ENV_MODEL_NAME gpt-4 -``` +## How to Set a Parameter -Change the Model Capacity (choose a number based on available GPT model capacity in your subscription) +To customize any of the above values, run the following command **before** `azd up`: -```shell -azd env set AZURE_ENV_MODEL_CAPACITY 30 +```bash +azd env set ``` -Set the Log Analytics Workspace Id if you need to reuse the existing workspace which is already existing -```shell -azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID '' +**Example:** + +```bash +azd env set AZURE_LOCATION westus2 ``` diff --git a/infra/main.bicep b/infra/main.bicep index 40b02d9..dd153ee 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -32,22 +32,23 @@ var safePrefix = length(Prefix) > 20 ? substring(Prefix, 0, 20) : Prefix @description('Location for all Ai services resources. This location can be different from the resource group location.') param AzureAiServiceLocation string // The location used for all deployed resources. This location must be in the same region as the resource group. param capacity int = 5 +param deploymentType string = 'GlobalStandard' +param llmModel string = 'gpt-4o' +param imageVersion string = 'latest' + param existingLogAnalyticsWorkspaceId string = '' var uniqueId = toLower(uniqueString(subscription().id, safePrefix, resourceGroup().location)) var UniquePrefix = 'cm${padLeft(take(uniqueId, 12), 12, '0')}' var ResourcePrefix = take('cm${safePrefix}${UniquePrefix}', 15) -var imageVersion = 'latest' var location = resourceGroup().location var dblocation = resourceGroup().location var cosmosdbDatabase = 'cmsadb' var cosmosdbBatchContainer = 'cmsabatch' var cosmosdbFileContainer = 'cmsafile' var cosmosdbLogContainer = 'cmsalog' -var deploymentType = 'GlobalStandard' var containerName = 'appstorage' -var llmModel = 'gpt-4o' var storageSkuName = 'Standard_LRS' var storageContainerName = replace(replace(replace(replace('${ResourcePrefix}cast', '-', ''), '_', ''), '.', ''),'/', '') var gptModelVersion = '2024-08-06' diff --git a/infra/main.bicepparam b/infra/main.bicepparam index 4ca1065..d337bc1 100644 --- a/infra/main.bicepparam +++ b/infra/main.bicepparam @@ -1,5 +1,9 @@ using './main.bicep' -param AzureAiServiceLocation = readEnvironmentVariable('AZURE_LOCATION','japaneast') param Prefix = readEnvironmentVariable('AZURE_ENV_NAME','azdtemp') +param AzureAiServiceLocation = readEnvironmentVariable('AZURE_LOCATION','japaneast') +param capacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '200')) +param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard') +param llmModel = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o') +param imageVersion = readEnvironmentVariable('AZURE_ENV_IMAGETAG', 'latest') param existingLogAnalyticsWorkspaceId = readEnvironmentVariable('AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID', '')