|
22 | 22 | ``` |
23 | 23 | - To specify a tenant, use: |
24 | 24 | ```bash |
25 | | - az login --tenant 16b3c013-0000-0000-0000-000000000 |
| 25 | + az login --tenant <tenant_id> |
26 | 26 | ``` |
27 | 27 |
|
28 | 28 | 3. **Create a Resource Group:** |
|
42 | 42 | ```bash |
43 | 43 | az ad signed-in-user show --query id -o tsv |
44 | 44 | ``` |
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. |
46 | 46 |
|
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:** |
48 | 66 |
|
49 | 67 | - Navigate to the `src` folder and create a `.env` file based on the provided `.env.sample` file. |
50 | 68 |
|
51 | | -6. **Fill in the `.env` file:** |
| 69 | +7. **Fill in the `.env` file:** |
52 | 70 |
|
53 | 71 | - Use the output from the deployment or check the Azure Portal under "Deployments" in the resource group. |
54 | 72 |
|
55 | | -7. **(Optional) Set up a virtual environment:** |
| 73 | +8. **(Optional) Set up a virtual environment:** |
56 | 74 |
|
57 | 75 | - If you are using `venv`, create and activate your virtual environment for both the frontend and backend folders. |
58 | 76 |
|
59 | | -8. **Install requirements - frontend:** |
| 77 | +9. **Install requirements - frontend:** |
60 | 78 |
|
61 | 79 | - In each of the frontend and backend folders - |
62 | 80 | Open a terminal in the `src` folder and run: |
63 | 81 | ```bash |
64 | 82 | pip install -r requirements.txt |
65 | 83 | ``` |
66 | 84 |
|
67 | | -9. **Run the application:** |
| 85 | +10. **Run the application:** |
68 | 86 | - From the src/backend directory: |
69 | 87 | ```bash |
70 | 88 | python app.py |
|
0 commit comments