Skip to content

Commit afc3b98

Browse files
Merge remote-tracking branch 'origin/main' into hotfix
2 parents 9314e06 + 349e596 commit afc3b98

File tree

152 files changed

+19503
-9154
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+19503
-9154
lines changed

.azdo/pipelines/azure-dev.yml

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

.devcontainer/devcontainer.json

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,48 @@
11
{
22
"name": "Multi Agent Custom Automation Engine Solution Accelerator",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.10",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
44
"features": {
5-
"ghcr.io/devcontainers/features/azure-cli:1.0.8": {},
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
66
"ghcr.io/azure/azure-dev/azd:latest": {},
7-
"ghcr.io/rchaganti/vsc-devcontainer-features/azurebicep:1.0.5": {}
7+
"ghcr.io/devcontainers/features/node:1": {},
8+
"ghcr.io/devcontainers/features/azure-cli:1": {},
9+
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {}
810
},
9-
10-
"postCreateCommand": "sudo chmod +x .devcontainer/setupEnv.sh && ./.devcontainer/setupEnv.sh",
11-
1211
"customizations": {
1312
"vscode": {
1413
"extensions": [
14+
"dbaeumer.vscode-eslint",
15+
"esbenp.prettier-vscode",
16+
"GitHub.vscode-github-actions",
1517
"ms-azuretools.azure-dev",
18+
"ms-azuretools.vscode-azurefunctions",
1619
"ms-azuretools.vscode-bicep",
17-
"ms-python.python"
18-
]
19-
},
20-
"codespaces": {
21-
"openFiles": [
22-
"README.md"
20+
"ms-azuretools.vscode-docker",
21+
"ms-vscode.js-debug",
22+
"ms-vscode.vscode-node-azure-pack",
23+
"charliermarsh.ruff",
24+
"exiasr.hadolint",
25+
"kevinrose.vsc-python-indent",
26+
"mosapride.zenkaku",
27+
"ms-python.python",
28+
"njpwerner.autodocstring",
29+
"redhat.vscode-yaml",
30+
"shardulm94.trailing-spaces",
31+
"tamasfe.even-better-toml",
32+
"yzhang.markdown-all-in-one",
33+
"ms-vscode.azure-account"
2334
]
2435
}
2536
},
26-
37+
"postCreateCommand": "bash ./.devcontainer/setupEnv.sh",
38+
"containerEnv": {
39+
"DISPLAY": "dummy",
40+
"PYTHONUNBUFFERED": "True",
41+
"UV_LINK_MODE": "copy",
42+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv"
43+
},
2744
"remoteUser": "vscode",
2845
"hostRequirements": {
2946
"memory": "8gb"
3047
}
31-
}
48+
}

.devcontainer/setupEnv.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
#!/bin/bash
22

3-
pip install --upgrade pip
3+
cd ./src/backend
4+
uv add -r requirements.txt
45

6+
cd ../frontend
7+
uv add -r requirements.txt
58

6-
(cd ./src/frontend; pip install -r requirements.txt)
9+
cd ..
710

811

9-
(cd ./src/backend; pip install -r requirements.txt)
12+
13+
14+
15+
16+
17+
# pip install --upgrade pip
18+
19+
20+
# (cd ./src/frontend; pip install -r requirements.txt)
21+
22+
23+
# (cd ./src/backend; pip install -r requirements.txt)
1024

1125

.github/CODEOWNER renamed to .github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @marktayl1 @Fr4nc3
5+
* @Avijit-Microsoft @Roopan-Microsoft @Prajwal-Microsoft @marktayl1 @Fr4nc3 @Vinay-Microsoft @aniaroramsft

