Add service to enable github issues workflow (#1)

* big bang gitub workflows

* add missing settings in local.settings.json

* config refactor

* fix devlead plan response

* swap cosmos to table storage for metadata storage

* unify config via options

* azd-ify WIP

* add qdrant bicep WIP

* working azd provision setup

* consolidate SK version in projects

* replace localhost :)

* add fqdn to options

* httpclient fixes

* add managed identity to the function and assign contrib role

* qdrant endpoint setting

* add container instances cleanup code + wait on termination to upload to Github

* formatting fixes

* add tables in bicep

* local getting started WIP

* add azure setup instructions

* add the load-waf bits

* docs WIP

---------

Co-authored-by: Kosta Petan <Kosta.Petan@microsoft.com>
This commit is contained in:
Kosta Petan
2023-08-28 20:57:56 +02:00
committed by GitHub
parent 69a203ba07
commit d6b917faf4
80 changed files with 3712 additions and 469 deletions

View File

@@ -0,0 +1,64 @@
param name string
param location string = resourceGroup().location
param tags object = {}
param sku object
param storage object
param administratorLogin string
@secure()
param administratorLoginPassword string
param databaseNames array = []
param allowAzureIPsFirewall bool = false
param allowAllIPsFirewall bool = false
param allowedSingleIPs array = []
// PostgreSQL version
param version string
// Latest official version 2022-12-01 does not have Bicep types available
resource postgresServer 'Microsoft.DBforPostgreSQL/flexibleServers@2022-12-01' = {
location: location
tags: tags
name: name
sku: sku
properties: {
version: version
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
storage: storage
highAvailability: {
mode: 'Disabled'
}
}
resource database 'databases' = [for name in databaseNames: {
name: name
}]
resource firewall_all 'firewallRules' = if (allowAllIPsFirewall) {
name: 'allow-all-IPs'
properties: {
startIpAddress: '0.0.0.0'
endIpAddress: '255.255.255.255'
}
}
resource firewall_azure 'firewallRules' = if (allowAzureIPsFirewall) {
name: 'allow-all-azure-internal-IPs'
properties: {
startIpAddress: '0.0.0.0'
endIpAddress: '0.0.0.0'
}
}
resource firewall_single 'firewallRules' = [for ip in allowedSingleIPs: {
name: 'allow-single-${replace(ip, '.', '')}'
properties: {
startIpAddress: ip
endIpAddress: ip
}
}]
}
output POSTGRES_DOMAIN_NAME string = postgresServer.properties.fullyQualifiedDomainName

View File

@@ -0,0 +1,72 @@
param containerAppsEnvironmentName string
param storageName string
param shareName string
param location string
var storageAccountKey = listKeys(resourceId('Microsoft.Storage/storageAccounts', storageName), '2021-09-01').keys[0].value
resource containerAppsEnvironment 'Microsoft.App/managedEnvironments@2022-11-01-preview' existing = {
name: containerAppsEnvironmentName
}
var mountName = 'qdrantstoragemount'
var volumeName = 'qdrantstoragevol'
resource qdrantstorage 'Microsoft.App/managedEnvironments/storages@2022-11-01-preview' = {
name: '${containerAppsEnvironmentName}/${mountName}'
properties: {
azureFile: {
accountName: storageName
shareName: shareName
accountKey: storageAccountKey
accessMode: 'ReadWrite'
}
}
}
resource qdrant 'Microsoft.App/containerApps@2022-11-01-preview' = {
name: 'qdrant'
location: location
dependsOn:[
qdrantstorage
]
properties: {
environmentId: containerAppsEnvironment.id
configuration: {
ingress: {
external: true
targetPort: 6333
}
}
template: {
containers: [
{
name: 'qdrant'
image: 'qdrant/qdrant'
resources: {
cpu: 1
memory: '2Gi'
}
volumeMounts: [
{
volumeName: volumeName
mountPath: '/qdrant/storage'
}
]
}
]
scale: {
minReplicas: 1
maxReplicas: 1
}
volumes: [
{
name: volumeName
storageName: mountName
storageType: 'AzureFile'
}
]
}
}
}
output fqdn string = qdrant.properties.latestRevisionFqdn