From ec813e1c5b83fd0c9f4d43156c8b499365394d1f Mon Sep 17 00:00:00 2001 From: Abdul-Microsoft Date: Fri, 16 May 2025 15:16:16 +0530 Subject: [PATCH 1/3] feat: update devcontainer configuration to include Azure CLI and post-create command --- .devcontainer/devcontainer.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7b6b93d3..77d92ed4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,12 +3,18 @@ "image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye", "forwardPorts": [50505], "features": { - "ghcr.io/azure/azure-dev/azd:latest": {} + "ghcr.io/azure/azure-dev/azd:latest": {}, + "ghcr.io/devcontainers/features/azure-cli:1": { + "installBicep": true, + "version": "latest", + "bicepVersion": "latest" + } }, "customizations": { "vscode": { "extensions": [ "ms-azuretools.azure-dev", + "ms-azuretools.vscode-azcli", "ms-azuretools.vscode-bicep", "ms-python.python", "ms-toolsai.jupyter", @@ -16,6 +22,7 @@ ] } }, + "postCreateCommand": "sudo chmod +x ./scripts/quota_check_params.sh", "postStartCommand": "git pull origin main && python3 -m pip install -r ./src/frontend/requirements.txt && python3 -m pip install -r ./src/backend/requirements.txt", "remoteUser": "vscode", "hostRequirements": { From 98b0056d164e8c5e41de158119226b35c3e7a2c4 Mon Sep 17 00:00:00 2001 From: Abdul-Microsoft Date: Fri, 16 May 2025 18:24:14 +0530 Subject: [PATCH 2/3] fix: update parameter names and documentation based on bugbash feedback --- azure.yaml | 12 ++++++------ docs/CustomizingAzdParameters.md | 10 ++++++++-- docs/DeploymentGuide.md | 2 +- docs/EXAMPLE-CustomizingAzdParameters.md | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/azure.yaml b/azure.yaml index 35deb7e7..fbf47cd5 100644 --- a/azure.yaml +++ b/azure.yaml @@ -5,19 +5,19 @@ name: modernize-your-code-solution-accelerator metadata: template: modernize-your-code-solution-accelerator@1.0 parameters: - AiLocation: + AzureAiServiceLocation: type: string default: japaneast - ResourcePrefix: + Prefix: type: string - default: bs-azdtest + default: azdtemp baseUrl: type: string default: 'https://raw.githubusercontent.com/microsoft/Modernize-your-code-solution-accelerator' deployment: mode: Incremental template: ./infra/main.bicep # Path to the main.bicep file inside the 'deployment' folder - prameters: - AiLocation: ${{ parameters.AiLocation }} - ResourcePrefix: ${{ parameters.ResourcePrefix }} + parameters: + AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }} + Prefix: ${{ parameters.Prefix }} baseUrl: ${{ parameters.baseUrl }} diff --git a/docs/CustomizingAzdParameters.md b/docs/CustomizingAzdParameters.md index ee72294c..f60b3f68 100644 --- a/docs/CustomizingAzdParameters.md +++ b/docs/CustomizingAzdParameters.md @@ -5,16 +5,22 @@ By default this template will use the environment name as the prefix to prevent > 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 Content Understanding Location (allowed values: Sweden Central, Australia East) + +```shell +azd env set AZURE_ENV_CU_LOCATION 'swedencentral' +``` + Change the Model Deployment Type (allowed values: Standard, GlobalStandard) ```shell azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard ``` -Set the Model Name (allowed values: gpt-4) +Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4) ```shell -azd env set AZURE_ENV_MODEL_NAME gpt-4 +azd env set AZURE_ENV_MODEL_NAME gpt-4o ``` Change the Model Capacity (choose a number based on available GPT model capacity in your subscription) diff --git a/docs/DeploymentGuide.md b/docs/DeploymentGuide.md index 3c610182..df1282b4 100644 --- a/docs/DeploymentGuide.md +++ b/docs/DeploymentGuide.md @@ -10,7 +10,7 @@ Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/g - Azure OpenAI Service - GPT Model Capacity -Here are some example regions where the services are available: East US, East US2, Japan East, UK South, Sweden Central. +Here are the allowed regions where the AI services are available: australiaeast, brazilsouth, canadacentral, canadaeast, eastus, eastus2, francecentral, germanywestcentral, japaneast, koreacentral, northcentralus, norwayeast, polandcentral, southafricanorth, southcentralus, southindia, swedencentral, switzerlandnorth, uaenorth, uksouth, westeurope, westus, westus3. ### ⚠️ Important: Check Azure OpenAI Quota Availability diff --git a/docs/EXAMPLE-CustomizingAzdParameters.md b/docs/EXAMPLE-CustomizingAzdParameters.md index fb90edc8..c338e3f0 100644 --- a/docs/EXAMPLE-CustomizingAzdParameters.md +++ b/docs/EXAMPLE-CustomizingAzdParameters.md @@ -3,7 +3,7 @@ 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 charaters alphanumeric unique name. +> 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 Content Understanding Location (allowed values: Sweden Central, Australia East) @@ -20,7 +20,7 @@ azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE GlobalStandard Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4) ```shell -azd env set AZURE_ENV_MODEL_NAME gpt-4o-mini +azd env set AZURE_ENV_MODEL_NAME gpt-4o ``` Change the Model Capacity (choose a number based on available GPT model capacity in your subscription) From a7e1e106ff239cc993bd410a0be2ef4a7728366d Mon Sep 17 00:00:00 2001 From: Abdul-Microsoft Date: Fri, 16 May 2025 19:19:56 +0530 Subject: [PATCH 3/3] fix: update allowed values for model name and deployment type in documentation --- docs/CustomizingAzdParameters.md | 2 +- docs/DeploymentGuide.md | 2 +- docs/EXAMPLE-CustomizingAzdParameters.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CustomizingAzdParameters.md b/docs/CustomizingAzdParameters.md index f60b3f68..a4acd6a6 100644 --- a/docs/CustomizingAzdParameters.md +++ b/docs/CustomizingAzdParameters.md @@ -17,7 +17,7 @@ Change the Model Deployment Type (allowed values: Standard, GlobalStandard) azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE Standard ``` -Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4) +Set the Model Name (allowed values: gpt-4o) ```shell azd env set AZURE_ENV_MODEL_NAME gpt-4o diff --git a/docs/DeploymentGuide.md b/docs/DeploymentGuide.md index df1282b4..3c610182 100644 --- a/docs/DeploymentGuide.md +++ b/docs/DeploymentGuide.md @@ -10,7 +10,7 @@ Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/g - Azure OpenAI Service - GPT Model Capacity -Here are the allowed regions where the AI services are available: australiaeast, brazilsouth, canadacentral, canadaeast, eastus, eastus2, francecentral, germanywestcentral, japaneast, koreacentral, northcentralus, norwayeast, polandcentral, southafricanorth, southcentralus, southindia, swedencentral, switzerlandnorth, uaenorth, uksouth, westeurope, westus, westus3. +Here are some example regions where the services are available: East US, East US2, Japan East, UK South, Sweden Central. ### ⚠️ Important: Check Azure OpenAI Quota Availability diff --git a/docs/EXAMPLE-CustomizingAzdParameters.md b/docs/EXAMPLE-CustomizingAzdParameters.md index c338e3f0..2a12aa37 100644 --- a/docs/EXAMPLE-CustomizingAzdParameters.md +++ b/docs/EXAMPLE-CustomizingAzdParameters.md @@ -17,7 +17,7 @@ Change the Model Deployment Type (allowed values: Standard, GlobalStandard) azd env set AZURE_ENV_MODEL_DEPLOYMENT_TYPE GlobalStandard ``` -Set the Model Name (allowed values: gpt-4o-mini, gpt-4o, gpt-4) +Set the Model Name (allowed values: gpt-4o) ```shell azd env set AZURE_ENV_MODEL_NAME gpt-4o