.github/workflows/azure-dev.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Azure Template Validation
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
- main
7+
- feature/azd-semantickernel
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
pull-requests: write
14+
15+
jobs:
16+
template_validation_job:
17+
runs-on: ubuntu-latest
18+
name: Template validation
19+
steps:
20+
# Step 1: Checkout the code from your repository
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
# Step 2: Set up Python
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: "3.9"
29+
30+
# Step 3: Create and populate the virtual environment
31+
- name: Create virtual environment and install dependencies
32+
run: |
33+
python -m venv .venv
34+
source .venv/bin/activate
35+
python -m pip install --upgrade pip
36+
pip install azure-mgmt-resource azure-identity azure-core azure-mgmt-subscription azure-cli-core
37+
# Install any other dependencies that might be needed
38+
pip freeze > requirements-installed.txt
39+
echo "Virtual environment created with these packages:"
40+
cat requirements-installed.txt
41+
42+
# Step 4: Create azd directory if it doesn't exist
43+
- name: Create azd directory
44+
run: |
45+
mkdir -p ./.azd || true
46+
touch ./.azd/.env || true
47+
48+
# Step 5: Validate the Azure template
49+
- name: Validate Azure Template
50+
uses: microsoft/template-validation-action@v0.3.5
51+
id: validation
52+
env:
53+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
54+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
55+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
56+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
57+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
60+
# Step 6: Debug output in case of failure
61+
- name: Debug on failure
62+
if: failure()
63+
run: |
64+
echo "Validation failed. Checking environment:"
65+
ls -la
66+
if [ -d ".venv" ]; then
67+
echo ".venv directory exists"
68+
ls -la .venv/bin/
69+
else
70+
echo ".venv directory does not exist"
71+
fi
72+
if [ -d "tva_*" ]; then
73+
echo "TVA directory exists:"
74+
find . -name "tva_*" -type d
75+
ls -la $(find . -name "tva_*" -type d)
76+
else
77+
echo "No TVA directory found"
78+
fi
79+
80+
# Step 7: Print the result of the validation
81+
- name: Print result
82+
if: success()
83+
run: cat ${{ steps.validation.outputs.resultFile }}

.github/workflows/deploy.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
export GPT_MIN_CAPACITY="50"
2525
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
2626
27-
chmod +x deploy/scripts/checkquota.sh
28-
if ! deploy/scripts/checkquota.sh; then
27+
chmod +x infra/scripts/checkquota.sh
28+
if ! infra/scripts/checkquota.sh; then
2929
# If quota check fails due to insufficient quota, set the flag
30-
if grep -q "No region with sufficient quota found" deploy/scripts/checkquota.sh; then
30+
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
3131
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
3232
fi
3333
exit 1 # Fail the pipeline if any other failure occurs
@@ -73,9 +73,9 @@ jobs:
7373
id: generate_rg_name
7474
run: |
7575
echo "Generating a unique resource group name..."
76-
TIMESTAMP=$(date +%Y%m%d%H%M%S)
77-
COMMON_PART="ci-biab"
78-
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
76+
ACCL_NAME="macae" # Account name as specified
77+
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
78+
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
7979
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
8080
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"
8181
@@ -100,7 +100,7 @@ jobs:
100100
set -e
101101
az deployment group create \
102102
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
103-
--template-file deploy/macae.bicep \
103+
--template-file infra/macae.bicep \
104104
--parameters azureOpenAILocation=${{env.AZURE_LOCATION }} cosmosLocation=${{env.AZURE_LOCATION }}
105105
106106
@@ -168,34 +168,6 @@ jobs:
168168
echo "Azure Container Registry name: ${acr_name}"
169169
fi
170170
171-
172-
- name: Build the image and update the container app
173-
id: build-and-update
174-
run: |
175-
176-
set -e
177-
# Define variables for acr and container app names
178-
acr_name="${{ env.ACR_NAME }}"
179-
echo "ACR name: {$acr_name}"
180-
backend_container_app_name="macae-backend"
181-
backend_build_image_tag="backend:latest"
182-
183-
echo "Building the container image..."
184-
# Build the image
185-
az acr build -r ${acr_name} -t ${backend_build_image_tag} ./src/backend
186-
echo "Backend image build completed successfully."
187-
188-
frontend_container_app_name="${{ env.APP_SERVICE_NAME }}"
189-
frontend_build_image_tag="frontend:latest"
190-
191-
echo "Building the container image..."
192-
# Build the image
193-
az acr build -r ${acr_name} -t ${frontend_build_image_tag} ./src/frontend
194-
echo "Frontend image build completed successfully."
195-
196-
# Add the new container to the website
197-
az webapp config container set --resource-group ${{ env.RESOURCE_GROUP_NAME }} --name ${frontend_container_app_name} --container-image-name ${acr_name}.azurecr.io/frontend:latest --container-registry-url https://${acr_name}.azurecr.io
198-
199171
200172
- name: Delete Bicep Deployment
201173
if: success()
@@ -282,4 +254,4 @@ jobs:
282254
echo "Purged the openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
283255
fi
284256
285-
echo "Resource purging completed successfully"
257+
echo "Resource purging completed successfully"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,5 @@ __pycache__/
456456
*.xsd.cs
457457

458458
*.whl
459-
!autogen_core-0.3.dev0-py3-none-any.whl
459+
.azure
460+
.github/copilot-instructions.md
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"folders": [
3+
{
4+
"path": "."
5+
},
6+
// {
7+
// "path": "./src/frontend"
8+
// },
9+
// {
10+
// "path": "./src/backend"
11+
// }
12+
]
13+
}

0 commit comments

Comments
 (0)