Skip to content

Commit a6f09cd

Browse files
Update LocalDeployment.md
1 parent ffbe33c commit a6f09cd

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

documentation/LocalDeployment.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
```
2323
- To specify a tenant, use:
2424
```bash
25-
az login --tenant 16b3c013-0000-0000-0000-000000000
25+
az login --tenant <tenant_id>
2626
```
2727

2828
3. **Create a Resource Group:**
@@ -42,29 +42,47 @@
4242
```bash
4343
az ad signed-in-user show --query id -o tsv
4444
```
45-
You will also be prompted for locations for Cosmos and Open AI services. This is to allow separate regions where there may be service quota restrictions
45+
You will also be prompted for locations for Cosmos and Open AI services. This is to allow separate regions where there may be service quota restrictions.
4646
47-
5. **Create a `.env` file:**
47+
- **Additional Notes**:
48+
49+
**Role Assignments in Bicep Deployment:**
50+
51+
The macae-dev.bicep deployment includes the assignment of the appropriate roles to AOAI and Cosmos services. If you want to modify an existing implementation—for example, to use resources deployed as part of the simple deployment for local debugging—you will need to add your own credentials to access the Cosmos and AOAI services. You can add these permissions using the following commands:
52+
```bash
53+
az cosmosdb sql role assignment create --resource-group <solution-accelerator-rg> --account-name <cosmos-db-account-name> --role-definition-name "Cosmos DB Built-in Data Contributor" --principal-id <aad-user-object-id> --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.DocumentDB/databaseAccounts/<cosmos-db-account-name>
54+
```
55+
56+
```bash
57+
az role assignment create --assignee <aad-user-upn> --role "Cognitive Services OpenAI User" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<azure-openai-account-name>
58+
```
59+
**Using a Different Database in Cosmos:**
60+
61+
You can set the solution up to use a different database in Cosmos. For example, you can name it something like autogen-dev. To do this:
62+
1. Change the environment variable **COSMOSDB_DATABASE** to the new database name.
63+
2. You will need to create the database in the Cosmos DB account. You can do this from the Data Explorer pane in the portal, click on the drop down labeled “_+ New Container_” and provide all the necessary details.
64+
65+
6. **Create a `.env` file:**
4866
4967
- Navigate to the `src` folder and create a `.env` file based on the provided `.env.sample` file.
5068
51-
6. **Fill in the `.env` file:**
69+
7. **Fill in the `.env` file:**
5270
5371
- Use the output from the deployment or check the Azure Portal under "Deployments" in the resource group.
5472
55-
7. **(Optional) Set up a virtual environment:**
73+
8. **(Optional) Set up a virtual environment:**
5674
5775
- If you are using `venv`, create and activate your virtual environment for both the frontend and backend folders.
5876
59-
8. **Install requirements - frontend:**
77+
9. **Install requirements - frontend:**
6078
6179
- In each of the frontend and backend folders -
6280
Open a terminal in the `src` folder and run:
6381
```bash
6482
pip install -r requirements.txt
6583
```
6684
67-
9. **Run the application:**
85+
10. **Run the application:**
6886
- From the src/backend directory:
6987
```bash
7088
python app.py

0 commit comments

Comments
 (0)