Skip to content

Commit 99bf732

Browse files
2 parents e4fa30a + 069fc59 commit 99bf732

16 files changed

Lines changed: 604 additions & 348 deletions

azure.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ hooks:
2626
posix:
2727
shell: sh
2828
run: >
29-
chmod u+r+x ./scripts/validate_model_deployment_quota.sh; chmod u+r+x ./scripts/validate_model_quota.sh; ./scripts/validate_model_deployment_quota.sh --subscription "$AZURE_SUBSCRIPTION_ID" --location "${AZURE_AISERVICE_LOCATION:-japaneast}" --models-parameter "aiModelDeployments"
30-
interactive: false
29+
chmod u+r+x ./scripts/validate_model_deployment_quota.sh; chmod u+r+x ./scripts/validate_model_quota.sh; ./scripts/validate_model_deployment_quota.sh --SubscriptionId "$AZURE_SUBSCRIPTION_ID" --Location "${AZURE_AISERVICE_LOCATION:-japaneast}" --ModelsParameter "aiModelDeployments"
30+
interactive: true
3131
continueOnError: false
3232

3333
windows:
3434
shell: pwsh
3535
run: >
3636
$location = if ($env:AZURE_AISERVICE_LOCATION) { $env:AZURE_AISERVICE_LOCATION } else { "japaneast" };
3737
./scripts/validate_model_deployment_quota.ps1 -SubscriptionId $env:AZURE_SUBSCRIPTION_ID -Location $location -ModelsParameter "aiModelDeployments"
38-
interactive: false
38+
interactive: true
3939
continueOnError: false

docs/CustomizingAzdParameters.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ By default this template will use the environment name as the prefix to prevent
99
| Name | Type | Default Value | Purpose |
1010
| -------------------------------------- | ------- | ---------------- | ---------------------------------------------------------------------------------------------------- |
1111
| `AZURE_ENV_NAME` | string | `azdtemp` | Used as a prefix for all resource names to ensure uniqueness across environments. |
12-
| `AZURE_LOCATION` | string | `japaneast` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
12+
| `AZURE_LOCATION` | string | `eastus2` | Location of the Azure resources. Controls where the infrastructure will be deployed. |
13+
| `AZURE_AISERVICE_LOCATION` | string | `japaneast` | Set the Azure AI Service Location. |
1314
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
1415
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Set the Model Name (allowed values: gpt-4o). |
1516
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Set the Azure model version (allowed values: 2024-08-06) |

docs/DeploymentGuide.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,18 @@ Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/g
3636

3737
When you start the deployment, most parameters will have **default values**, but you can update the following settings by following the steps [here](../docs/CustomizingAzdParameters.md):
3838

39-
| **Setting** | **Description** | **Default value** |
40-
|------------|----------------| ------------|
41-
| **Azure Region** | The region where resources will be created. | East US|
42-
| **Resource Prefix** | Prefix for all resources created by this template. This prefix will be used to create unique names for all resources. The prefix must be unique within the resource group. | None |
43-
| **AI Location** | Location for all AI services resources. This location can be different from the resource group location | None |
44-
| **Capacity** | Configure capacity for **gpt-4o**. | 5k |
45-
| **Existing Log analytics workspace** | To reuse the existing Log analytics workspace Id. | |
39+
| **Setting** | **Description** | **Default value** |
40+
|----------------------------------|------------------------------------------------------------------------------------------------------|----------------------------|
41+
| **Azure Region** | The region where resources will be created. | East US |
42+
| **Resource Prefix** | Prefix for all resources created by this template. This prefix will be used to create unique names for all resources. The prefix must be unique within the resource group. | azdtemp |
43+
| **AI Location** | Location for all AI services resources. This location can be different from the resource group location. | japaneast |
44+
| **Capacity** | Configure capacity for **gpt-4o**. | 200 |
45+
| **Model Deployment Type** | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). | GlobalStandard |
46+
| **Model Name** | Set the Model Name (allowed values: gpt-4o). | gpt-4o |
47+
| **Model Version** | Set the Azure model version (allowed values: 2024-08-06). | 2024-08-06 |
48+
| **Image Tag** | Set the Image tag (allowed values: latest, dev, hotfix). | latest |
49+
| **Existing Log analytics workspace** | To reuse the existing Log analytics workspace Id. | `<Existing Workspace Id>` |
50+
4651

