Skip to content

Commit 671e12d

Browse files
Merge branch 'main' into dev
2 parents 4208057 + d1399a8 commit 671e12d

17 files changed

+88
-776
lines changed

.devcontainer/setup_env.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ git fetch
44
git pull
55

66
# provide execute permission to quotacheck script
7-
chmod +x ./infra/scripts/checkquota.sh
7+
sudo chmod +x ./infra/scripts/checkquota.sh
8+
sudo chmod +x ./infra/scripts/quota_check_params.sh
89

910
# Add the path to ~/.bashrc for persistence
1011
if ! grep -q '/opt/mssql-tools18/bin' ~/.bashrc; then
@@ -20,9 +21,3 @@ if ! command -v sqlcmd &> /dev/null; then
2021
exit 1
2122
fi
2223

23-
# Install Azure function core tool
24-
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
25-
sudo dpkg -i packages-microsoft-prod.deb
26-
27-
sudo apt-get update
28-
sudo apt-get install azure-functions-core-tools-4

.github/workflows/CAdeploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
export TEXT_EMBEDDING_MIN_CAPACITY="45"
2727
export AZURE_REGIONS="${{ vars.AZURE_REGIONS_CA }}"
2828
29-
chmod +x scripts/checkquota.sh
30-
if ! scripts/checkquota.sh; then
29+
chmod +x infra/scripts/checkquota.sh
30+
if ! infra/scripts/checkquota.sh; then
3131
# If quota check fails due to insufficient quota, set the flag
32-
if grep -q "No region with sufficient quota found" scripts/checkquota.sh; then
32+
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
3333
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
3434
fi
3535
exit 1 # Fail the pipeline if any other failure occurs
@@ -115,7 +115,7 @@ jobs:
115115
az deployment group create \
116116
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
117117
--template-file infra/main.bicep \
118-
--parameters solutionPrefix=${{ env.SOLUTION_PREFIX }} cosmosLocation=${{ env.AZURE_LOCATION }}
118+
--parameters AzureOpenAILocation=${{ env.AZURE_LOCATION }}
119119
120120
- name: List KeyVaults and Store in Array
121121
id: list_keyvaults

.github/workflows/Create-Release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
'@semantic-release/github'
5757
]
5858
env:
59-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6060
- run: echo ${{ steps.semantic.outputs.release-version }}
6161

6262
- run: echo "$OUTPUTS"

.github/workflows/azure-dev-validation.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Azure Template Validation
22
on:
3-
push:
4-
branches:
5-
- dev
6-
- main
73
workflow_dispatch:
84

95
permissions:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,3 +401,6 @@ FodyWeavers.xsd
401401

402402
scriptenv
403403
.azure
404+
405+
clientdata
406+
clienttranscripts

docs/AppAuthentication.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +0,0 @@
1-
# Set up Authentication in Azure Container App
2-
3-
This document provides step-by-step instructions to configure Azure App Registrations for a front-end application.
4-
5-
## Prerequisites
6-
7-
- Access to **Microsoft Entra ID**
8-
- Necessary permissions to create and manage **App Registrations**
9-
10-
## Add Authentication in Azure App Service configuration
11-
12-
1. Click on `Authentication` from left menu.
13-
14-
![Authentication](images/AppAuthentication.png)
15-
16-
1. Click on `+ Add identity provider` to see a list of identity providers.
17-
18-
![Authentication Identity](images/AppAuthenticationIdentityNew.png)
19-
20-
> **Note:** If you encounter the following error message indicating that your organization's policy prohibits the automatic use of secrets, please refer to our [Manual App Registration Configuration](./ManualAppRegistrationConfiguration.md) for detailed manual setup instructions.
21-
> ![add_auth_provider_web_3](./Images/AppAuthenticationIdentityProviderRestriction.png)
22-
23-
1. Click on `+ Add Provider` to see a list of identity providers.
24-
25-
![Add Provider](images/AppAuthIdentityProvider.png)
26-
27-
1. Select the first option `Microsoft Entra Id` from the drop-down list.
28-
![Add Provider](images/AppAuthIdentityProviderAdd.png)
29-
30-
1. Accept the default values and click on `Add` button to go back to the previous page with the identify provider added.
31-
![Authentication Identity](images/AppAuthenticationIdentity.png)

