Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/deploy-orchestrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ env:

jobs:
docker-build:
if: inputs.trigger_type == 'workflow_dispatch' && inputs.build_docker_image == true
uses: ./.github/workflows/job-docker-build.yml
with:
trigger_type: ${{ inputs.trigger_type }}
build_docker_image: ${{ inputs.build_docker_image }}
secrets: inherit

deploy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
workflow_dispatch: #Allow manual triggering
env:
GPT_MIN_CAPACITY: 150
GPT_MIN_CAPACITY: 50
O4_MINI_MIN_CAPACITY: 50
GPT41_MINI_MIN_CAPACITY: 50
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ jobs:
azd env set AZURE_ENV_IMAGE_TAG="$INPUT_IMAGE_TAG"
if [[ "$INPUT_BUILD_DOCKER_IMAGE" == "true" ]]; then
ACR_NAME=$(echo "${{ secrets.ACR_TEST_LOGIN_SERVER }}")
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}")
azd env set AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT="$ACR_NAME"
echo "Set ACR name to: $ACR_NAME"
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
# Set ACR name only when building Docker image
if ($env:INPUT_BUILD_DOCKER_IMAGE -eq "true") {
$ACR_NAME = "${{ secrets.ACR_TEST_LOGIN_SERVER }}"
$ACR_NAME = "${{ vars.ACR_TEST_LOGIN_SERVER }}"
azd env set AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT="$ACR_NAME"
Write-Host "Set ACR name to: $ACR_NAME"
} else {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ on:
value: ${{ jobs.azure-setup.outputs.QUOTA_FAILED }}

env:
GPT_MIN_CAPACITY: 150
GPT_MIN_CAPACITY: 50
O4_MINI_MIN_CAPACITY: 50
GPT41_MINI_MIN_CAPACITY: 50
Comment thread
Akhileswara-Microsoft marked this conversation as resolved.
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/job-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: Docker Build Job
name: Build & Push Test Images (Feature Branch)
on:
workflow_call:
inputs:
trigger_type:
description: 'Trigger type (workflow_dispatch, pull_request, schedule)'
required: true
type: string
build_docker_image:
description: 'Build And Push Docker Image (Optional)'
required: false
default: false
type: boolean
outputs:
IMAGE_TAG:
description: "Generated Docker Image Tag"
value: ${{ jobs.docker-build.outputs.IMAGE_TAG }}
workflow_dispatch:

permissions:
contents: read
id-token: write

env:
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}

jobs:
docker-build:
if: inputs.trigger_type == 'workflow_dispatch' && inputs.build_docker_image == true
runs-on: ubuntu-latest
environment: production
outputs:
Expand Down Expand Up @@ -55,7 +49,11 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Log in to Azure Container Registry
run: az acr login --name ${{ secrets.ACR_TEST_LOGIN_SERVER }}
shell: bash
run: |
# Extract registry name from login server (e.g., myacr.azurecr.io -> myacr)
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}" | cut -d'.' -f1)
az acr login --name "$ACR_NAME"
Comment thread
Vamshi-Microsoft marked this conversation as resolved.

- name: Build and optionally push Backend Docker image
uses: docker/build-push-action@v7
Comment thread
Vamshi-Microsoft marked this conversation as resolved.
Expand All @@ -66,8 +64,8 @@ jobs:
file: ./src/backend/Dockerfile
push: true
tags: |
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaebackend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}

