Skip to content

Commit e85f61c

Browse files
authored
Merge pull request #130 from microsoft/createDevYml
Create dev yml
2 parents 18cd142 + ef000a1 commit e85f61c

File tree

12 files changed

+236
-226
lines changed

12 files changed

+236
-226
lines changed

.azdo/pipelines/azure-dev.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Run when commits are pushed to mainline branch (main or master)
2+
# Set this to the mainline branch you are using
3+
trigger:
4+
- main
5+
- master
6+
7+
# Azure Pipelines workflow to deploy to Azure using azd
8+
# To configure required secrets and service connection for connecting to Azure, simply run `azd pipeline config --provider azdo`
9+
# Task "Install azd" needs to install setup-azd extension for azdo - https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd
10+
# See below for alternative task to install azd if you can't install above task in your organization
11+
12+
pool:
13+
vmImage: ubuntu-latest
14+
15+
steps:
16+
- task: setup-azd@0
17+
displayName: Install azd
18+
19+
# If you can't install above task in your organization, you can comment it and uncomment below task to install azd
20+
# - task: Bash@3
21+
# displayName: Install azd
22+
# inputs:
23+
# targetType: 'inline'
24+
# script: |
25+
# curl -fsSL https://aka.ms/install-azd.sh | bash
26+
27+
# azd delegate auth to az to use service connection with AzureCLI@2
28+
- pwsh: |
29+
azd config set auth.useAzCliAuth "true"
30+
displayName: Configure AZD to Use AZ CLI Authentication.
31+
32+
- task: AzureCLI@2
33+
displayName: Provision Infrastructure
34+
inputs:
35+
azureSubscription: azconnection
36+
scriptType: bash
37+
scriptLocation: inlineScript
38+
inlineScript: |
39+
azd provision --no-prompt
40+
env:
41+
42+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
43+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
44+
AZURE_LOCATION: $(AZURE_LOCATION)
45+
# Project specific environment variables
46+
# AZURE_RESOURCE_GROUP: $(AZURE_RESOURCE_GROUP)
47+
# AZURE_AIHUB_NAME: $(AZURE_AIHUB_NAME)
48+
# AZURE_AIPROJECT_NAME: $(AZURE_AIPROJECT_NAME)
49+
# AZURE_AISERVICES_NAME: $(AZURE_AISERVICES_NAME)
50+
# AZURE_SEARCH_SERVICE_NAME: $(AZURE_SEARCH_SERVICE_NAME)
51+
# AZURE_APPLICATION_INSIGHTS_NAME: $(AZURE_APPLICATION_INSIGHTS_NAME)
52+
# AZURE_CONTAINER_REGISTRY_NAME: $(AZURE_CONTAINER_REGISTRY_NAME)
53+
# AZURE_KEYVAULT_NAME: $(AZURE_KEYVAULT_NAME)
54+
# AZURE_STORAGE_ACCOUNT_NAME: $(AZURE_STORAGE_ACCOUNT_NAME)
55+
# AZURE_LOG_ANALYTICS_WORKSPACE_NAME: $(AZURE_LOG_ANALYTICS_WORKSPACE_NAME)
56+
# USE_CONTAINER_REGISTRY: $(USE_CONTAINER_REGISTRY)
57+
# USE_APPLICATION_INSIGHTS: $(USE_APPLICATION_INSIGHTS)
58+
# USE_SEARCH_SERVICE: $(USE_SEARCH_SERVICE)
59+
# AZURE_AI_CHAT_DEPLOYMENT_NAME: $(AZURE_AI_CHAT_DEPLOYMENT_NAME)
60+
# AZURE_AI_CHAT_DEPLOYMENT_SKU: $(AZURE_AI_CHAT_DEPLOYMENT_SKU)
61+
# AZURE_AI_CHAT_DEPLOYMENT_CAPACITY: $(AZURE_AI_CHAT_DEPLOYMENT_CAPACITY)
62+
# AZURE_AI_CHAT_MODEL_FORMAT: $(AZURE_AI_CHAT_MODEL_FORMAT)
63+
# AZURE_AI_CHAT_MODEL_NAME: $(AZURE_AI_CHAT_MODEL)
64+
# AZURE_AI_CHAT_MODEL_VERSION: $(AZURE_AI_CHAT_MODEL_VERSION)
65+
# AZURE_AI_EMBED_DEPLOYMENT_NAME: $(AZURE_AI_EMBED_DEPLOYMENT_NAME)
66+
# AZURE_AI_EMBED_DEPLOYMENT_SKU: $(AZURE_AI_EMBED_DEPLOYMENT_SKU)
67+
# AZURE_AI_EMBED_DEPLOYMENT_CAPACITY: $(AZURE_AI_EMBED_DEPLOYMENT_CAPACITY)
68+
# AZURE_AI_EMBED_MODEL_FORMAT: $(AZURE_AI_EMBED_MODEL_FORMAT)
69+
# AZURE_AI_EMBED_MODEL_NAME: $(AZURE_AI_EMBED_MODEL_NAME)
70+
# AZURE_AI_EMBED_MODEL_VERSION: $(AZURE_AI_EMBED_MODEL_VERSION)
71+
# AZURE_EXISTING_AIPROJECT_CONNECTION_STRING: $(AZURE_EXISTING_AIPROJECT_CONNECTION_STRING)
72+
- task: AzureCLI@2
73+
displayName: Deploy Application
74+
inputs:
75+
azureSubscription: azconnection
76+
scriptType: bash
77+
scriptLocation: inlineScript
78+
inlineScript: |
79+
azd deploy --no-prompt
80+
env:
81+
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
82+
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
83+
AZURE_LOCATION: $(AZURE_LOCATION)

