Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c57d877
update post deployment scripts
malrose07 Apr 3, 2025
2f9bf70
refactor: update scripts and add process_sample_data.sh
Harsh-Microsoft Apr 3, 2025
ad5fed2
minor fix
Harsh-Microsoft Apr 3, 2025
3828e03
minor error handling fix for python scripts in index creation scripts
Harsh-Microsoft Apr 3, 2025
6e613f4
correct echo message in index creation script
Harsh-Microsoft Apr 3, 2025
5347792
feat: add role assignment for signed-in user in copy_kb_files.sh
Harsh-Microsoft Apr 3, 2025
97ca74e
update reame
malrose07 Apr 3, 2025
d4749b0
add role checks for Storage Blob Data Contributor and Key Vault Admin…
Harsh-Microsoft Apr 4, 2025
9868620
handled virtual environment activation for different OS
Harsh-Microsoft Apr 4, 2025
8ffc239
Merge pull request #373 from microsoft/template-deployment
Roopan-Microsoft Apr 5, 2025
9e953b8
deployfile
UtkarshMishra-Microsoft Apr 7, 2025
ae6e81c
Merge pull request #379 from microsoft/updated-rg-name
Roopan-Microsoft Apr 7, 2025
efff5f5
Add PowerShell setup instructions and enhance sample data processing …
Harsh-Microsoft Apr 8, 2025
61e7b71
Enable public network access for query in Application Insights
Harsh-Microsoft Apr 8, 2025
bf9dd60
Merge pull request #380 from microsoft/gh-issue-375
Roopan-Microsoft Apr 8, 2025
a0e54c1
docs: update quota_check
malrose07 Apr 8, 2025
fb51f64
Merge pull request #381 from microsoft/template-deployment
malrose07 Apr 8, 2025
4a87392
docs: update readme
malrose07 Apr 9, 2025
5e9a684
Merge pull request #382 from microsoft/template-deployment
aniaroramsft Apr 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ jobs:
id: generate_rg_name
run: |
echo "Generating a unique resource group name..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
COMMON_PART="pslautomationRes"
UNIQUE_RG_NAME="${COMMON_PART}${TIMESTAMP}"
ACCL_NAME="docgen" # Account name as specified
SHORT_UUID=$(uuidgen | cut -d'-' -f1)
UNIQUE_RG_NAME="arg-${ACCL_NAME}-${SHORT_UUID}"
echo "RESOURCE_GROUP_NAME=${UNIQUE_RG_NAME}" >> $GITHUB_ENV
echo "Generated Resource_GROUP_PREFIX: ${UNIQUE_RG_NAME}"
echo "Generated RESOURCE_GROUP_NAME: ${UNIQUE_RG_NAME}"

- name: Check and Create Resource Group
id: check_create_rg
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ __pycache__/
venv
myenv

scriptsenv/
scriptsenv/

scriptenv
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Here are some example regions where the services are available: East US, East US

### Configurable Deployment Settings

When you start the deployment, most parameters will have **default values**, but you can update the following settings:
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](./docs/CustomizingAzdParameters.md):