- name: Build and optionally push Frontend Docker image
uses: docker/build-push-action@v7
Comment thread
Vamshi-Microsoft marked this conversation as resolved.
Expand All @@ -78,8 +76,8 @@ jobs:
file: ./src/App/Dockerfile
push: true
tags: |
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaefrontend:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
- name: Build and optionally push MCP Docker image
uses: docker/build-push-action@v7
Comment thread
Vamshi-Microsoft marked this conversation as resolved.
env:
Expand All @@ -89,8 +87,8 @@ jobs:
file: ./src/mcp_server/Dockerfile
push: true
tags: |
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ secrets.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}
${{ vars.ACR_TEST_LOGIN_SERVER }}/macaemcp:${{ steps.generate_docker_tag.outputs.IMAGE_TAG }}_${{ github.run_number }}
- name: Verify Docker Image Build
shell: bash
run: |
Expand All @@ -101,7 +99,7 @@ jobs:
if: always()
shell: bash
run: |
ACR_NAME=$(echo "${{ secrets.ACR_TEST_LOGIN_SERVER }}")
ACR_NAME=$(echo "${{ vars.ACR_TEST_LOGIN_SERVER }}")
echo "## 🐳 Docker Build Job Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ By default this template will use the environment name as the prefix to prevent
| `AZURE_ENV_MODEL_4_1_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
| `AZURE_ENV_MODEL_4_1_NAME` | string | `gpt-4.1` | Specifies the name of the GPT model to be deployed. |
| `AZURE_ENV_MODEL_4_1_VERSION` | string | `2025-04-14` | Version of the GPT model to be used for deployment. |
| `AZURE_ENV_MODEL_4_1_CAPACITY` | int | `150` | Sets the GPT model capacity. |
| `AZURE_ENV_MODEL_4_1_CAPACITY` | int | `50` | Sets the GPT model capacity. |
| `AZURE_ENV_REASONING_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
| `AZURE_ENV_REASONING_MODEL_NAME` | string | `o4-mini` | Specifies the name of the reasoning GPT model to be deployed. |
| `AZURE_ENV_REASONING_MODEL_VERSION` | string | `2025-04-16` | Version of the reasoning GPT model to be used for deployment. |
Expand Down
4 changes: 2 additions & 2 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Ensure you have access to an [Azure subscription](https://azure.microsoft.com/fr
📖 **Follow:** [Quota Check Instructions](./quota_check.md) to ensure sufficient capacity.

**Default Quota Configuration:**
- **GPT-4.1:** 150k tokens
- **GPT-4.1:** 50k tokens
- **o4-mini:** 50k tokens
- **GPT-4.1-mini:** 50k tokens

Expand Down Expand Up @@ -246,7 +246,7 @@ You can customize various deployment settings before running `azd up`, including
<details>
<summary><b>[Optional] Quota Recommendations</b></summary>

By default, the **GPT model capacity** in deployment is set to **150k tokens**.
By default, the **GPT model capacity** in deployment is set to **50k tokens**.

To adjust quota settings, follow these [steps](./AzureGPTQuotaSettings.md).

Expand Down
12 changes: 6 additions & 6 deletions docs/quota_check.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Check Quota Availability Before Deployment

Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
> **For Global Standard | GPT-4o - the capacity to at least 150k tokens for optimal performance.**
> **For Global Standard | GPT-4.1 - the capacity to at least 50k tokens for optimal performance.**

### Login if you have not done so already
```
Expand All @@ -16,7 +16,7 @@ az login --use-device-code

### 📌 Default Models & Capacities:
```
gpt4.1:150,o4-mini:50,gpt4.1-mini:50
gpt4.1:50,o4-mini:50,gpt4.1-mini:50
```
### 📌 Default Regions:
```
Expand All @@ -42,23 +42,23 @@ australiaeast, eastus2, francecentral, japaneast, norwayeast, swedencentral, uks
```
✔️ Check specific model(s) in default regions:
```
./quota_check_params.sh --models gpt4.1:150
./quota_check_params.sh --models gpt4.1:50
```
✔️ Check default models in specific region(s):
```
./quota_check_params.sh --regions eastus2,westus
```
✔️ Passing Both models and regions:
```
./quota_check_params.sh --models gpt4.1:150 --regions eastus2,westus
./quota_check_params.sh --models gpt4.1:50 --regions eastus2,westus
```
✔️ All parameters combined:
```
./quota_check_params.sh --models gpt4.1:150 --regions eastus2,westus --verbose
./quota_check_params.sh --models gpt4.1:50 --regions eastus2,westus --verbose
```
✔️ Multiple models with single region:
```
./quota_check_params.sh --models gpt4.1:150,gpt4.1-mini:50 --regions eastus2 --verbose
./quota_check_params.sh --models gpt4.1:50,gpt4.1-mini:50 --regions eastus2 --verbose
```

### **Sample Output**
Expand Down
18 changes: 9 additions & 9 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var deployingUserPrincipalId = deployerInfo.objectId
azd: {
type: 'location'
usageName: [
'OpenAI.GlobalStandard.gpt4.1, 150'
'OpenAI.GlobalStandard.gpt4.1, 50'
'OpenAI.GlobalStandard.o4-mini, 50'
'OpenAI.GlobalStandard.gpt4.1-mini, 50'
]
Expand Down Expand Up @@ -100,8 +100,8 @@ param gptReasoningModelDeploymentType string = 'GlobalStandard'
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
param gptDeploymentCapacity int = 50

@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
param gpt4_1ModelCapacity int = 150
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
param gpt4_1ModelCapacity int = 50

@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
param gptReasoningModelCapacity int = 50
Expand Down Expand Up @@ -1604,12 +1604,12 @@ module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.32.0' = {
roleAssignments: [
{
principalId: userAssignedIdentity.outputs.principalId
roleDefinitionIdOrName: 'Storage Blob Data Contributor'
roleDefinitionIdOrName: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe' // Storage Blob Data Contributor
principalType: 'ServicePrincipal'
}
{
principalId: deployingUserPrincipalId
roleDefinitionIdOrName: 'Storage Blob Data Contributor'
roleDefinitionIdOrName: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe' // Storage Blob Data Contributor
principalType: deployerPrincipalType
}
]
Expand Down Expand Up @@ -1732,22 +1732,22 @@ module searchServiceUpdate 'br/public:avm/res/search/search-service:0.12.0' = {
roleAssignments: [
{
principalId: userAssignedIdentity.outputs.principalId
roleDefinitionIdOrName: 'Search Index Data Contributor'
roleDefinitionIdOrName: '8ebe5a00-799e-43f5-93ac-243d3dce84a7' // Search Index Data Contributor
principalType: 'ServicePrincipal'
}
{
principalId: deployingUserPrincipalId
roleDefinitionIdOrName: 'Search Index Data Contributor'
roleDefinitionIdOrName: '8ebe5a00-799e-43f5-93ac-243d3dce84a7' // Search Index Data Contributor
principalType: deployerPrincipalType
}
{
principalId: aiFoundryAiProjectPrincipalId
roleDefinitionIdOrName: 'Search Index Data Reader'
roleDefinitionIdOrName: '1407120a-92aa-4202-b7e9-c0e197c71c8f' // Search Index Data Reader
principalType: 'ServicePrincipal'
}
{
principalId: aiFoundryAiProjectPrincipalId
roleDefinitionIdOrName: 'Search Service Contributor'
roleDefinitionIdOrName: '7ca78c08-252a-4471-8644-bb5ff32d4ba0' // Search Service Contributor
principalType: 'ServicePrincipal'
}
]
Expand Down
Loading
Loading