Skip to content

Commit 04f2002

Browse files
Merge pull request #501 from microsoft/dev
feat: Merge the Azd Quota check changes and removed USE_LOCAL_BUILD from dev to main
2 parents 7c52703 + 52f8a9b commit 04f2002

File tree

6 files changed

+66
-62
lines changed

6 files changed

+66
-62
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: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -170,33 +170,6 @@ 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:
176-
177-
1. Set the environment variable `USE_LOCAL_BUILD` to `True`:
178-
179-
- **Linux/macOS**:
180-
```bash
181-
export USE_LOCAL_BUILD=True
182-
```
183-
184-
- **Windows (PowerShell)**:
185-
```powershell
186-
$env:USE_LOCAL_BUILD = $true
187-
```
188-
2. Run the `az login` command
189-
```bash
190-
az login
191-
```
192-
193-
3. Run the `azd up` command again to rebuild and push the updated container:
194-
```bash
195-
azd up
196-
```
197-
198-
This will rebuild the source code, package it into a container, and push it to the Azure Container Registry associated with your deployment.
199-
200173
## Post Deployment Steps
201174
202175
1. **Add App Authentication**

infra/main.bicep

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ param azureExistingAIProjectResourceId string = ''
2020
type: 'location'
2121
}
2222
})
23-
param contentUnderstandingLocation string
23+
param contentUnderstandingLocation string = 'swedencentral'
2424

2525
@minLength(1)
2626
@description('Secondary location for databases creation(example:eastus2):')
27-
param secondaryLocation string
27+
param secondaryLocation string = 'eastus2'
2828

2929
@minLength(1)
3030
@description('GPT model deployment type:')
@@ -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:')
@@ -72,6 +72,20 @@ param useLocalBuild string = 'false'
7272
var useLocalBuildLower = toLower(useLocalBuild)
7373

7474
var uniqueId = toLower(uniqueString(subscription().id, environmentName, solutionLocation))
75+
76+
77+
@metadata({
78+
azd:{
79+
type: 'location'
80+
usageName: [
81+
'OpenAI.GlobalStandard.gpt-4o-mini,150'
82+
'OpenAI.Standard.text-embedding-ada-002,80'
83+
]
84+
}
85+
})
86+
@description('Location for AI Foundry deployment. This is the location where the AI Foundry resources will be deployed.')
87+
param aiDeploymentsLocation string
88+
7589
var solutionPrefix = 'km${padLeft(take(uniqueId, 12), 12, '0')}'
7690

7791
var containerRegistryName = '${abbrs.containers.containerRegistry}${solutionPrefix}'
@@ -107,7 +121,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
107121
name: 'deploy_ai_foundry'
108122
params: {
109123
solutionName: solutionPrefix
110-
solutionLocation: solutionLocation
124+
solutionLocation: aiDeploymentsLocation
111125
keyVaultName: kvault.outputs.keyvaultName
112126
cuLocation: contentUnderstandingLocation
113127
deploymentType: deploymentType

infra/main.bicepparam

Lines changed: 0 additions & 17 deletions
This file was deleted.

infra/main.parameters.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"environmentName": {
6+
"value": "${AZURE_ENV_NAME}"
7+
},
8+
"AZURE_LOCATION": {
9+
"value": "${AZURE_LOCATION}"
10+
},
11+
"contentUnderstandingLocation" :{
12+
"value": "${AZURE_CONTENT_UNDERSTANDING_LOCATION}"
13+
},
14+
"secondaryLocation": {
15+
"value": "${AZURE_SECONDARY_LOCATION}"
16+
},
17+
"deploymentType": {
18+
"value": "${AZURE_OPENAI_MODEL_DEPLOYMENT_TYPE}"
19+
},
20+
"gptModelName": {
21+
"value": "${AZURE_OPENAI_DEPLOYMENT_MODEL}"
22+
},
23+
"gptModelVersion": {
24+
"value": "${AZURE_ENV_MODEL_VERSION}"
25+
},
26+
"azureOpenaiAPIVersion ": {
27+
"value": "${AZURE_OPENAI_API_VERSION}"
28+
},
29+
"gptDeploymentCapacity": {
30+
"value": "${AZURE_OPENAI_DEPLOYMENT_MODEL_CAPACITY}"
31+
},
32+
"embeddingModel": {
33+
"value": "${AZURE_OPENAI_EMBEDDING_MODEL}"
34+
},
35+
"embeddingDeploymentCapacity": {
36+
"value": "${AZURE_OPENAI_EMBEDDING_MODEL_CAPACITY}"
37+
},
38+
"imageTag": {
39+
"value": "${AZURE_ENV_IMAGETAG}"
40+
},
41+
"existingLogAnalyticsWorkspaceId": {
42+
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
43+
},
44+
"azureExistingAIProjectResourceId": {
45+
"value": "${AZURE_EXISTING_AI_PROJECT_RESOURCE_ID}"
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)