| **Setting** | **Description** | **Default value** |
|------------|----------------| ------------|
Expand Down Expand Up @@ -138,6 +138,7 @@ If you're not using one of the above options for opening the project, then you'l
* [Python 3.9+](https://www.python.org/downloads/)
* [Docker Desktop](https://www.docker.com/products/docker-desktop/)
* [Git](https://git-scm.com/downloads)
* [Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5) (Required for Windows users only. Follow the steps [here](./docs/PowershellSetup.md) to add it to the Windows PATH.)

2. Download the project code:

Expand Down Expand Up @@ -192,7 +193,12 @@ To change the azd parameters from the default values, follow the steps [here](./
* This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.

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`.
5. Once the deployment has completed successfully and you would like to use the sample data, run the bash command printed in the terminal. The bash command will look like the following:
```shell
bash ./infra/scripts/process_sample_data.sh <Storage-Account-name> <Storgae-Account-container-name> <Key-Vault-name> <CosmosDB-Account-name> <Resource-Group-name>
```

6. 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`.

6. You can now delete the resources by running `azd down`, if you are done trying out the application.
<!-- 6. You can now proceed to run the [development server](#development-server) to test the app locally, or if you are done trying out the app, you can delete the resources by running `azd down`. -->
Expand Down
5 changes: 5 additions & 0 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ hooks:
run: |
Write-Host "Web app URL: "
Write-Host "$env:WEB_APP_URL" -ForegroundColor Cyan
Write-Host "`nIf you want to use the Sample Data, run the following command in the Bash terminal to process it:"
Write-Host "bash ./infra/scripts/process_sample_data.sh $env:STORAGE_ACCOUNT_NAME $env:STORAGE_CONTAINER_NAME $env:KEY_VAULT_NAME $env:COSMOSDB_ACCOUNT_NAME $env:RESOURCE_GROUP_NAME" -ForegroundColor Cyan
shell: pwsh
continueOnError: false
interactive: true
posix:
run: |
echo "Web app URL: "
echo $WEB_APP_URL
echo ""
echo "If you want to use the Sample Data, run the following command in the terminal to process it:"
echo "bash ./infra/scripts/process_sample_data.sh $STORAGE_ACCOUNT_NAME $STORAGE_CONTAINER_NAME $KEY_VAULT_NAME $COSMOSDB_ACCOUNT_NAME $RESOURCE_GROUP_NAME"
shell: sh
continueOnError: false
interactive: true
45 changes: 45 additions & 0 deletions docs/PowershellSetup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Add PowerShell 7 to PATH in Windows

This guide will help you add **PowerShell 7** (PowerShell Core) to your system’s PATH variable on Windows, so you can easily run it from any Command Prompt or Run dialog.

## Prerequisites

- You should have **PowerShell 7** installed on your machine. If you haven’t installed it yet, you can download it following the guide here: [Installing PowerShell on Windows | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5).
- **Administrative privileges are not required** unless you're modifying system-wide environment variables. You can modify your **user-specific PATH** without admin rights.

## Steps to Add PowerShell 7 to PATH

### 1. Open **System Properties**
- Press `Win + X` and choose **System**.
- Click on **Advanced system settings** on the left sidebar. This will open the **System Properties** window.
- In the **System Properties** window, click on the **Environment Variables** button at the bottom.

### 2. Edit User Environment Variables
- In the **Environment Variables** window, under **User variables**, find the `Path` variable.
- Select the `Path` variable and click **Edit**. (If the `Path` variable doesn’t exist, click **New** and name it `Path`.)

### 3. Check if PowerShell 7 Path is Already in PATH
- Before adding the path, make sure the following path is not already present in the list:
```
C:\Program Files\PowerShell\7\
```
- If the path is already there, you don't need to add it again.
### 4. Add PowerShell 7 Path
- If the path is not already in the list, click **New** in the **Edit Environment Variable** window.
- Add the following path to the list:
```
C:\Program Files\PowerShell\7\
```
> **Note:** If you installed PowerShell 7 in a custom location, replace the above path with the correct one.
### 5. Save Changes
- After adding the path, click **OK** to close the **Edit Environment Variable** window.
- Click **OK** again to close the **Environment Variables** window.
- Finally, click **OK** to exit the **System Properties** window.
### 6. Verify PowerShell 7 in PATH
- Open **Command Prompt** or **Run** (press `Win + R`).
- Type `pwsh` and press Enter.
- If PowerShell 7 opens, you've successfully added it to your PATH!
---
## Troubleshooting
- **PowerShell 7 not opening:** Ensure the path to PowerShell 7 is entered correctly. If you're using a custom installation folder, check that the correct path is added to the `Path` variable.
- **Changes not taking effect:** Try restarting your computer or logging out and logging back in for the changes to apply.
8 changes: 7 additions & 1 deletion docs/quota_check.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## Check Quota Availability Before Deployment

Before deploying the accelerator, **ensure sufficient quota availability** for the required model. \
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.

### Login if you have not done so already
```
azd auth login
```


### 📌 Default Models & Capacities:
```
Expand Down
2 changes: 1 addition & 1 deletion infra/deploy_ai_foundry.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = {
properties: {
Application_Type: 'web'
publicNetworkAccessForIngestion: 'Enabled'
publicNetworkAccessForQuery: 'Disabled'
publicNetworkAccessForQuery: 'Enabled'
WorkspaceResourceId: logAnalytics.id
}
}
Expand Down
38 changes: 23 additions & 15 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,14 @@ module cosmosDBModule 'deploy_cosmos_db.bicep' = {
}
scope: resourceGroup(resourceGroup().name)
}
// output copykbfiles string = './infra/scripts/copy_kb_files.sh ${storageAccount.outputs.storageName} ${storageAccount.outputs.storageContainer} ${managedIdentityModule.outputs.managedIdentityOutput.clientId}'
// output createindex string = './infra/scripts/run_create_index_scripts.sh ${kvault.outputs.keyvaultName} ${managedIdentityModule.outputs.managedIdentityOutput.clientId}'

output STORAGE_ACCOUNT_NAME string = storageAccount.outputs.storageName
output STORAGE_CONTAINER_NAME string = storageAccount.outputs.storageContainer
output KEY_VAULT_NAME string = kvault.outputs.keyvaultName
output COSMOSDB_ACCOUNT_NAME string = cosmosDBModule.outputs.cosmosAccountName
output RESOURCE_GROUP_NAME string = resourceGroup().name


// //========== Deployment script to upload sample data ========== //
Expand Down Expand Up @@ -452,21 +460,21 @@ module cosmosDBModule 'deploy_cosmos_db.bicep' = {
// dependsOn:[keyVault,uploadFiles]
// }

//========== Deployment script to upload sample data ========== //
module uploadFiles 'deploy_post_deployment_scripts.bicep' = {
name : 'deploy_post_deployment_scripts'
params:{
solutionName: solutionPrefix
solutionLocation: secondaryLocation
baseUrl: baseUrl
storageAccountName: storageAccount.outputs.storageName
containerName: storageAccount.outputs.storageContainer
managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.id
managedIdentityClientId:managedIdentityModule.outputs.managedIdentityOutput.clientId
keyVaultName:aifoundry.outputs.keyvaultName
logAnalyticsWorkspaceResourceName: aifoundry.outputs.logAnalyticsWorkspaceResourceName
}
}
// //========== Deployment script to upload sample data ========== //
// module uploadFiles 'deploy_post_deployment_scripts.bicep' = {
// name : 'deploy_post_deployment_scripts'
// params:{
// solutionName: solutionPrefix
// solutionLocation: secondaryLocation
// baseUrl: baseUrl
// storageAccountName: storageAccount.outputs.storageName
// containerName: storageAccount.outputs.storageContainer
// managedIdentityObjectId:managedIdentityModule.outputs.managedIdentityOutput.id
// managedIdentityClientId:managedIdentityModule.outputs.managedIdentityOutput.clientId
// keyVaultName:aifoundry.outputs.keyvaultName
// logAnalyticsWorkspaceResourceName: aifoundry.outputs.logAnalyticsWorkspaceResourceName
// }
// }


// resource CosmosDB 'Microsoft.DocumentDB/databaseAccounts@2023-04-15' = {
Expand Down
Loading
Loading