Skip to content

Commit 5df8ae3

Browse files
Merge remote-tracking branch 'origin/dev' into dependabotchanges
2 parents 151d559 + bbe902d commit 5df8ae3

File tree

65 files changed

+45460
-3852
lines changed

Some content is hidden

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

65 files changed

+45460
-3852
lines changed

.github/ISSUE_TEMPLATE/subtask.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Sub task
3+
about: A sub task
4+
title: ''
5+
labels: subtask
6+
assignees: ''
7+
8+
---
9+
10+
Required by <link to parent issue>
11+
12+
# Description
13+
14+
A clear and concise description of what this subtask is.
15+
16+
# Tasks
17+
18+
_To be filled in by the engineer picking up the subtask
19+
20+
- [ ] Task 1
21+
- [ ] Task 2
22+
- [ ] ...

.github/workflows/deploy.yml

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
name: DocGen Deploy-Test-Cleanup Pipeline
22

33
on:
4-
workflow_run:
5-
workflows: ["Build Docker and Optional Push"]
6-
types:
7-
- completed
8-
branches:
9-
- main
10-
- dev
11-
- demo
12-
13-
schedule:
14-
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_run:
8+
workflows: ["Build Docker and Optional Push"]
9+
types:
10+
- completed
11+
branches:
12+
- main
13+
- dev
14+
- demo
15+
16+
schedule:
17+
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
1518

1619
env:
1720
GPT_MIN_CAPACITY: 150
1821
TEXT_EMBEDDING_MIN_CAPACITY: 80
19-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
22+
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
2023

