Skip to content

Commit ffde683

Browse files
updated deployment files
1 parent 64a8df7 commit ffde683

File tree

6 files changed

+25
-26
lines changed

6 files changed

+25
-26
lines changed

infra/deploy_app_service.bicep

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ targetScope = 'resourceGroup'
66
@description('Solution Name')
77
param solutionName string
88

9-
@description('Solution Location')
10-
param solutionLocation string
9+
// @description('Solution Location')
10+
// param solutionLocation string
1111

12-
param identity string
12+
// param identity string
1313

1414
@description('Name of App Service plan')
1515
param HostingPlanName string = '${ solutionName }-app-service-plan'
@@ -50,9 +50,9 @@ param USE_CHAT_HISTORY_ENABLED string = ''
5050
@description('Azure Cosmos DB Account')
5151
param AZURE_COSMOSDB_ACCOUNT string = ''
5252

53-
@description('Azure Cosmos DB Account Key')
54-
@secure()
55-
param AZURE_COSMOSDB_ACCOUNT_KEY string = ''
53+
// @description('Azure Cosmos DB Account Key')
54+
// @secure()
55+
// param AZURE_COSMOSDB_ACCOUNT_KEY string = ''
5656

5757
@description('Azure Cosmos DB Conversations Container')
5858
param AZURE_COSMOSDB_CONVERSATIONS_CONTAINER string = ''

infra/deploy_azure_function_charts.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ param sqlDbName string
66
param sqlDbUser string
77
@secure()
88
param sqlDbPwd string
9-
param managedIdentityObjectId string
9+
// param managedIdentityObjectId string
1010
param imageTag string
1111
var functionAppName = '${solutionName}-charts-fn'
12-
var storageaccountname = '${solutionName}chartsfnacc'
12+
var storageaccountname = '${solutionName}chartfnacc'
1313
var dockerImage = 'DOCKER|kmcontainerreg.azurecr.io/km-charts-function:${imageTag}'
1414
var environmentName = '${solutionName}-charts-fn-env'
1515

infra/deploy_azure_function_urls.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@description('Specifies the location for resources.')
22
param solutionName string
3-
param identity string
3+
// param identity string
44

55
var chartsfunctionAppName = '${solutionName}-charts-fn'
66
var chartsfunctionName = 'get_metrics'

infra/deploy_storage_account.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 saName string = '${ solutionName }storageaccount'
13+
param saName string = '${ solutionName }storage'
1414

1515
param keyVaultName string
1616
param managedIdentityObjectId string

infra/main.bicep

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ targetScope = 'resourceGroup'
66
@description('A unique prefix for all resources in this deployment. This should be 3-10 characters long:')
77
param environmentName string
88

9-
var solutionPrefix = environmentName
10-
119
@minLength(1)
1210
@description('Location for the Content Understanding service deployment:')
1311
@allowed(['West US'
@@ -68,8 +66,10 @@ param embeddingDeploymentCapacity int = 80
6866

6967
param imageTag string = 'latest'
7068

69+
var uniqueId = toLower(uniqueString(subscription().id, environmentName, resourceGroup().location))
70+
var solutionPrefix = 'km${padLeft(take(uniqueId, 12), 12, '0')}'
7171
var resourceGroupLocation = resourceGroup().location
72-
var resourceGroupName = resourceGroup().name
72+
// var resourceGroupName = resourceGroup().name
7373

7474
var solutionLocation = resourceGroupLocation
7575
var baseUrl = 'https://raw.githubusercontent.com/microsoft/Conversation-Knowledge-Mining-Solution-Accelerator/main/'
@@ -191,7 +191,7 @@ module azureFunctionsCharts 'deploy_azure_function_charts.bicep' = {
191191
sqlDbName: sqlDBModule.outputs.sqlDbName
192192
sqlDbUser: sqlDBModule.outputs.sqlDbUser
193193
sqlDbPwd:keyVault.getSecret('SQLDB-PASSWORD')
194-
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
194+
// managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.objectId
195195
}
196196
dependsOn:[keyVault]
197197
}
@@ -225,7 +225,7 @@ module azureFunctionURL 'deploy_azure_function_urls.bicep' = {
225225
name : 'deploy_azure_function_urls'
226226
params:{
227227
solutionName: solutionPrefix
228-
identity:managedIdentityModule.outputs.managedIdentityOutput.id
228+
// identity:managedIdentityModule.outputs.managedIdentityOutput.id
229229
}
230230
dependsOn:[azureFunctionsCharts,azureragFunctionsRag]
231231
}
@@ -235,9 +235,9 @@ module appserviceModule 'deploy_app_service.bicep' = {
235235
name: 'deploy_app_service'
236236
params: {
237237
imageTag: imageTag
238-
identity:managedIdentityModule.outputs.managedIdentityOutput.id
238+
// identity:managedIdentityModule.outputs.managedIdentityOutput.id
239239
solutionName: solutionPrefix
240-
solutionLocation: solutionLocation
240+
// solutionLocation: solutionLocation
241241
AzureOpenAIEndpoint:aifoundry.outputs.aiServicesTarget
242242
AzureOpenAIModel: gptModelName //'gpt-4o-mini'
243243
AzureOpenAIKey:keyVault.getSecret('AZURE-OPENAI-KEY')
@@ -250,7 +250,7 @@ module appserviceModule 'deploy_app_service.bicep' = {
250250
GRAPHRAG_URL:azureFunctionURL.outputs.functionURLsOutput.graphrag_function_url
251251
RAG_URL:azureFunctionURL.outputs.functionURLsOutput.rag_function_url
252252
AZURE_COSMOSDB_ACCOUNT: cosmosDBModule.outputs.cosmosAccountName
253-
AZURE_COSMOSDB_ACCOUNT_KEY: keyVault.getSecret('AZURE-COSMOSDB-ACCOUNT-KEY')
253+
// AZURE_COSMOSDB_ACCOUNT_KEY: keyVault.getSecret('AZURE-COSMOSDB-ACCOUNT-KEY')
254254
AZURE_COSMOSDB_CONVERSATIONS_CONTAINER: cosmosDBModule.outputs.cosmosContainerName
255255
AZURE_COSMOSDB_DATABASE: cosmosDBModule.outputs.cosmosDatabaseName
256256
AZURE_COSMOSDB_ENABLE_FEEDBACK:'True'

infra/main.bicepparam

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
using './main.bicep'
22

33
param environmentName = readEnvironmentVariable('AZURE_ENV_NAME', 'env_name')
4-
param contentUnderstandingLocation = 'West US'
5-
param secondaryLocation = 'eastus2'
6-
param deploymentType = 'GlobalStandard'
7-
param gptModelName = 'gpt-4o-mini'
8-
param gptDeploymentCapacity = 100
9-
param embeddingModel = 'text-embedding-ada-002'
10-
param embeddingDeploymentCapacity = 80
11-
4+
param contentUnderstandingLocation = readEnvironmentVariable('AZURE_ENV_CU_LOCATION', 'West US')
5+
param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION', 'eastus2')
6+
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
7+
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o-mini')
8+
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '100'))
9+
param embeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
10+
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))

0 commit comments

Comments
 (0)