mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
* docs update WIP * getting started guide updated * update getting started guide * clarify github app creation * add webhook secret to getting started guide and gh-flow app * restructure Readme * fix the Organization assumption * add mermaid diagram of the event flow * devtunnel feature to devcontainer * throw all the exceptions and add the history to the prompt * Update github-flow.md * update readme
101 lines
3.6 KiB
Bicep
101 lines
3.6 KiB
Bicep
targetScope = 'subscription'
|
|
|
|
@minLength(1)
|
|
@maxLength(64)
|
|
@description('Name of the the environment which is used to generate a short unique hash used in all resources.')
|
|
param environmentName string
|
|
|
|
@minLength(1)
|
|
@description('Primary location for all resources')
|
|
param location string
|
|
|
|
param applicationInsightsDashboardName string = ''
|
|
param applicationInsightsName string = ''
|
|
param logAnalyticsName string = ''
|
|
param resourceGroupName string = ''
|
|
param storageAccountName string = ''
|
|
param containerAppsEnvironmentName string = ''
|
|
param containerRegistryName string = ''
|
|
|
|
|
|
var aciShare = 'acishare'
|
|
var qdrantShare = 'qdrantshare'
|
|
|
|
var abbrs = loadJsonContent('./abbreviations.json')
|
|
var resourceToken = toLower(uniqueString(subscription().id, environmentName, location))
|
|
var tags = { 'azd-env-name': environmentName }
|
|
|
|
// Organize resources in a resource group
|
|
resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
|
|
name: !empty(resourceGroupName) ? resourceGroupName : '${abbrs.resourcesResourceGroups}${environmentName}'
|
|
location: location
|
|
tags: tags
|
|
}
|
|
|
|
module storage './core/storage/storage-account.bicep' = {
|
|
name: 'storage'
|
|
scope: rg
|
|
params: {
|
|
name: !empty(storageAccountName) ? storageAccountName : '${abbrs.storageStorageAccounts}${resourceToken}'
|
|
location: location
|
|
tags: tags
|
|
fileShares: [
|
|
aciShare
|
|
qdrantShare
|
|
]
|
|
}
|
|
}
|
|
|
|
// Monitor application with Azure Monitor
|
|
module monitoring './core/monitor/monitoring.bicep' = {
|
|
name: 'monitoring'
|
|
scope: rg
|
|
params: {
|
|
location: location
|
|
tags: tags
|
|
logAnalyticsName: !empty(logAnalyticsName) ? logAnalyticsName : '${abbrs.operationalInsightsWorkspaces}${resourceToken}'
|
|
applicationInsightsName: !empty(applicationInsightsName) ? applicationInsightsName : '${abbrs.insightsComponents}${resourceToken}'
|
|
applicationInsightsDashboardName: !empty(applicationInsightsDashboardName) ? applicationInsightsDashboardName : '${abbrs.portalDashboards}${resourceToken}'
|
|
}
|
|
}
|
|
|
|
// Container apps host (including container registry)
|
|
module containerApps './core/host/container-apps.bicep' = {
|
|
name: 'container-apps'
|
|
scope: rg
|
|
params: {
|
|
name: 'app'
|
|
location: location
|
|
tags: tags
|
|
containerAppsEnvironmentName: !empty(containerAppsEnvironmentName) ? containerAppsEnvironmentName : '${abbrs.appManagedEnvironments}${resourceToken}'
|
|
containerRegistryName: !empty(containerRegistryName) ? containerRegistryName : '${abbrs.containerRegistryRegistries}${resourceToken}'
|
|
logAnalyticsWorkspaceName: monitoring.outputs.logAnalyticsWorkspaceName
|
|
applicationInsightsName: monitoring.outputs.applicationInsightsName
|
|
}
|
|
}
|
|
|
|
module qdrant './core/database/qdrant/qdrant-aca.bicep' = {
|
|
name: 'qdrant-deploy'
|
|
scope: rg
|
|
params: {
|
|
location: location
|
|
containerAppsEnvironmentName: containerApps.outputs.environmentName
|
|
shareName: qdrantShare
|
|
storageName: storage.outputs.name
|
|
}
|
|
}
|
|
|
|
|
|
// App outputs
|
|
output APPLICATIONINSIGHTS_CONNECTION_STRING string = monitoring.outputs.applicationInsightsConnectionString
|
|
output AZURE_CONTAINER_ENVIRONMENT_NAME string = containerApps.outputs.environmentName
|
|
output AZURE_CONTAINER_REGISTRY_ENDPOINT string = containerApps.outputs.registryLoginServer
|
|
output AZURE_CONTAINER_REGISTRY_NAME string = containerApps.outputs.registryName
|
|
output AZURE_LOCATION string = location
|
|
output AZURE_TENANT_ID string = subscription().tenantId
|
|
output AZURE_SUBSCRIPTION_ID string = subscription().subscriptionId
|
|
output AZURE_RESOURCE_GROUP_NAME string = rg.name
|
|
output AZURE_FILESHARE_NAME string = aciShare
|
|
output AZURE_FILESHARE_ACCOUNT_NAME string = storage.outputs.name
|
|
output QDRANT_ENDPOINT string = 'https://${qdrant.outputs.fqdn}'
|