2124
jobs:
2225
deploy:
@@ -83,7 +86,11 @@ jobs:
8386
- name: Set Deployment Region
8487
run: |
8588
echo "Selected Region: $VALID_REGION"
89+
echo "AZURE_AI_LOCATION=$VALID_REGION" >> $GITHUB_ENV
8690
echo "AZURE_LOCATION=$VALID_REGION" >> $GITHUB_ENV
91+
if [ "$VALID_REGION" == "eastus" ] || [ "$VALID_REGION" == "westus3" ]; then
92+
echo "AZURE_LOCATION=uksouth" >> $GITHUB_ENV
93+
fi
8794
8895
- name: Generate Resource Group Name
8996
id: generate_rg_name
@@ -126,30 +133,32 @@ jobs:
126133
set -e
127134
# set image tag based on branch
128135
if [[ "${{ env.BRANCH_NAME }}" == "main" ]]; then
129-
IMAGE_TAG="latest"
136+
IMAGE_TAG="latest_waf"
130137
elif [[ "${{ env.BRANCH_NAME }}" == "dev" ]]; then
131138
IMAGE_TAG="dev"
132139
elif [[ "${{ env.BRANCH_NAME }}" == "demo" ]]; then
133140
IMAGE_TAG="demo"
134141
else
135-
IMAGE_TAG="latest"
142+
IMAGE_TAG="latest_waf"
136143
fi
137144
145+
# Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
146+
current_date=$(date -u +"%Y-%m-%dT%H:%M:%S.%7NZ")
147+
138148
az deployment group create \
139149
--name ${{ env.SOLUTION_PREFIX }}-deployment \
140150
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
141-
--template-file infra/main.json \
151+
--template-file infra/main.bicep \
142152
--parameters \
143-
environmentName="${{ env.SOLUTION_PREFIX }}" \
144-
secondaryLocation="northcentralus" \
145-
deploymentType="GlobalStandard" \
146-
gptModelName="gpt-4.1" \
147-
azureOpenaiAPIVersion="2024-05-01-preview" \
148-
gptDeploymentCapacity=${{ env.GPT_MIN_CAPACITY }} \
149-
embeddingModel="text-embedding-ada-002" \
153+
solutionName="${{ env.SOLUTION_PREFIX }}" \
154+
secondaryLocation="${{ env.AZURE_LOCATION }}" \
155+
location="${{ env.AZURE_LOCATION }}" \
156+
gptModelCapacity=${{ env.GPT_MIN_CAPACITY }} \
150157
embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} \
151-
aiDeploymentsLocation=${{ env.AZURE_LOCATION }} \
152-
imageTag="${IMAGE_TAG}"
158+
azureAiServiceLocation=${{ env.AZURE_AI_LOCATION }} \
159+
imageTag="${IMAGE_TAG}"\
160+
createdBy="Pipeline" \
161+
tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}"
153162
154163
- name: Get Deployment Output and extract Values
155164
id: get_output
@@ -168,29 +177,31 @@ jobs:
168177
echo "KEY_VAULT_NAME=$KEY_VAULT_NAME" >> $GITHUB_ENV
169178
COSMOSDB_ACCOUNT_NAME=$(echo $BICEP_OUTPUT | jq -r '.cosmosdB_ACCOUNT_NAME.value')
170179
echo "COSMOSDB_ACCOUNT_NAME=$COSMOSDB_ACCOUNT_NAME" >> $GITHUB_ENV
171-
AI_FOUNDRY_NAME=$(echo $BICEP_OUTPUT | jq -r '.aI_FOUNDRY_NAME.value')
172-
echo "AI_FOUNDRY_NAME=$AI_FOUNDRY_NAME" >> $GITHUB_ENV
180+
AI_FOUNDRY_RESOURCE_ID=$(echo $BICEP_OUTPUT | jq -r '.aI_FOUNDRY_RESOURCE_ID.value')
181+
echo "AI_FOUNDRY_RESOURCE_ID=$AI_FOUNDRY_RESOURCE_ID" >> $GITHUB_ENV
173182
AI_SEARCH_SERVICE_NAME=$(echo $BICEP_OUTPUT | jq -r '.aI_SEARCH_SERVICE_NAME.value')
174183
echo "AI_SEARCH_SERVICE_NAME=$AI_SEARCH_SERVICE_NAME" >> $GITHUB_ENV
175184
echo "Deployment output: $BICEP_OUTPUT"
176185
177186
- name: Run Post-Deployment Script
178187
id: post_deploy
188+
env:
189+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
179190
run: |
180191
set -e
181192
az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
182193
183194
echo "Running post-deployment script..."
184-
bash ./infra/scripts/copy_kb_files.sh \
195+
196+
bash ./infra/scripts/process_sample_data.sh \
185197
"${{ env.STORAGE_ACCOUNT_NAME }}" \
186198
"${{ env.STORAGE_CONTAINER_NAME }}" \
187-
"${{ secrets.AZURE_CLIENT_ID }}"
188-
bash ./infra/scripts/run_create_index_scripts.sh \
189199
"${{ env.KEY_VAULT_NAME }}" \
200+
"${{ env.COSMOSDB_ACCOUNT_NAME }}" \
190201
"${{ env.RESOURCE_GROUP_NAME }}" \
191-
"${{ env.AI_FOUNDRY_NAME }}" \
192202
"${{ env.AI_SEARCH_SERVICE_NAME }}" \
193-
"${{ secrets.AZURE_CLIENT_ID }}"
203+
"${{ secrets.AZURE_CLIENT_ID }}" \
204+
"${{ env.AI_FOUNDRY_RESOURCE_ID }}"
194205
195206
- name: Logout from Azure
196207
if: always()
@@ -403,4 +414,4 @@ jobs:
403414
if: always()
404415
run: |
405416
az logout
406-
echo "Logged out from Azure."
417+
echo "Logged out from Azure."

.github/workflows/docker-build-and-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
id: determine_tag
5959
run: |
6060
if [[ "${{ github.ref_name }}" == "main" ]]; then
61-
echo "tagname=latest" >> $GITHUB_OUTPUT
61+
echo "tagname=latest_waf" >> $GITHUB_OUTPUT
6262
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
6363
echo "tagname=dev" >> $GITHUB_OUTPUT
6464
elif [[ "${{ github.ref_name }}" == "demo" ]]; then

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Quick deploy
6464
### How to install or deploy
6565
Follow the quick deploy steps on the deployment guide to deploy this solution to your own Azure subscription.
6666

67+
> **Note:** This solution accelerator requires **Azure Developer CLI (azd) version 1.18.0 or higher**. Please ensure you have the latest version installed before proceeding with deployment. [Download azd here](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).
68+
6769
[Click here to launch the deployment guide](./docs/DeploymentGuide.md)
6870
<br/><br/>
6971

azure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
template: document-generation@1.0
88

99
requiredVersions:
10-
azd: '>= 1.15.0'
10+
azd: '>= 1.18.0'
1111

1212
parameters:
1313
solutionPrefix:

