Skip to content

Commit 274c131

Browse files
fix: Remove preprovision hooks from azure.yaml and update main.parameters.json, adjust gptDeploymentCapacity in main.bicep
1 parent 3386afb commit 274c131

File tree

5 files changed

+13
-37
lines changed

5 files changed

+13
-37
lines changed

azure.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@ metadata:
99
1010

1111
hooks:
12-
preprovision:
13-
windows:
14-
run: |
15-
# $timestamp = Get-Date -Format "yyyyMMdd-HHmmss"; $logFile = "azd_preprovision_$timestamp.log"; ./infra/scripts/docker-build.ps1 $env:AZURE_SUBSCRIPTION_ID $env:AZURE_ENV_NAME $env:AZURE_LOCATION $env:AZURE_RESOURCE_GROUP $env:USE_LOCAL_BUILD $env:AZURE_ENV_IMAGETAG *>&1 | Tee-Object -FilePath $logFile
16-
shell: pwsh
17-
continueOnError: false
18-
interactive: true
19-
posix:
20-
run: |
21-
# timestamp=$(date +"%Y%m%d-%H%M%S"); logFile="azd_preprovision_$timestamp.log"; sed -i 's/\r$//' ./infra/scripts/docker-build.sh; ./infra/scripts/docker-build.sh "$AZURE_SUBSCRIPTION_ID" "$AZURE_ENV_NAME" "$AZURE_LOCATION" "$AZURE_RESOURCE_GROUP" "$USE_LOCAL_BUILD" "$AZURE_ENV_IMAGETAG" 2>&1 | tee "$logFile"
22-
shell: sh
23-
continueOnError: false
24-
interactive: true
2512
postprovision:
2613
windows:
2714
run: |

documents/CustomizingAzdParameters.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ By default this template will use the environment name as the prefix to prevent
2222
| `AZURE_ENV_IMAGETAG` | string | `latest` | Sets the image tag (`latest`, `dev`, `hotfix`, etc.). |
2323
| `AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
2424
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | `<Existing Workspace Id>` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
25-
| `USE_LOCAL_BUILD` | string | `false` | Indicates whether to use a local container build for deployment. |
2625
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | `<Existing AI Project resource Id>` | Reuses an existing AIFoundry and AIFoundryProject instead of creating a new one. |
2726

2827

documents/DeploymentGuide.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -170,32 +170,25 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
170170
171171
6. If you are done trying out the application, you can delete the resources by running `azd down`.
172172
173-
### Publishing Local Build Container to Azure Container Registry
174-
175-
If you need to rebuild the source code and push the updated container to the deployed Azure Container Registry, follow these steps:
173+
## Post Deployment Steps
174+
1. Optional: Publishing Local Build Container to Azure Container Registry
176175
177-
1. Set the environment variable `USE_LOCAL_BUILD` to `True`:
176+
If you need to rebuild the source code and push the updated container to the deployed Azure Container Registry, follow these steps:
178177
179178
- **Linux/macOS**:
180179
```bash
181-
export USE_LOCAL_BUILD=True
180+
cd ./infra/scripts/
181+
./docker-build.sh
182182
```
183183
184184
- **Windows (PowerShell)**:
185185
```powershell
186-
$env:USE_LOCAL_BUILD = $true
186+
cd .\infra\scripts\
187+
.\docker-build.ps1
187188
```
188-
2. Run the `az login` command
189-
```bash
190-
az login
191-
```
192189
193-
3. Run the `azd up` command again to rebuild and push the updated container:
194-
```bash
195-
azd up
196-
```
190+
This will create a new Azure Container Registry, rebuild the source code, package it into a container, and push it to the Container Registry created.
197191
198-
This will rebuild the source code, package it into a container, and push it to the Azure Container Registry associated with your deployment.
199192
200193
## Post Deployment Steps
201194

infra/main.bicep

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ param azureOpenAIApiVersion string = '2025-01-01-preview'
4747
@description('Capacity of the GPT deployment:')
4848
// You can increase this, but capacity is limited per model/region, so you will get errors if you go over
4949
// https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits
50-
param gptDeploymentCapacity int = 30
50+
param gptDeploymentCapacity int = 150
5151

5252
@minLength(1)
5353
@description('Name of the Text Embedding model to deploy:')
@@ -78,13 +78,13 @@ var uniqueId = toLower(uniqueString(subscription().id, environmentName, solution
7878
azd:{
7979
type: 'location'
8080
usageName: [
81-
'OpenAI.GlobalStandard.gpt-4o-mini,30'
81+
'OpenAI.GlobalStandard.gpt-4o-mini,150'
8282
'OpenAI.Standard.text-embedding-ada-002,80'
8383
]
8484
}
8585
})
8686
@description('Location for AI Foundry deployment. This is the location where the AI Foundry resources will be deployed.')
87-
param AZURE_AI_SERVICE_LOCATION string
87+
param aiDeploymentsLocation string
8888

8989
var solutionPrefix = 'km${padLeft(take(uniqueId, 12), 12, '0')}'
9090

@@ -121,7 +121,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
121121
name: 'deploy_ai_foundry'
122122
params: {
123123
solutionName: solutionPrefix
124-
solutionLocation: AZURE_AI_SERVICE_LOCATION
124+
solutionLocation: aiDeploymentsLocation
125125
keyVaultName: kvault.outputs.keyvaultName
126126
cuLocation: contentUnderstandingLocation
127127
deploymentType: deploymentType

infra/main.parameters.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"value": "${AZURE_LOCATION}"
1010
},
1111
"contentUnderstandingLocation" :{
12-
"value": "${AZURE_CONTENT_UNDERSTANDING_LOCATION}"
12+
"value": "${AZURE_CONTENT_UNDERSTANDING_LOCATION}"
1313
},
1414
"secondaryLocation": {
1515
"value": "${AZURE_SECONDARY_LOCATION}"
@@ -41,9 +41,6 @@
4141
"existingLogAnalyticsWorkspaceId": {
4242
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
4343
},
44-
"useLocalBuild": {
45-
"value": "${USE_LOCAL_BUILD}"
46-
},
4744
"azureExistingAIProjectResourceId": {
4845
"value": "${AZURE_EXISTING_AI_PROJECT_RESOURCE_ID}"
4946
}

0 commit comments

Comments
 (0)