Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
ed85d80
feat: Enhance post-deploy script with non-interactive mode and use ca…
Akhileswara-Microsoft Jun 15, 2026
990b32f
fix: Update post_deploy.sh to handle service principal ID resolution …
Akhileswara-Microsoft Jun 15, 2026
c1a964a
feat: Add minimum capacity for gpt-image-1.5 model in checkquota script
Akhileswara-Microsoft Jun 15, 2026
6493698
fix: Update allowed regions in main.bicep to include polandcentral an…
Akhileswara-Microsoft Jun 15, 2026
219c75f
feat: Add support for AI Foundry resource ID and project name resolut…
Vamshi-Microsoft Jun 15, 2026
bac5eb0
feat: Add GPT_IMAGE_MIN_CAPACITY to deployment workflows and checkquo…
Akhileswara-Microsoft Jun 15, 2026
223c2c0
fix: Update GPT_IMAGE_MIN_CAPACITY to 4 in deployment workflows and c…
Akhileswara-Microsoft Jun 15, 2026
91e83cb
fix: Remove redundant team configuration upload step from post-deploy…
Akhileswara-Microsoft Jun 16, 2026
8c7bb05
fix: Remove sample dataset names from Azure deployment parameters
Akhileswara-Microsoft Jun 16, 2026
6cfa91b
fix: Update deployment scripts to use PowerShell and enhance use case…
Vamshi-Microsoft Jun 17, 2026
77a703d
fix: Update GPT_IMAGE_MIN_CAPACITY to 1 across deployment scripts and…
Vamshi-Microsoft Jun 17, 2026
0522fd0
fix: Set Python environment variables for encoding in deployment work…
Vamshi-Microsoft Jun 17, 2026
18c24d0
fix: Update GPT_IMAGE_MIN_CAPACITY to 4 in deployment configurations …
Vamshi-Microsoft Jun 17, 2026
cabd92a
fix: Update gpt-image-1.5 deployment capacity to 4 in Bicep files and…
Akhileswara-Microsoft Jun 17, 2026
79e2ac2
fix: Enhance subscription handling in post-deploy script for non-inte…
Akhileswara-Microsoft Jun 17, 2026
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
2 changes: 2 additions & 0 deletions .github/workflows/deploy-waf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
GPT_MIN_CAPACITY: 1
O4_MINI_MIN_CAPACITY: 1
GPT41_MINI_MIN_CAPACITY: 1
GPT_IMAGE_MIN_CAPACITY: 1
steps:
- name: Checkout Code
uses: actions/checkout@v6
Expand All @@ -43,6 +44,7 @@ jobs:
GPT_MIN_CAPACITY: ${{ env.GPT_MIN_CAPACITY }}
O4_MINI_MIN_CAPACITY: ${{ env.O4_MINI_MIN_CAPACITY }}
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
GPT_IMAGE_MIN_CAPACITY: ${{ env.GPT_IMAGE_MIN_CAPACITY }}
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
run: |
chmod +x infra/scripts/checkquota.sh
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
GPT_MIN_CAPACITY: 150
O4_MINI_MIN_CAPACITY: 50
GPT41_MINI_MIN_CAPACITY: 50
GPT_IMAGE_MIN_CAPACITY: 4
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
Expand Down Expand Up @@ -50,6 +51,7 @@ jobs:
GPT_MIN_CAPACITY: ${{ env.GPT_MIN_CAPACITY }}
O4_MINI_MIN_CAPACITY: ${{ env.O4_MINI_MIN_CAPACITY }}
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
GPT_IMAGE_MIN_CAPACITY: ${{ env.GPT_IMAGE_MIN_CAPACITY }}
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
run: |
chmod +x infra/scripts/checkquota.sh
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/job-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,19 +348,34 @@ jobs:
INPUT_RESOURCE_GROUP_NAME: ${{ inputs.RESOURCE_GROUP_NAME }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP: ${{ inputs.RESOURCE_GROUP_NAME }}
AZURE_ENV_NAME: ${{ steps.get_output_linux.outputs.AZURE_ENV_NAME }}
BACKEND_URL: ${{ steps.get_output_linux.outputs.BACKEND_URL }}
AZURE_STORAGE_ACCOUNT_NAME: ${{ steps.get_output_linux.outputs.AZURE_STORAGE_ACCOUNT_NAME }}
AZURE_STORAGE_CONTAINER_NAME: sample-dataset
AZURE_AI_SEARCH_NAME: ${{ steps.get_output_linux.outputs.AZURE_AI_SEARCH_NAME }}
AZURE_AI_SEARCH_INDEX_NAME: sample-dataset-index
AZURE_ENV_NAME: ${{ steps.get_output_linux.outputs.AZURE_ENV_NAME }}
# Needed by post_deploy.sh to resolve the principal id when the workflow
# is signed in as a service principal (no interactive user).
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
run: |
set -e

# Use the same login pattern as selecting_team_config_and_data.sh:
# confirm an Azure CLI session is active. The preceding "Refresh Azure
# login" step re-establishes credentials, so we only verify here.
if az account show >/dev/null 2>&1; then
echo "Already authenticated with Azure."
else
echo "ERROR: Not authenticated with Azure. The 'Refresh Azure login' step must run before this step."
exit 1
fi
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"

# Upload team configurations and index sample data in one step
# Automatically select "6" (All use cases) for non-interactive deployment
echo "6" | bash infra/scripts/selecting_team_config_and_data.sh

# Run the unified post-deploy script non-interactively.
# --use-case 7 installs all use cases; --resource-group enables fallbacks
# to deployment outputs / naming-convention if azd env values are missing.
bash infra/scripts/post_deploy.sh \
--resource-group "$INPUT_RESOURCE_GROUP_NAME" \
--use-case 7 \
--non-interactive

- name: Generate Deployment Summary
if: always()
Expand Down
34 changes: 24 additions & 10 deletions .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,24 +348,38 @@ jobs:
azd auth login --client-id "${{ secrets.AZURE_CLIENT_ID }}" --federated-credential-provider "github" --tenant-id "${{ secrets.AZURE_TENANT_ID }}"

- name: Run Post deployment scripts
shell: bash
shell: pwsh
env:
INPUT_RESOURCE_GROUP_NAME: ${{ inputs.RESOURCE_GROUP_NAME }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP: ${{ inputs.RESOURCE_GROUP_NAME }}
AZURE_ENV_NAME: ${{ steps.get_output_windows.outputs.AZURE_ENV_NAME }}
BACKEND_URL: ${{ steps.get_output_windows.outputs.BACKEND_URL }}
AZURE_STORAGE_ACCOUNT_NAME: ${{ steps.get_output_windows.outputs.AZURE_STORAGE_ACCOUNT_NAME }}
AZURE_STORAGE_CONTAINER_NAME: sample-dataset
AZURE_AI_SEARCH_NAME: ${{ steps.get_output_windows.outputs.AZURE_AI_SEARCH_NAME }}
AZURE_AI_SEARCH_INDEX_NAME: sample-dataset-index
AZURE_ENV_NAME: ${{ steps.get_output_windows.outputs.AZURE_ENV_NAME }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
PYTHONUTF8: '1'
PYTHONIOENCODING: 'utf-8'
run: |
set -e
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"

# Upload team configurations and index sample data in one step
# Automatically select "6" (All use cases) for non-interactive deployment
echo "6" | bash infra/scripts/selecting_team_config_and_data.sh
$ErrorActionPreference = "Stop"
# Confirm an Azure CLI session is active. The preceding "Refresh Azure
# login" step re-establishes credentials, so we only verify here.
az account show 2>$null | Out-Null
if ($LASTEXITCODE -ne 0) {
Write-Error "Not authenticated with Azure. The 'Refresh Azure login' step must run before this step."
exit 1
}
Write-Host "Already authenticated with Azure."
az account set --subscription "$env:AZURE_SUBSCRIPTION_ID"

# Run the unified PowerShell post-deploy script non-interactively.
# -UseCase 7 installs all use cases; -ResourceGroup enables fallbacks
# to deployment outputs / naming-convention if azd env values are missing.
./infra/scripts/post_deploy.ps1 `
-ResourceGroup "$env:INPUT_RESOURCE_GROUP_NAME" `
-UseCase 7 `
-NonInteractive
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

- name: Generate Deployment Summary
if: always()
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/job-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ env:
GPT_MIN_CAPACITY: 150
O4_MINI_MIN_CAPACITY: 50
GPT41_MINI_MIN_CAPACITY: 50
GPT_IMAGE_MIN_CAPACITY: 4
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
WAF_ENABLED: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.waf_enabled || false) || false }}
EXP: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.EXP || false) || false }}
Expand Down Expand Up @@ -309,6 +310,7 @@ jobs:
GPT_MIN_CAPACITY: ${{ env.GPT_MIN_CAPACITY }}
O4_MINI_MIN_CAPACITY: ${{ env.O4_MINI_MIN_CAPACITY }}
GPT41_MINI_MIN_CAPACITY: ${{ env.GPT41_MINI_MIN_CAPACITY }}
GPT_IMAGE_MIN_CAPACITY: ${{ env.GPT_IMAGE_MIN_CAPACITY }}
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
run: |
chmod +x infra/scripts/checkquota.sh
Expand Down
6 changes: 3 additions & 3 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var deployerInfo = deployer()
var deployingUserPrincipalId = deployerInfo.objectId

// Restricting deployment to only supported Azure OpenAI regions validated with GPT-4o model
@allowed(['australiaeast', 'eastus2', 'francecentral', 'japaneast', 'norwayeast', 'swedencentral', 'uksouth', 'westus', 'westus3'])
@allowed(['polandcentral', 'uaenorth', 'australiaeast', 'eastus2', 'francecentral', 'japaneast', 'norwayeast', 'swedencentral', 'uksouth', 'westus', 'westus3'])
@metadata({
azd: {
type: 'location'
Expand Down Expand Up @@ -137,8 +137,8 @@ param gpt5MiniModelCapacity int = 50
@description('Optional. GPT image model deployment type. Defaults to GlobalStandard.')
param gptImageModelDeploymentType string = 'GlobalStandard'

@description('Optional. gpt-image-1.5 deployment capacity (RPM). Defaults to 5 to support concurrent marketing-image generation across multiple sessions.')
param gptImageModelCapacity int = 5
@description('Optional. gpt-image-1.5 deployment capacity (RPM). Defaults to 4 to support concurrent marketing-image generation across multiple sessions.')
param gptImageModelCapacity int = 4

@description('Optional. The tags to apply to all deployed Azure resources.')
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
Expand Down
4 changes: 2 additions & 2 deletions infra/main_custom.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ param gpt4_1ModelCapacity int = 150
@description('Optional. o4-mini deployment capacity (thousand TPM). Used by the Magentic manager (multi-turn planning + reflection). Defaults to 100.')
param gptReasoningModelCapacity int = 100

@description('Optional. gpt-image-1.5 deployment capacity (RPM). Defaults to 5 to support concurrent marketing-image generation across multiple sessions.')
param gptImageModelCapacity int = 5
@description('Optional. gpt-image-1.5 deployment capacity (RPM). Defaults to 4 to support concurrent marketing-image generation across multiple sessions.')
param gptImageModelCapacity int = 4

@description('Optional. The tags to apply to all deployed Azure resources.')
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
Expand Down
4 changes: 3 additions & 1 deletion infra/scripts/checkquota.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY}"
O4_MINI_MIN_CAPACITY="${O4_MINI_MIN_CAPACITY}"
GPT41_MINI_MIN_CAPACITY="${GPT41_MINI_MIN_CAPACITY}"
GPT_IMAGE_MIN_CAPACITY="${GPT_IMAGE_MIN_CAPACITY:-4}"

echo "🔄 Validating required environment variables..."
if [[ -z "$SUBSCRIPTION_ID" || -z "$REGIONS" ]]; then
echo "❌ ERROR: Missing required environment variables."
echo "Required: AZURE_SUBSCRIPTION_ID, AZURE_REGIONS"
echo "Optional: O4_MINI_MIN_CAPACITY (default: 50), GPT41_MINI_MIN_CAPACITY (default: 50)"
echo "Optional: O4_MINI_MIN_CAPACITY (default: 50), GPT41_MINI_MIN_CAPACITY (default: 50), GPT_IMAGE_MIN_CAPACITY (default: 4)"
exit 1
fi

Expand All @@ -28,6 +29,7 @@ declare -A MIN_CAPACITY=(
["OpenAI.GlobalStandard.o4-mini"]="${O4_MINI_MIN_CAPACITY}"
["OpenAI.GlobalStandard.gpt4.1"]="${GPT_MIN_CAPACITY}"
["OpenAI.GlobalStandard.gpt4.1-mini"]="${GPT41_MINI_MIN_CAPACITY}"
["OpenAI.GlobalStandard.gpt-image-1.5"]="${GPT_IMAGE_MIN_CAPACITY}"
)

VALID_REGION=""
Expand Down
Loading