4752
This accelerator can be configured to use authentication.
4853

infra/abbreviations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"ai": {
33
"aiSearch": "srch-",
44
"aiServices": "aisa-",
5+
"aiFoundry": "aif-",
6+
"aiFoundryProject": "aifp-",
57
"aiVideoIndexer": "avi-",
68
"machineLearningWorkspace": "mlw-",
79
"openAIService": "oai-",

infra/deploy_ai_foundry.bicep

Lines changed: 7 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ param managedIdentityObjectId string
1111
param aiServicesEndpoint string
1212
param aiServicesKey string
1313
param aiServicesId string
14+
param aureaiFoundryEndpoint string
1415

16+
param aiFoundryName string
1517
param existingLogAnalyticsWorkspaceId string = ''
1618

1719
var useExisting = !empty(existingLogAnalyticsWorkspaceId)
@@ -24,15 +26,10 @@ var abbrs = loadJsonContent('./abbreviations.json')
2426
var storageName = '${abbrs.storage.storageAccount}${solutionName}'
2527

2628
var storageSkuName = 'Standard_LRS'
27-
var aiServicesName = '${abbrs.ai.aiServices}${solutionName}'
2829
var workspaceName = '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionName}'
2930
var keyvaultName = '${abbrs.security.keyVault}${solutionName}'
3031
var location = solutionLocation
31-
var azureAiHubName = '${abbrs.ai.aiHub}${solutionName}'
32-
var aiHubFriendlyName = azureAiHubName
33-
var aiHubDescription = 'AI Hub for KM template'
34-
var aiProjectName = '${abbrs.ai.aiHubProject}${solutionName}'
35-
var aiProjectFriendlyName = aiProjectName
32+
3633
var aiSearchName = '${solutionName}-search'
3734
var applicationInsightsName = '${solutionName}-appi'
3835

@@ -73,125 +70,6 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
7370

7471
var storageNameCleaned = replace(replace(replace(replace('${storageName}cast', '-', ''), '_', ''), '.', ''),'/', '')
7572

76-
77-
78-
79-
resource storage 'Microsoft.Storage/storageAccounts@2022-09-01' = {
80-
name: storageNameCleaned
81-
location: location
82-
sku: {
83-
name: storageSkuName
84-
}
85-
kind: 'StorageV2'
86-
identity: {
87-
type: 'SystemAssigned'
88-
}
89-
properties: {
90-
accessTier: 'Hot'
91-
allowBlobPublicAccess: false
92-
allowCrossTenantReplication: false
93-
allowSharedKeyAccess: false
94-
encryption: {
95-
keySource: 'Microsoft.Storage'
96-
requireInfrastructureEncryption: false
97-
services: {
98-
blob: {
99-
enabled: true
100-
keyType: 'Account'
101-
}
102-
file: {
103-
enabled: true
104-
keyType: 'Account'
105-
}
106-
queue: {
107-
enabled: true
108-
keyType: 'Service'
109-
}
110-
table: {
111-
enabled: true
112-
keyType: 'Service'
113-
}
114-
}
115-
}
116-
isHnsEnabled: false
117-
isNfsV3Enabled: false
118-
keyPolicy: {
119-
keyExpirationPeriodInDays: 7
120-
}
121-
largeFileSharesState: 'Disabled'
122-
minimumTlsVersion: 'TLS1_2'
123-
networkAcls: {
124-
bypass: 'AzureServices'
125-
defaultAction: 'Allow'
126-
}
127-
supportsHttpsTrafficOnly: true
128-
}
129-
}
130-
131-
@description('This is the built-in Storage Blob Data Contributor.')
132-
resource blobDataContributor 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
133-
scope: subscription()
134-
name: 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
135-
}
136-
137-
resource storageroleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
138-
name: guid(resourceGroup().id, managedIdentityObjectId, blobDataContributor.id)
139-
scope: storage
140-
properties: {
141-
principalId: managedIdentityObjectId
142-
roleDefinitionId: blobDataContributor.id
143-
principalType: 'ServicePrincipal'
144-
}
145-
}
146-
147-
resource aiHub 'Microsoft.MachineLearningServices/workspaces@2023-08-01-preview' = {
148-
name: azureAiHubName
149-
location: location
150-
identity: {
151-
type: 'SystemAssigned'
152-
}
153-
properties: {
154-
// organization
155-
friendlyName: aiHubFriendlyName
156-
description: aiHubDescription
157-
158-
// dependent resources
159-
keyVault: keyVault.id
160-
storageAccount: storage.id
161-
}
162-
kind: 'hub'
163-
164-
resource aiServicesConnection 'connections@2024-07-01-preview' = {
165-
name: '${azureAiHubName}-connection-AzureOpenAI'
166-
properties: {
167-
category: 'AIServices'
168-
target: aiServicesEndpoint
169-
authType: 'ApiKey'
170-
isSharedToAll: true
171-
credentials: {
172-
key: aiServicesKey
173-
}
174-
metadata: {
175-
ApiType: 'Azure'
176-
ResourceId: aiServicesId
177-
}
178-
}
179-
}
180-
}
181-
182-
resource aiHubProject 'Microsoft.MachineLearningServices/workspaces@2024-01-01-preview' = {
183-
name: aiProjectName
184-
location: location
185-
kind: 'Project'
186-
identity: {
187-
type: 'SystemAssigned'
188-
}
189-
properties: {
190-
friendlyName: aiProjectFriendlyName
191-
hubResourceId: aiHub.id
192-
}
193-
}
194-
19573
resource tenantIdEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
19674
parent: keyVault
19775
name: 'TENANT-ID'
@@ -248,11 +126,11 @@ resource azureOpenAIEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-
248126
}
249127
}
250128

