Skip to content

Commit ea9960e

Browse files
fix: Refactor data processing with manual scripts to resolve deployment script SFI issue
2 parents c32d133 + cf1acb3 commit ea9960e

39 files changed

+23577
-28239
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"features": {
66
"ghcr.io/azure/azure-dev/azd:latest": {},
77
"ghcr.io/devcontainers/features/azure-cli:1": {},
8-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
9+
"ghcr.io/jlaundry/devcontainer-features/mssql-odbc-driver:1": {
10+
"version": "18"
11+
}
912
},
1013
"customizations": {
1114
"vscode": {

.devcontainer/setup_env.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ git pull
66
# provide execute permission to quotacheck script
77
sudo chmod +x ./infra/scripts/checkquota_km.sh
88
sudo chmod +x ./infra/scripts/quota_check_params.sh
9-
sudo chmod +x ./infra/scripts/run_process_data_scripts.sh
9+
sudo chmod +x ./infra/scripts/process_sample_data.sh
10+
sudo chmod +x ./infra/scripts/process_custom_data.sh

azure.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,18 @@ hooks:
1818
run: |
1919
Write-Host "Web app URL: "
2020
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
21+
Write-Host "`nRun the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
22+
Write-Host "bash ./infra/scripts/process_sample_data.sh" -ForegroundColor Cyan
2123
shell: pwsh
2224
continueOnError: false
2325
interactive: true
2426
posix:
2527
run: |
2628
echo "Web app URL: "
2729
echo $WEB_APP_URL
30+
echo ""
31+
echo "Run the following command in your Bash terminal. It will grant the necessary permissions between resources and your user account, and also process and load the sample data into the application."
32+
echo "bash ./infra/scripts/process_sample_data.sh"
2833
shell: sh
2934
continueOnError: false
3035
interactive: true

documents/CustomizeData.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,24 @@ If you would like to update the solution to leverage your own data please follow
1414
> **Note for WAF-aligned deployments:** If your deployment uses private networking, you'll need to log into a VM within the virtual network to upload files. See [VM login instructions](#how-to-login-to-vm-using-azure-bastion) below.
1515
1616
3. If you have audio files, upload them to `custom_audiodata` folder. If you have call transcript files, upload them to `custom_transcripts` folder.
17-
4. Navigate to the terminal and run the `run_process_data_scripts.sh` to process the new data into the solution with the following commands.
18-
```shell
19-
cd infra/scripts
20-
21-
az login
22-
23-
bash run_process_data_scripts.sh resourcegroupname_param
17+
4. Navigate to the terminal and run the `process_custom_data.sh` script to process the new data into the solution with the following commands:
18+
19+
```bash
20+
bash ./infra/scripts/process_custom_data.sh
21+
```
22+
23+
If you don't have `azd env` then you need to pass parameters along with the command. Parameters are grouped by service for clarity. The command will look like the following:
24+
25+
```bash
26+
bash ./infra/scripts/process_custom_data.sh \
27+
<Resource-Group-Name> <Azure-Subscription-ID> \
28+
<Storage-Account-Name> <Storage-Container-Name> \
29+
<SQL-Server-Name> <SQL-Database-Name> <Backend-User-MID-Client-ID> <Backend-User-MID-Display-Name> \
30+
<AI-Search-Name> <Search-Endpoint> \
31+
<AI-Foundry-Resource-ID> <CU-Foundry-Resource-ID> \
32+
<OpenAI-Endpoint> <Embedding-Model> <Deployment-Model> \
33+
<CU-Endpoint> <AI-Agent-Endpoint> <CU-API-Version>
2434
```
25-
a. resourcegroupname_param - the name of the resource group.
2635
2736
## How to Login to VM Using Azure Bastion
2837

documents/DeploymentGuide.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ If you're not using one of the above options for opening the project, then you'l
147147
1. Make sure the following tools are installed:
148148
- [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.5) <small>(v7.0+)</small> - available for Windows, macOS, and Linux.
149149
- [Azure Developer CLI (azd)](https://aka.ms/install-azd) <small>(v1.18.0+)</small> - version
150-
- [Python 3.9+](https://www.python.org/downloads/)
150+
- [Python 3.9 to 3.11](https://www.python.org/downloads/)
151151
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
152152
- [Git](https://git-scm.com/downloads)
153+
- [Microsoft ODBC Driver 18](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16) for SQL Server.
153154

154155
2. Clone the repository or download the project code via command-line:
155156

@@ -244,12 +245,31 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
244245
245246
3. Provide an `azd` environment name (e.g., "ckmapp").
246247
4. Select a subscription from your Azure account and choose a location that has quota for all the resources.
247-
-- This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
248+
- This deployment generally takes **7-10 minutes** to provision the resources in your account and set up the solution.
248249
- If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources.
249250
250-
5. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`.
251+
5. Once the deployment has completed successfully and you would like to use the **sample data**, please open a **Git Bash terminal** and run the bash command printed below. The bash command will look like the following:
251252
252-
6. If you are done trying out the application, you can delete the resources by running `azd down`.
253+
```bash
254+
bash ./infra/scripts/process_sample_data.sh
255+
```
256+
257+
If you don't have `azd env` then you need to pass parameters along with the command. Parameters are grouped by service for clarity. The command will look like the following:
258+
259+
```bash
260+
bash ./infra/scripts/process_sample_data.sh \
261+
<Resource-Group-Name> <Azure-Subscription-ID> \
262+
<Storage-Account-Name> <Storage-Container-Name> \
263+
<SQL-Server-Name> <SQL-Database-Name> <Backend-User-MID-Client-ID> <Backend-User-MID-Display-Name> \
264+
<AI-Search-Name> <Search-Endpoint> \
265+
<AI-Foundry-Resource-ID> <CU-Foundry-Resource-ID> \
266+
<OpenAI-Endpoint> <Embedding-Model> <Deployment-Model> \
267+
<CU-Endpoint> <AI-Agent-Endpoint> <CU-API-Version>
268+
```
269+
270+
6. Once the deployment has completed successfully, open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service, and get the app URL from `Default domain`.
271+
272+
7. You can now delete the resources by running `azd down`, if you are done trying out the application.
253273
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down` else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`.
254274

255275
### 🛠️ Troubleshooting

documents/LocalDebuggingSetup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ Install these tools before you start:
1111
- [Azure Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack)
1212
- [Bicep](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep)
1313
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
14-
- [Python 3.11](https://www.python.org/downloads/). **Important:** Check "Add Python to PATH" during installation.
14+
- [Python 3.9 to 3.11](https://www.python.org/downloads/). **Important:** Check "Add Python to PATH" during installation.
1515
- [PowerShell 7.0+](https://github.com/PowerShell/PowerShell#get-powershell).
1616
- [Node.js (LTS)](https://nodejs.org/en).
1717
- [Git](https://git-scm.com/downloads).
1818
- [Azure Developer CLI (azd) v1.18.0+](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/install-azd).
19-
- [Microsoft ODBC Driver 17](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16) for SQL Server.
19+
- [Microsoft ODBC Driver 18](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16) for SQL Server.
2020

2121

2222
## Setup Steps

0 commit comments

Comments
 (0)