docs/DeploymentGuide.md

Lines changed: 0 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -1,220 +0,0 @@
1-
# Deployment Guide
2-
3-
## **Pre-requisites**
4-
5-
To deploy this solution accelerator, ensure you have access to an [Azure subscription](https://azure.microsoft.com/free/) with the necessary permissions to create **resource groups, resources, and assign roles at the resource group level***. Follow the steps in [Azure Account Set Up](AzureAccountSetUp.md)
6-
7-
Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/table) page and select a **region** where the following services are available:
8-
9-
- [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/)
10-
- [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/)
11-
- [Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/)
12-
- [Azure SQL Database](https://learn.microsoft.com/en-us/azure/azure-sql/)
13-
- [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/)
14-
- [Azure Semantic Search](AzureSemanticSearchRegion.md)
15-
16-
Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central.
17-
18-
19-
### **Important: Check Azure OpenAI Quota Availability**
20-
21-
⚠️ To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./quota_check.md) before you deploy the solution.
22-
23-
24-
### [Optional] Quota Recommendations
25-
By default, the **Gpt-4o-mini model capacity** in deployment is set to **30k tokens**, so we recommend
26-
27-
> **For Global Standard | GPT-4o-mini - the capacity to at least 100k tokens post-deployment for optimal performance.**
28-
29-
To adjust quota settings, follow these [steps](AzureGPTQuotaSettings.md)
30-
31-
32-
## Deployment Options & Steps
33-
34-
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.
35-
36-
| [![Open in Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=microsoft/Build-your-own-copilot-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator) |
37-
|---|---|
38-
39-
<details>
40-
<summary><b>Deploy in GitHub Codespaces</b></summary>
41-
42-
### GitHub Codespaces
43-
44-
You can run this solution using [GitHub Codespaces](https://docs.github.com/en/codespaces). The button will open a web-based VS Code instance in your browser:
45-
46-
1. Open the solution accelerator (this may take several minutes):
47-
48-
[![Open in Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=microsoft/Build-your-own-copilot-Solution-Accelerator)
49-
50-
2. Accept the default values on the create Codespaces page.
51-
3. Open a terminal window if it is not already open.
52-
4. Continue with the [deploying steps](#deploying-with-azd).
53-
54-
</details>
55-
56-
<details>
57-
<summary><b>Deploy in VS Code</b></summary>
58-
59-
### VS Code Dev Containers
60-
61-
You can run this solution in [VS Code Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers), which will open the project in your local VS Code using the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers):
62-
63-
1. Start Docker Desktop (install it if not already installed).
64-
2. Open the project:
65-
66-
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator)
67-
68-
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
69-
4. Continue with the [deploying steps](#deploying-with-azd).
70-
71-
</details>
72-
73-
<details>
74-
<summary><b>Deploy in your local Environment</b></summary>
75-
76-
### Local Environment
77-
78-
If you're not using one of the above options for opening the project, then you'll need to:
79-
80-
1. Make sure the following tools are installed:
81-
- [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.
82-
- [Azure Developer CLI (azd)](https://aka.ms/install-azd)
83-
- [Python 3.9+](https://www.python.org/downloads/)
84-
- [Docker Desktop](https://www.docker.com/products/docker-desktop/)
85-
- [Git](https://git-scm.com/downloads)
86-
- [Microsoft ODBC Driver 18 for SQL Server](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16)
87-
- [sqlcmd(ODBC-Windows)](https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-utility?view=sql-server-ver16&tabs=odbc%2Cwindows%2Cwindows-support&pivots=cs1-bash#download-and-install-sqlcmd) / [sqlcmd(Linux/Mac)](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver16&tabs=redhat-install)
88-
89-
2. Clone the repository or download the project code via command-line:
90-
91-
```shell
92-
azd init -t microsoft/build-your-own-copilot-solution-accelerator/
93-
```
94-
95-
3. Open the project folder in your terminal or editor.
96-
4. Continue with the [deploying steps](#deploying-with-azd).
97-
98-
</details>
99-
100-
<br/>
101-
102-
Consider the following settings during your deployment to modify specific settings:
103-
104-
<details>
105-
<summary><b>Configurable Deployment Settings</b></summary>
106-
107-
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](CustomizingAzdParameters.md):
108-
109-
| **Setting** | **Description** | **Default value** |
110-
|------------|----------------| ------------|
111-
| **Azure OpenAI Location** | The region where OpenAI deploys | eastus2 |
112-
| **Environment Name** | A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | byocatemplate |
113-
| **Cosmos Location** | A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 |
114-
| **Deployment Type** | Select from a drop-down list. | Global Standard |
115-
| **GPT Model** | OpenAI GPT model | gpt-4o-mini |
116-
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. | 30k |
117-
| **Embedding Model** | OpenAI embedding model | text-embedding-ada-002 |
118-
| **Embedding Model Capacity** | Set the capacity for **embedding models**. | 80k |
119-
120-
</details>
121-
122-
<details>
123-
<summary><b>[Optional] Quota Recommendations</b></summary>
124-
125-
By default, the **GPT model capacity** in deployment is set to **30k tokens**.
126-
> **We recommend increasing the capacity to 100k tokens, if available, for optimal performance.**
127-
128-
To adjust quota settings, follow these [steps](./AzureGPTQuotaSettings.md).
129-
130-
**⚠️ Warning:** Insufficient quota can cause deployment errors. Please ensure you have the recommended capacity or request additional capacity before deploying this solution.
131-
132-
</details>
133-
134-
### Deploying with AZD
135-
136-
Once you've opened the project in [Codespaces](#github-codespaces), [Dev Containers](#vs-code-dev-containers), or [locally](#local-environment), you can deploy it to Azure by following these steps:
137-
138-
1. Login to Azure:
139-
140-
```shell
141-
azd auth login
142-
```
143-
144-
#### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**:
145-
146-
```sh
147-
azd auth login --tenant-id <tenant-id>
148-
```
149-
150-
> **Note:** To retrieve the Tenant ID required for local deployment, you can go to **Tenant Properties** in [Azure Portal](https://portal.azure.com/) from the resource list. Alternatively, follow these steps:
151-
>
152-
> 1. Open the [Azure Portal](https://portal.azure.com/).
153-
> 2. Navigate to **Azure Active Directory** from the left-hand menu.
154-
> 3. Under the **Overview** section, locate the **Tenant ID** field. Copy the value displayed.
155-
156-
2. Provision and deploy all the resources:
157-
158-
```shell
159-
azd up
160-
```
161-
162-
3. Provide an `azd` environment name (e.g., "byocaapp").
163-
4. Select a subscription from your Azure account and choose a location that has quota for all the resources.
164-
- This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
165-
- If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources.
166-
167-
5. Once the deployment is complete, please follow the [Import Sample Data](#post-deployment-steps) instructions under **Post Deployment Steps** to load the sample data correctly.
168-
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`.
169-
7. Test the app locally with the sample question with any selected client: _Show latest asset value by asset type?_. For more sample questions you can test in the application, see [Sample Questions](SampleQuestions.md).
170-
8. You can now delete the resources by running `azd down`, if you are done trying out the application.
171-
172-
### Publishing Local Build Container to Azure Container Registry
173-
174-
If you need to rebuild the source code and push the updated container to the deployed Azure Container Registry, follow these steps:
175-
176-
1. Set the environment variable `USE_LOCAL_BUILD` to `True`:
177-
178-
- **Linux/macOS**:
179-
```bash
180-
export USE_LOCAL_BUILD=True
181-
```
182-
183-
- **Windows (PowerShell)**:
184-
```powershell
185-
$env:USE_LOCAL_BUILD = $true
186-
```
187-
2. Run the `az login` command
188-
```bash
189-
az login
190-
```
191-
192-
3. Run the `azd up` command again to rebuild and push the updated container:
193-
```bash
194-
azd up
195-
```
196-
197-
This will rebuild the source code, package it into a container, and push it to the Azure Container Registry associated with your deployment.
198-
199-
## Post Deployment Steps
200-
201-
1. **Import Sample Data**
202-
-Run bash command printed in the terminal. The bash command will look like the following:
203-
```shell
204-
bash ./infra/scripts/process_sample_data.sh
205-
```
206-
if you don't have azd env then you need to pass parameters along with the command. Then the command will look like the following:
207-
```shell
208-
bash ./infra/scripts/process_sample_data.sh <resourceGroupName> <cosmosDbAccountName> <storageAccount> <storageContainerName> <keyvaultName> <sqlServerName> <sqlDatabaseName> <webAppUserManagedIdentityClientId> <webAppUserManagedIdentityDisplayName>
209-
```
210-
211-
2. **Add Authentication Provider**
212-
- Follow steps in [App Authentication](./AppAuthentication.md) to configure authenitcation in app service. Note that Authentication changes can take up to 10 minutes.
213-
214-
3. **Fabric Configuration**,
215-
- Follow steps in [Fabric Deployment guide](FabricDeployment.md) to set up the data processing pipelines and Power BI report in Fabric.
216-
4. **Teams App Configuration**
217-
- *(Optional)* Follow steps in [Teams Tab App guide](TeamsAppDeployment.md) to add the Client Advisor app to Microsoft Teams.
218-
5. **Deleting Resources After a Failed Deployment**
219-
220-
- Follow steps in [Delete Resource Group](DeleteResourceGroup.md) if your deployment fails and/or you need to clean up the resources.

docs/FabricDeployment.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,19 @@
4747
2. Select Fabric Workspace
4848
3. Click `Select`
4949
4. After publish is complete, navigate to Fabric Workspace
50-
5. Click `...` next to the Semantic model for Power BI report
50+
5. You will find the report in the Fabric Workspace under the name **WealthAdvisor-Client360Report**.
51+
6. Use the report's filtering options to analyze client data.
52+
<!-- 5. Click `...` next to the Semantic model for Power BI report
5153
6. Click on `Settings`
5254
7. Click on `Edit credentials` (under Data source credentials)
5355
8. Select `OAuth2` for the Authentication method
5456
9. Select option for `Privacy level setting for this data source`
5557
10. Click `Sign in`
5658
11. Navigate back to Fabric workspace and click on Power BI report.
5759
12. Click on `File` -> `Embed Report` -> `Website or Portal` from the top menu.
58-
13. Copy the first line from the popup with title `Here's a link you can use to embed this content.` for use later in step 5.6.
60+
13. Copy the first line from the popup with title `Here's a link you can use to embed this content.` for use later in step 5.6. -->
5961

60-
## Step 5: Update the Power BI URL in Azure App Service configuration
62+
<!-- ## Step 5: Update the Power BI URL in Azure App Service configuration
6163
1. Launch the Azure Portal [Azure Portal](https://portal.azure.com/).
6264
2. Enter `Resource Groups` in the top search bar.
6365
@@ -80,4 +82,4 @@
8082
8183
8. Click on `Overview` from the left menu. Then click on `Restart` button in the top menu. Then click on `Yes` in the pop-up message.
8284
83-
![Application Restart](images/fabric/AppServiceRestart.png)
85+
![Application Restart](images/fabric/AppServiceRestart.png) -->

docs/quota_check.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Check Quota Availability Before Deployment
22

33
Before deploying the accelerator, **ensure sufficient quota availability** for the required model.
4-
> **For Global Standard | GPT-4o-mini - the capacity to at least 100K tokens for optimal performance.**
4+
> **For Global Standard | GPT-4o-mini - increase the capacity to at least 150K tokens for optimal performance.**
55
66
### Login if you have not done so already
77
```

0 commit comments

Comments
 (0)