Skip to content

Commit 6a5cf17

Browse files
Merge pull request microsoft#78 from microsoft/TemplateReadMeUpdates
Template read me updates
2 parents ed06de3 + 998dcdf commit 6a5cf17

File tree

9 files changed

+115
-110
lines changed

9 files changed

+115
-110
lines changed

README.md

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,24 @@ This diagram double-clicks into the agentic framework for the code conversion pr
7575
QUICK DEPLOY
7676
</h2>
7777

78-
79-
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FModernize-your-code-solution-accelerator%2Frefs%2Fheads%2Fmain%2Finfra%2Fmain.json) |
80-
|---|---|---|
81-
8278
### **Prerequisites**
8379

8480
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups and resources**. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetUp.md)
8581

8682
Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/?products=all&regions=all) page and select a **region** where the following services are available:
8783

8884
- Azure AI Foundry
89-
- Azure OpenAI Service
90-
- Embedding Deployment Capacity
85+
- Azure OpenAI Service
9186
- GPT Model Capacity
9287

9388
Here are some example regions where the services are available: East US, East US2, Japan East, UK South, Sweden Central.
9489

95-
This accelerator can be deployed with or without authentication.
90+
### ⚠️ Important: Check Azure OpenAI Quota Availability
9691

97-
* To install with authentication requires that the installer have the rights to create and register an application identity in their Azure environment.
98-
After installation is complete, follow the directions in the [App Authentication](./docs/AddAuthentication.md) document to enable authentication.
99-
* Note: If you install with authentication, all processing history and current processing will be performed for your specific user. If you deploy without authentication, all batch history from the tool will be visible to all users.
92+
➡️ To ensure sufficient quota is available in your subscription, please follow **[Quota check instructions guide](./docs/quota_check.md)** before you deploy the solution.
93+
94+
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) |
95+
|---|---|
10096

10197
### **Configurable Deployment Settings**
10298

@@ -109,13 +105,17 @@ When you start the deployment, most parameters will have **default values**, but
109105
| **AI Location** | Location for all AI services resources. This location can be different from the resource group location | None |
110106
| **Capacity** | Configure capacity for **gpt-4o**. | 5k |
111107

108+
This accelerator can be configured to use authentication.
109+
110+
* To use authentication the installer must have the rights to create and register an application identity in their Azure environment.
111+
After installation is complete, follow the directions in the [App Authentication](./docs/AddAuthentication.md) document to enable authentication.
112+
* Note: If you enable authentication, all processing history and current processing will be performed for your specific user. Without authentication, all batch history from the tool will be visible to all users.
113+
112114
### [Optional] Quota Recommendations
113115
By default, the **GPT model capacity** in deployment is set to **5k tokens**.
114116
> **We recommend increasing the capacity to 200k tokens for optimal performance.**
115117
116-
To adjust quota settings, follow these [steps](./docs/AzureGPTQuotaSettings.md)
117-
118-
**⚠️ Warning:** **Insufficient quota can cause application errors.** Please ensure you have the recommended capacity or request for additional capacity before deploying this solution.
118+
To adjust quota settings, follow these [steps](./docs/AzureGPTQuotaSettings.md)
119119

120120
### Deployment Options
121121
Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.
@@ -178,16 +178,6 @@ If you're not using one of the above options for opening the project, then you'l
178178

179179
4. Continue with the [deploying steps](#deploying).
180180

181-
</details>
182-
<details>
183-
<summary><b>Deploy with Bicep/ARM template</b></summary>
184-
185-
### Bicep
186-
187-
Click the following deployment button to create the required resources for this accelerator directly in your Azure Subscription.
188-
189-
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmarktayl1%2Ftestdeploy%2Frefs%2Fheads%2Fmain%2FCodeGenDeploy.json)
190-
191181
</details>
192182

193183
### Deploying
@@ -246,8 +236,7 @@ Responsible AI Transparency FAQ
246236
247237
Please refer to [Transparency FAQ](./TRANSPARENCY_FAQ.md) for responsible AI transparency details of this solution accelerator.
248238
249-
<h2><img src="./docs/images/read_me/supportingDocuments.png" width="64" style="max-width: 100%;">
250-
</br>
239+
<h2>
251240
Supporting Documentation
252241
</h2>
253242

