Skip to content

Commit 5d8b0b1

Browse files
Merge pull request #174 from microsoft/KM-AIFoundry
feat: AI Foundry release
2 parents c88bd65 + da5a8ce commit 5d8b0b1

File tree

217 files changed

+75143
-2680
lines changed

Some content is hidden

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

217 files changed

+75143
-2680
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)

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "azd-template",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye",
4+
"forwardPorts": [50505],
5+
"features": {
6+
"ghcr.io/azure/azure-dev/azd:latest": {}
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-azuretools.azure-dev",
12+
"ms-azuretools.vscode-bicep",
13+
"ms-python.python",
14+
"ms-toolsai.jupyter",
15+
"GitHub.vscode-github-actions"
16+
]
17+
}
18+
},
19+
"postCreateCommand": "python3 -m pip install -r infra/scripts/index_scripts/requirements.txt",
20+
"remoteUser": "vscode",
21+
"hostRequirements": {
22+
"memory": "8gb"
23+
}
24+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Azure Template Validation
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
contents: read
7+
id-token: write
8+
pull-requests: write
9+
10+
jobs:
11+
template_validation_job:
12+
runs-on: ubuntu-latest
13+
name: Template validation
14+
15+
steps:
16+
# Step 1: Checkout the code from your repository
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
# Step 2: Validate the Azure template using microsoft/template-validation-action
21+
- name: Validate Azure Template
22+
uses: microsoft/[email protected]
23+
id: validation
24+
env:
25+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
26+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
27+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
28+
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}
29+
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
# Step 3: Print the result of the validation
33+
- name: Print result
34+
run: cat ${{ steps.validation.outputs.resultFile }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set -e
5656
az deployment group create \
5757
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
58-
--template-file Deployment/bicep/main.bicep \
58+
--template-file infra/main.bicep \
5959
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} location=eastus
6060
6161
- name: Delete Bicep Deployment

.github/workflows/docker-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
- name: Build and Push Docker Image for WebApp
6262
uses: docker/build-push-action@v6
6363
with:
64-
context: ./App
65-
file: ./App/WebApp.Dockerfile
64+
context: ./src/App
65+
file: ./src/App/WebApp.Dockerfile
6666
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
6767
tags: |
6868
${{ secrets.ACR_LOGIN_SERVER }}/km-app:${{ steps.determine_tag.outputs.tagname }}
@@ -71,8 +71,8 @@ jobs:
7171
- name: Build and Push Docker Image for km-rag-function
7272
uses: docker/build-push-action@v6
7373
with:
74-
context: ./AzureFunctions/km-rag-function
75-
file: ./AzureFunctions/km-rag-function/Dockerfile
74+
context: ./src/api/km-rag-function
75+
file: ./src/api/km-rag-function/Dockerfile
7676
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
7777
tags: |
7878
${{ secrets.ACR_LOGIN_SERVER }}/km-rag-function:${{ steps.determine_tag.outputs.tagname }}
@@ -81,8 +81,8 @@ jobs:
8181
- name: Build and Push Docker Image for km-charts-function
8282
uses: docker/build-push-action@v6
8383
with:
84-
context: ./AzureFunctions/km-charts-function
85-
file: ./AzureFunctions/km-charts-function/Dockerfile
84+
context: ./src/api/km-charts-function
85+
file: ./src/api/km-charts-function/Dockerfile
8686
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' }}
8787
tags: |
8888
${{ secrets.ACR_LOGIN_SERVER }}/km-charts-function:${{ steps.determine_tag.outputs.tagname }}

.github/workflows/pylint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip
22-
pip install -r App/requirements.txt
22+
pip install -r src/App/requirements.txt
2323
pip install flake8 # Ensure flake8 is installed explicitly
2424
2525
- name: Run flake8 and pylint
2626
run: |
27-
flake8 --config=.flake8 App/backend # Specify the directory to lint
27+
flake8 --config=.flake8 src/App/backend # Specify the directory to lint

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ jobs:
7474
- name: Install Backend Dependencies
7575
run: |
7676
python -m pip install --upgrade pip
77-
pip install -r App/requirements.txt
77+
pip install -r src/App/requirements.txt
7878
pip install pytest-cov
7979
pip install pytest-asyncio
8080
8181
- name: Check if Backend Test Files Exist
8282
id: check_backend_tests
8383
run: |
84-
if [ -z "$(find App/backend -type f -name 'test_*.py')" ]; then
84+
if [ -z "$(find src/App/backend -type f -name 'test_*.py')" ]; then
8585
echo "No backend test files found, skipping backend tests."
8686
echo "skip_backend_tests=true" >> $GITHUB_ENV
8787
else

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
/LUISSchemaSerializationTool/LUISSchemaSerializationTool/bin
1010
/LUISSchemaSerializationTool/LUISSchemaSerializationTool/obj
1111
.fake
12+
.azure
-193 KB
Binary file not shown.

Deployment/bicep/build_bicep.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)