251-
resource azureAIProjectConnectionStringEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
129+
resource azureAIProjectEndpointEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview' = {
252130
parent: keyVault
253-
name: 'AZURE-AI-PROJECT-CONN-STRING'
131+
name: 'AI-PROJECT-ENDPOINT'
254132
properties: {
255-
value: '${split(aiHubProject.properties.discoveryUrl, '/')[2]};${subscription().subscriptionId};${resourceGroup().name};${aiHubProject.name}'
133+
value: aureaiFoundryEndpoint
256134
}
257135
}
258136

@@ -292,7 +170,7 @@ resource cogServiceNameEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-previ
292170
parent: keyVault
293171
name: 'COG-SERVICES-NAME'
294172
properties: {
295-
value: aiServicesName
173+
value: aiFoundryName
296174
}
297175
}
298176

@@ -323,14 +201,9 @@ resource azureLocatioEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview
323201
output keyvaultName string = keyvaultName
324202
output keyvaultId string = keyVault.id
325203

326-
output aiServicesName string = aiServicesName
327204
output aiSearchName string = aiSearchName
328-
output aiProjectName string = aiHubProject.name
329205

330206
output storageAccountName string = storageNameCleaned
331207

332208
output logAnalyticsId string = useExisting ? existingLogAnalyticsWorkspace.id : logAnalytics.id
333-
output storageAccountId string = storage.id
334209
output applicationInsightsConnectionString string = applicationInsights.properties.ConnectionString
335-
336-
output projectConnectionString string = '${split(aiHubProject.properties.discoveryUrl, '/')[2]};${subscription().subscriptionId};${resourceGroup().name};${aiHubProject.name}'

0 commit comments

Comments
 (0)