README.md

Lines changed: 122 additions & 211 deletions
Large diffs are not rendered by default.

azure.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
2-
name: multi-agent-custom-automation-engine-solution-accelerator
32

3+
name: multi-agent-custom-automation-engine-solution-accelerator
4+
metadata:
5+
template: azd-init@1.14.0
6+
services:
7+
backend:
8+
project: src/backend
9+
host: containerapp
10+
language: python
11+
docker:
12+
path: Dockerfile
13+
frontend:
14+
project: src/frontend
15+
host: containerapp
16+
language: python
17+
docker:
18+
path: Dockerfile
14.4 KB
Loading
19 KB
Loading
15.5 KB
Loading
17 KB
Loading

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
targetScope = 'resourceGroup'
22
@description('Location for all resources.')
3-
param location string
3+
param location string = 'EastUS2' //Fixed for model availability, change back to resourceGroup().location
44

55
@allowed([
66
'australiaeast'

infra/main.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.34.44.8038",
9-
"templateHash": "2906892014954666053"
8+
"version": "0.28.1.47646",
9+
"templateHash": "1631755345697758847"
1010
}
1111
},
1212
"parameters": {
1313
"location": {
1414
"type": "string",
15-
"defaultValue": "EastUS2",
1615
"metadata": {
1716
"description": "Location for all resources."
1817
}
@@ -26,7 +25,7 @@
2625
},
2726
"prefix": {
2827
"type": "string",
29-
"defaultValue": "macaeo",
28+
"defaultValue": "[take(format('macaeo-{0}', uniqueString(resourceGroup().id)), 10)]",
3029
"metadata": {
3130
"description": "A prefix to add to the start of all resource names. Note: A \"unique\" suffix will also be added"
3231
}
@@ -245,6 +244,7 @@
245244
},
246245
"dependsOn": [
247246
"aiServices",
247+
"aoaiUserRoleDefinition",
248248
"containerApp"
249249
]
250250
},
@@ -403,9 +403,9 @@
403403
"dependsOn": [
404404
"aiServices",
405405
"appInsights",
406+
"cosmos::autogenDb",
406407
"containerAppEnv",
407408
"cosmos",
408-
"cosmos::autogenDb",
409409
"cosmos::autogenDb::memoryContainer",
410410
"pullIdentity"
411411
],
@@ -500,8 +500,8 @@
500500
"metadata": {
501501
"_generator": {
502502
"name": "bicep",
503-
"version": "0.34.44.8038",
504-
"templateHash": "10664495342911727649"
503+
"version": "0.28.1.47646",
504+
"templateHash": "9096960510978747660"
505505
}
506506
},
507507
"parameters": {
@@ -638,8 +638,8 @@
638638
"metadata": {
639639
"_generator": {
640640
"name": "bicep",
641-
"version": "0.34.44.8038",
642-
"templateHash": "12550713338937452696"
641+
"version": "0.28.1.47646",
642+
"templateHash": "8215150938757657777"
643643
}
644644
},
645645
"parameters": {
@@ -1028,8 +1028,8 @@
10281028
"metadata": {
10291029
"_generator": {
10301030
"name": "bicep",
1031-
"version": "0.34.44.8038",
1032-
"templateHash": "11364190519186458619"
1031+
"version": "0.28.1.47646",
1032+
"templateHash": "15814429030073463584"
10331033
}
10341034
},
10351035
"parameters": {

next-steps.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ To troubleshoot any issues, see [troubleshooting](#troubleshooting).
1717

1818
### Configure environment variables for running services
1919

20-
Configure environment variables for running services by updating `settings` in [main.parameters.json](./infra/main.parameters.json).
20+
Environment variables can be configured by modifying the `env` settings in [resources.bicep](./infra/resources.bicep).
21+
To define a secret, add the variable as a `secretRef` pointing to a `secrets` entry or a stored KeyVault secret.
2122

2223
### Configure CI/CD pipeline
2324

0 commit comments

Comments
 (0)