docs/AzureAccountSetUp.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Azure account setup
2+
3+
1. Sign up for a [free Azure account](https://azure.microsoft.com/free/) and create an Azure Subscription.
4+
2. Check that you have the necessary permissions:
5+
* Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner).
6+
* Your Azure account also needs `Microsoft.Resources/deployments/write` permissions on the subscription level.
7+
8+
You can view the permissions for your account and subscription by following the steps below:
9+
- Navigate to the [Azure Portal](https://portal.azure.com/) and click on `Subscriptions` under 'Navigation'
10+
- Select the subscription you are using for this accelerator from the list.
11+
- If you try to search for your subscription and it does not come up, make sure no filters are selected.
12+
- Select `Access control (IAM)` and you can see the roles that are assigned to your account for this subscription.
13+
- If you want to see more information about the roles, you can go to the `Role assignments`
14+
tab and search by your account name and then click the role you want to view more information about.
-70.8 KB
Loading
-75.8 KB
Loading

infra/deploy_ai_foundry.bicep

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ param aiServicesEndpoint string
99
param aiServicesKey string
1010
param aiServicesId string
1111

12-
var storageName = '${solutionName}hubstorage'
12+
var storageName = '${solutionName}hubst'
1313
var storageSkuName = 'Standard_LRS'
14-
var aiServicesName = '${solutionName}-aiservices'
15-
var workspaceName = '${solutionName}-workspace'
14+
var aiServicesName = '${solutionName}-ais'
15+
var workspaceName = '${solutionName}-log'
1616
var keyvaultName = '${solutionName}-kv'
1717
var location = solutionLocation
18-
var aiHubName = '${solutionName}-aihub'
19-
var aiHubFriendlyName = aiHubName
18+
var azureAiHubName = '${solutionName}-hub'
19+
var aiHubFriendlyName = azureAiHubName
2020
var aiHubDescription = 'AI Hub for KM template'
21-
var aiProjectName = '${solutionName}-aiproject'
21+
var aiProjectName = '${solutionName}-prj'
2222
var aiProjectFriendlyName = aiProjectName
23-
var aiSearchName = '${solutionName}-search'
23+
var aiSearchName = '${solutionName}-srch'
2424

2525

2626
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {
@@ -112,7 +112,7 @@ resource storageroleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-
112112
}
113113

114114
resource aiHub 'Microsoft.MachineLearningServices/workspaces@2023-08-01-preview' = {
115-
name: aiHubName
115+
name: azureAiHubName
116116
location: location
117117
identity: {
118118
type: 'SystemAssigned'
@@ -129,7 +129,7 @@ resource aiHub 'Microsoft.MachineLearningServices/workspaces@2023-08-01-preview'
129129
kind: 'hub'
130130

131131
resource aiServicesConnection 'connections@2024-07-01-preview' = {
132-
name: '${aiHubName}-connection-AzureOpenAI'
132+
name: '${azureAiHubName}-connection-AzureOpenAI'
133133
properties: {
134134
category: 'AIServices'
135135
target: aiServicesEndpoint

infra/deploy_managed_identity.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ param solutionName string
1010
param solutionLocation string
1111

1212
@description('Name')
13-
param miName string = '${ solutionName }-managed-identity'
13+
param miName string = '${ solutionName }-id'
1414

1515
resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
1616
name: miName

infra/main.bicep

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ param Prefix string
3030
'westus3'
3131
])
3232
@description('Location for all Ai services resources. This location can be different from the resource group location.')
33-
param AiLocation string // The location used for all deployed resources. This location must be in the same region as the resource group.
33+
param AzureAiServiceLocation string // The location used for all deployed resources. This location must be in the same region as the resource group.
3434
param capacity int = 5
3535

3636
var uniqueId = toLower(uniqueString(subscription().id, Prefix, resourceGroup().location))
37-
var ResourcePrefix = 'cm${padLeft(take(uniqueId, 12), 12, '0')}'
38-
var imageVersion = 'rc1'
37+
var UniquePrefix = 'cm${padLeft(take(uniqueId, 12), 12, '0')}'
38+
var ResourcePrefix = take('cm${Prefix}${UniquePrefix}', 15)
39+
var imageVersion = 'rc1' // Change to 'fnd01' when ready
3940
var location = resourceGroup().location
4041
var dblocation = resourceGroup().location
4142
var cosmosdbDatabase = 'cmsadb'
@@ -46,9 +47,9 @@ var deploymentType = 'GlobalStandard'
4647
var containerName = 'appstorage'
4748
var llmModel = 'gpt-4o'
4849
var storageSkuName = 'Standard_LRS'
49-
var storageContainerName = '${ResourcePrefix}ctstor'
50+
var storageContainerName = '${ResourcePrefix}cast'
5051
var gptModelVersion = '2024-08-06'
51-
var aiServicesName = '${ResourcePrefix}-aiservices'
52+
var azureAiServicesName = '${ResourcePrefix}-ais'
5253

5354

5455

@@ -65,24 +66,24 @@ var aiModelDeployments = [
6566
}
6667
]
6768

68-
resource aiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' = {
69-
name: aiServicesName
69+
resource azureAiServices 'Microsoft.CognitiveServices/accounts@2024-04-01-preview' = {
70+
name: azureAiServicesName
7071
location: location
7172
sku: {
7273
name: 'S0'
7374
}
7475
kind: 'AIServices'
7576
properties: {
76-
customSubDomainName: aiServicesName
77+
customSubDomainName: azureAiServicesName
7778
apiProperties: {
7879
statisticsEnabled: false
7980
}
8081
}
8182
}
8283

8384
@batchSize(1)
84-
resource aiServicesDeployments 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [for aiModeldeployment in aiModelDeployments: {
85-
parent: aiServices //aiServices_m
85+
resource azureAiServicesDeployments 'Microsoft.CognitiveServices/accounts/deployments@2023-05-01' = [for aiModeldeployment in aiModelDeployments: {
86+
parent: azureAiServices //aiServices_m
8687
name: aiModeldeployment.name
8788
properties: {
8889
model: {
@@ -124,26 +125,26 @@ module kvault 'deploy_keyvault.bicep' = {
124125

125126

126127
// ==========AI Foundry and related resources ========== //
127-
module aifoundry 'deploy_ai_foundry.bicep' = {
128+
module azureAifoundry 'deploy_ai_foundry.bicep' = {
128129
name: 'deploy_ai_foundry'
129130
params: {
130131
solutionName: ResourcePrefix
131-
solutionLocation: AiLocation
132+
solutionLocation: AzureAiServiceLocation
132133
keyVaultName: kvault.outputs.keyvaultName
133134
gptModelName: llmModel
134135
gptModelVersion: gptModelVersion
135136
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
136-
aiServicesEndpoint: aiServices.properties.endpoint
137-
aiServicesKey: aiServices.listKeys().key1
138-
aiServicesId: aiServices.id
137+
aiServicesEndpoint: azureAiServices.properties.endpoint
138+
aiServicesKey: azureAiServices.listKeys().key1
139+
aiServicesId: azureAiServices.id
139140
}
140141
scope: resourceGroup(resourceGroup().name)
141142
}
142143

143144
module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.9.1' = {
144145
name: toLower('${ResourcePrefix}conAppsEnv')
145146
params: {
146-
logAnalyticsWorkspaceResourceId: aifoundry.outputs.logAnalyticsId
147+
logAnalyticsWorkspaceResourceId: azureAifoundry.outputs.logAnalyticsId
147148
name: toLower('${ResourcePrefix}manenv')
148149
location: location
149150
zoneRedundant: false
@@ -152,10 +153,10 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.9.1
152153
}
153154

154155
module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' = {
155-
name: toLower('${ResourcePrefix}database')
156+
name: toLower('${ResourcePrefix}cosmos')
156157
params: {
157158
// Required parameters
158-
name: toLower('${ResourcePrefix}databaseAccount')
159+
name: toLower('${ResourcePrefix}cosno')
159160
// Non-required parameters
160161
enableAnalyticalStorage: true
161162
location: dblocation
@@ -219,7 +220,7 @@ module databaseAccount 'br/public:avm/res/document-db/database-account:0.9.0' =
219220
}
220221

221222
module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = {
222-
name: toLower('${ResourcePrefix}Frontend')
223+
name: toLower('${ResourcePrefix}-Fnt-ca')
223224
params: {
224225
managedIdentities: {
225226
systemAssigned: true
@@ -249,15 +250,15 @@ module containerAppFrontend 'br/public:avm/res/app/container-app:0.13.0' = {
249250
scaleMinReplicas: 1
250251
scaleMaxReplicas: 1
251252
environmentResourceId: containerAppsEnvironment.outputs.resourceId
252-
name: toLower('${ResourcePrefix}Frontend')
253+
name: toLower('${ResourcePrefix}Fnt')
253254
// Non-required parameters
254255
location: location
255256
}
256257
}
257258

258259

259260
resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = {
260-
name: toLower('${ResourcePrefix}Backend')
261+
name: toLower('${ResourcePrefix}Bck-ca')
261262
location: location
262263
identity: {
263264
type: 'SystemAssigned'
@@ -310,7 +311,7 @@ resource containerAppBackend 'Microsoft.App/containerApps@2023-05-01' = {
310311
}
311312
{
312313
name: 'AZURE_OPENAI_ENDPOINT'
313-
value: 'https://${aifoundry.outputs.aiServicesName}.openai.azure.com/'
314+
value: 'https://${azureAifoundry.outputs.aiServicesName}.openai.azure.com/'
314315
}
315316
{
316317
name: 'MIGRATOR_AGENT_MODEL_DEPLOY'
@@ -413,7 +414,7 @@ var openAiContributorRoleId = 'a001fd3d-188f-4b5d-821b-7da978bf7442' // Fixed R
413414

414415
resource openAiRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
415416
name: guid(containerAppBackend.id, openAiContributorRoleId)
416-
scope: aiServices
417+
scope: azureAiServices
417418
properties: {
418419
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', openAiContributorRoleId) // OpenAI Service Contributor
419420
principalId: containerAppBackend.identity.principalId
@@ -430,7 +431,7 @@ resource containers 'Microsoft.Storage/storageAccounts/blobServices/containers@2
430431
properties: {
431432
publicAccess: 'None'
432433
}
433-
dependsOn: [aifoundry]
434+
dependsOn: [azureAifoundry]
434435
}]
435436

436437

infra/main.bicepparam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using './main.bicep'
22

3-
param AiLocation = readEnvironmentVariable('AZURE_LOCATION','japaneast')
3+
param AzureAiServiceLocation = readEnvironmentVariable('AZURE_LOCATION','japaneast')
44
param Prefix = readEnvironmentVariable('AZURE_ENV_NAME','azdtemp')

0 commit comments

Comments
 (0)