You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,11 @@ To change the azd parameters from the default values, follow the steps [here](./
193
193
* This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
194
194
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.
195
195
196
-
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:
196
+
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:
197
+
```shell
198
+
bash ./infra/scripts/process_sample_data.sh
199
+
```
200
+
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:
Copy file name to clipboardExpand all lines: docs/README_LOCAL.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
### Deploy from your local machine
2
2
3
3
#### Local Setup: Basic Chat Experience
4
-
1. Copy `.env.sample` to a new file called `.env` and configure the settings as described in the [Environment variables](#environment-variables) section.
4
+
1. Copy `.env.sample`present in `src` folder to a new file called `.env` and configure the settings as described in the [Environment variables](#environment-variables) section.
5
5
6
6
These variables are required:
7
7
-`AZURE_OPENAI_RESOURCE`
@@ -17,7 +17,7 @@
17
17
18
18
See the [documentation](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#example-response-2) for more information on these parameters.
19
19
20
-
2. Start the app with `start.cmd`. This will build the frontend, install backend dependencies, and then start the app. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`.
20
+
2. Start the app with `start.cmd` or `start.sh`. This will build the frontend, install backend dependencies, and then start the app. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`.
21
21
22
22
3. You can see the local running app at http://127.0.0.1:50505. If you experience a port conflict and the app does not load, stop the application in the terminal (CTRL-C on Windows), edit the `start.cmd` file and change the port to a value not in use (i.e., 5000).
23
23
@@ -50,7 +50,7 @@ NOTE: You may find you need to set: MacOS: `export NODE_OPTIONS="--max-old-space
50
50
-`AZURE_SEARCH_STRICTNESS`
51
51
-`AZURE_OPENAI_EMBEDDING_NAME`
52
52
53
-
3. Start the app with `start.cmd`. This will build the frontend, install backend dependencies, and then start the app. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`.
53
+
3. Start the app with `start.cmd` or `start.sh`. This will build the frontend, install backend dependencies, and then start the app. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`.
54
54
4. You can see the local running app at http://127.0.0.1:50505. If you experience a port conflict and the app does not load, stop the application in the terminal (CTRL-C on Windows), edit the `start.cmd` file and change the port to a value not in use (i.e., 5000).
55
55
56
56
NOTE: You may find you need to set: MacOS: `export NODE_OPTIONS="--max-old-space-size=8192"` or Windows: `set NODE_OPTIONS=--max-old-space-size=8192` to avoid running out of memory when building the frontend.
@@ -62,7 +62,7 @@ To enable chat history, you will need to set up CosmosDB resources. The ARM temp
62
62
-`AZURE_COSMOSDB_CONVERSATIONS_CONTAINER`
63
63
-`AZURE_COSMOSDB_ACCOUNT_KEY`
64
64
65
-
As above, start the app with `start.cmd`, then visit the local running app at http://127.0.0.1:50505. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`. If you experience a port conflict and the app does not load, stop the application in the terminal (CTRL-C on Windows), edit the `start.cmd` file and change the port to a value not in use (i.e., 5000).
65
+
As above, start the app with `start.cmd` or `start.sh`, then visit the local running app at http://127.0.0.1:50505. Or, just run the backend in debug mode using the VSCode debug configuration in `.vscode/launch.json`. If you experience a port conflict and the app does not load, stop the application in the terminal (CTRL-C on Windows), edit the `start.cmd` file and change the port to a value not in use (i.e., 5000).
66
66
67
67
#### Local Setup: Enable Message Feedback
68
68
To enable message feedback, you will need to set up CosmosDB resources. Then specify these additional environment variable:
@@ -75,10 +75,10 @@ To enable message feedback, you will need to set up CosmosDB resources. Then spe
75
75
76
76
You can use the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) to deploy the app from your local machine. Make sure you have version 2.48.1 or later.
77
77
78
-
If this is your first time deploying the app, you can use [az webapp up](https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest#az-webapp-up). Run the following two commands from the root folder of the repo, updating the placeholder values to your desired app name, resource group, location, and subscription. You can also change the SKU if desired.
78
+
If this is your first time deploying the app, you can use [az webapp up](https://learn.microsoft.com/en-us/cli/azure/webapp?view=azure-cli-latest#az-webapp-up). Run the following two commands from the `src` folder of the repo, updating the placeholder values to your desired app name, resource group, location, and subscription. You can also change the SKU if desired.
@@ -58,6 +38,23 @@ if [ -z "$role_assignment" ]; then
58
38
MSYS_NO_PATHCONV=1 az role assignment create --assignee $signed_user_id --role "Storage Blob Data Contributor" --scope $storage_account_resource_id --output none
59
39
if [ $?-eq 0 ];then
60
40
echo"Role assignment completed successfully."
41
+
retries=3
42
+
while [ $retries-gt 0 ];do
43
+
# Check if the role assignment was successful
44
+
role_assignment_check=$(MSYS_NO_PATHCONV=1 az role assignment list --assignee $signed_user_id --role "Storage Blob Data Contributor" --scope $storage_account_resource_id --query "[].roleDefinitionId" -o tsv)
45
+
if [ -n"$role_assignment_check" ];then
46
+
echo"Role assignment verified successfully."
47
+
break
48
+
else
49
+
echo"Role assignment not found, retrying..."
50
+
((retries--))
51
+
sleep 10
52
+
fi
53
+
done
54
+
if [ $retries-eq 0 ];then
55
+
echo"Error: Role assignment verification failed after multiple attempts. Try rerunning the script."
56
+
exit 1
57
+
fi
61
58
else
62
59
echo"Error: Role assignment failed."
63
60
exit 1
@@ -66,6 +63,27 @@ else
66
63
echo"User already has the Storage Blob Data Contributor role."
# Using az storage blob upload-batch to upload files with managed identity authentication, as the az storage fs directory upload command is not working with managed identity authentication.
0 commit comments