docs/ACRBuildAndPushGuide.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Azure Container Registry (ACR) – Build & Push Guide
2+
3+
This guide provides step-by-step instructions to build and push Docker images for **WebApp** and **Backend** services into Azure Container Registry (ACR).
4+
5+
## 📋 Prerequisites
6+
Before starting, ensure you have:
7+
- An active [Azure Subscription](https://portal.azure.com/)
8+
- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) installed and logged in
9+
- [Docker Desktop](https://docs.docker.com/get-docker/) installed and running
10+
- Access to your Azure Container Registry (ACR)
11+
- To create an Azure Container Registry (ACR), you can refer to the following guides:
12+
13+
- [Create Container Registry using Azure CLI](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli)
14+
15+
- [Create Container Registry using Azure Portal](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal?tabs=azure-cli)
16+
17+
- [Create Container Registry using PowerShell](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-powershell)
18+
19+
- [Create Container Registry using ARM Template](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-geo-replication-template)
20+
21+
- [Create Container Registry using Bicep](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-bicep?tabs=CLI)
22+
23+
---
24+
25+
Login to ACR :
26+
``` bash
27+
az acr login --name $ACR_NAME
28+
```
29+
30+
## 🚀 Build and Push Images
31+
32+
**Backend** / **WebApp :**
33+
34+
```bash
35+
az acr login --name <containerregname>
36+
docker build --no-cache -f WebApp.Dockerfile -t <acrloginserver>/<repo>:<tagname> .
37+
docker push <acrloginserver>/<repo>:<tagname>
38+
```
39+
40+
If you want to update image tag and image manually you can follow below steps:
41+
- Go to your App Service in the [Azure Portal](https://portal.azure.com/#home).
42+
- In the left menu, select Deployment → Deployment Center
43+
- Under Registry settings, you can configure:
44+
45+
- Image Source → (e.g., Azure Container Registry / Docker Hub / Other).
46+
47+
- Image Name → e.g., myapp/backend.
48+
49+
- Tag → e.g., v1.2.3.
50+
51+
![alt text](./images/AppServiceContainer.png)
52+
53+
## ✅ Verification
54+
55+
Run the following command to verify that images were pushed successfully:
56+
```bash
57+
az acr repository list --name $ACR_NAME --output table
58+
```
59+
60+
You should see repositories in the output.
61+
62+
## 📝 Notes
63+
64+
- Always use meaningful tags (v1.0.0, staging, prod) instead of just latest.
65+
66+
- If you are pushing from a CI/CD pipeline, make sure the pipeline agent has access to Docker and ACR.
67+
68+
- For private images, ensure your services (e.g., Azure Container Apps, AKS, App Service) are configured with appropriate ACR pull permissions.
69+
70+
71+

docs/CustomizingAzdParameters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ By default this template will use the environment name as the prefix to prevent
99

1010
| Name | Type | Example Value | Purpose |
1111
| -------------------------------------- | ------- | ---------------------------- | ----------------------------------------------------------------------------- |
12-
| `AZURE_LOCATION` | string | `japaneast` | Sets the Azure region for resource deployment. |
12+
| `AZURE_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for resource deployment. |
1313
| `AZURE_ENV_NAME` | string | `docgen` | Sets the environment name prefix for all Azure resources. |
1414
| `AZURE_ENV_SECONDARY_LOCATION` | string | `eastus2` | Specifies a secondary Azure region. |
1515
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `Standard` | Defines the model deployment type (allowed: `Standard`, `GlobalStandard`). |
1616
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4.1` | Specifies the GPT model name (allowed: `gpt-4.1`). |
17-
| `AZURE_ENV_MODEL_VERSION` | string | `2024-05-13` | Set the Azure model version (allowed values: `2024-08-06`). |
18-
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2024-05-01-preview` | Specifies the API version for Azure OpenAI. |
17+
| `AZURE_ENV_MODEL_VERSION` | string | `2025-04-14` | Set the Azure model version. |
18+
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI. |
1919
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Sets the GPT model capacity (based on what's available in your subscription). |
2020
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Sets the name of the embedding model to use. |
21-
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the Image tag Like (allowed values: latest, dev, hotfix) |
21+
| `AZURE_ENV_IMAGETAG` | string | `latest_waf` | Set the Image tag Like (allowed values: latest_waf, dev, hotfix) |
2222
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Sets the capacity for the embedding model deployment. |
2323
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Reuses an existing Log Analytics Workspace instead of creating a new one. |
24-
24+
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | Guid to get your existing AI Foundry Project resource ID | Reuses an existing AIFoundry and AIFoundryProject instead of creating a new one. |
2525

2626

2727
## How to Set a Parameter

0 commit comments

Comments
 (0)