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
@@ -41,7 +41,7 @@ This application is an AI-driven orchestration system that manages a group of AI
41
41
- Incorporate human feedback into the workflow.
42
42
- Maintain state across sessions with persistent storage.
43
43
44
-
This system is intended for developing and deploying custom AI solutions for specific customers. This code has not been tested as an end-to-end, reliable, RAI compliant production application- it is a foundation to help accelerate building out multi-agent systems. You are encouraged to add your own data and functions to the agents, and then you must apply your own performance and safety evaluation testing frameworks to this system before deploying it.
44
+
This system is intended for developing and deploying custom AI solutions for specific customers. This code has not been tested as an end-to-end, reliable production application- it is a foundation to help accelerate building out multi-agent systems. You are encouraged to add your own data and functions to the agents, and then you must apply your own performance and safety evaluation testing frameworks to this system before deploying it.
@@ -80,106 +80,140 @@ There are several ways to deploy the solution. You can deploy to run in Azure i
80
80
When Deployment is complete, follow steps in [Set Up Authentication in Azure App Service](./documentation/azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service
81
81
82
82
## Local Deployment
83
-
To run the solution site and API backend locally, See the [local deployment guide](./documentation/LocalDeployment.md).
83
+
To run the solution site and API backend only locally for development and debugging purposes, See the [local deployment guide](./documentation/LocalDeployment.md).
84
84
85
85
## Manual Azure Deployment
86
+
Manual Deployment differs from the ‘Quick Deploy’ option in that it will install an Azure Container Registry (ACR) service, and relies on the installer to build and push the necessary containers to this ACR. This allows you to build and push your own code changes and provides a sample solution you can customize based on your requirements.
87
+
86
88
### Prerequisites
87
89
88
-
- Azure CLI installed
90
+
- Current Azure CLI installed
91
+
You can update to the latest version using ```az upgrade```
89
92
- Azure account with appropriate permissions
90
93
- Docker installed
91
-
- Azure Container Registry installed
92
94
93
-
### Get Admin Credentials from ACR
95
+
### Deploy the Azure Services
96
+
All of the necessary Azure services can be deployed using the /deploy/macae.bicep script. This script will require the following parameters:
97
+
98
+
```
99
+
az login
100
+
az account set --subscription <SUBSCRIPTION_ID>
101
+
az group create --name <RG_NAME> --location <RG_LOCATION>
102
+
```
103
+
To deploy the script you can use the Azure CLI.
104
+
```
105
+
az deployment group create \
106
+
--resource-group <RG_NAME> \
107
+
--template-file <BICEP_FILE> \
108
+
--name <DEPLOYMENT_NAME>
109
+
```
110
+
111
+
Note: if you are using windows with PowerShell, the continuation character (currently ‘\’) should change to the tick mark (‘`’).
112
+
113
+
The template will require you fill in locations for Cosmos and OpenAI services. This is to avoid the possibility of regional quota errors for either of these resources.
114
+
115
+
### Create the Containers
116
+
#### Get admin credentials from ACR
94
117
95
118
Retrieve the admin credentials for your Azure Container Registry (ACR):
96
119
97
120
```sh
98
121
az acr credential show \
99
-
--name acrcontoso7wx5mg43sbnl4 \
100
-
--resource-group rg-ssattiraju
122
+
--name <e.g. macaeacr2t62qyozi76bs> \
123
+
--resource-group <rg-name>
101
124
```
102
125
103
-
### Login to ACR
126
+
####Login to ACR
104
127
105
128
Login to your Azure Container Registry:
106
129
107
130
```sh
108
-
az acr login --name acrcontoso7wx5mg43sbnl4
131
+
az acr login --name <e.g. macaeacr2t62qyozi76bs>
109
132
```
110
133
111
-
### Build Image
134
+
####Build and push the image
112
135
113
-
Build the Docker image and push it to your Azure Container Registry:
136
+
Build the frontend and backend Docker images and push them to your Azure Container Registry. Run the following from the src/backend and the src/frontend directory contexts:
114
137
115
138
```sh
116
139
az acr build \
117
-
--registry acrcontoso7wx5mg43sbnl4 \
118
-
--resource-group rg-name \
119
-
--image macae:latest .
140
+
--registry <e.g. macaeacr2t62qyozi76bs> \
141
+
--resource-group <rg-name> \
142
+
--image <e.g. backendmacae:latest>.
120
143
```
121
144
122
-
### List the Image Created
145
+
### Add images to the Container APP and Web App services
123
146
124
-
List the images in your Azure Container Registry:
147
+
To add your newly created backend image:
148
+
- Navigate to the Container App Service in the Azure portal
149
+
- Click on Application/Containers in the left pane
150
+
- Click on the "Edit and deploy" button in the upper left of the containers pane
151
+
- In the "Create and deploy new revision" page, click on your container image 'backend'. This will give you the option of reconfiguring the container image, and also has an Environment variables tab
152
+
- Change the properties page to
153
+
- point to your Azure Container registry with a private image type and your image name (e.g. backendmacae:latest)
154
+
- under "Authentication type" select "Managed Identity" and choose the 'mace-containerapp-pull'... identity setup in the bicep template
155
+
- In the environment variables section add the following (each with a 'Manual entry' source):
125
156
126
-
```sh
127
-
az acr repository list --name acrcontoso7wx5mg43sbnl4
128
-
```
157
+
name: 'COSMOSDB_ENDPOINT'
158
+
value: \<Cosmos endpoint>
129
159
130
-
### Upgrade Container App Extension
160
+
name: 'COSMOSDB_DATABASE'
161
+
value: 'autogen'
162
+
Note: To change the default, you will need to create the database in Cosmos
163
+
164
+
name: 'COSMOSDB_CONTAINER'
165
+
value: 'memory'
131
166
132
-
Ensure you have the latest version of the Azure Container Apps extension:
133
-
`az extension add --name containerapp --upgrade`
167
+
name: 'AZURE_OPENAI_ENDPOINT'
168
+
value: <Azure OpenAI endpoint>
134
169
135
-
### Get List of Available Locations
170
+
name: 'AZURE_OPENAI_DEPLOYMENT_NAME'
171
+
value: 'gpt-4o'
136
172
137
-
Retrieve a list of available Azure locations:
138
-
`az account list-locations -o table`
173
+
name: 'AZURE_OPENAI_API_VERSION'
174
+
value: '2024-08-01-preview'
175
+
Note: Version should be updated based on latest available
139
176
140
-
### Create Apps Environment
177
+
name: 'FRONTEND_SITE_NAME'
178
+
value: 'https://<website Name>.azurewebsites.net'
141
179
142
-
Create an environment for your Azure Container Apps:
180
+
- Click 'Save' and deploy your new revision
181
+
182
+
To add the new container to your website run the following:
143
183
144
-
```sh
145
-
az containerapp env create \
146
-
--name python-container-env \
147
-
--resource-group rg-name \
148
-
--location southeastasia
184
+
```
185
+
az webapp config container set --resource-group macae_full_deploy2_rg \
### Add the Entra identity provider to the Azure Web App
193
+
To add the identity provider, please follow the steps outlined in [Set Up Authentication in Azure App Service](./documentation/azure_app_service_auth_setup.md)
156
194
157
-
### Create container app
195
+
### Run locally and debug
158
196
159
-
create the container app with the config
197
+
To debug the solution, you can use the Cosmos and OpenAI services you have manually deployed. To do this, you need to ensure that your Azure identity has the required permissions on the Cosmos and OpenAI services.
- For OpeAI service, you can add yourself to the ‘Cognitive Services OpenAI User’ permission in the Access Control (IAM) pane of the Azure portal.
200
+
- Cosmos is a little more difficult as it requires permissions be added through script. See these examples for more information:
201
+
-[Use data plane role-based access control - Azure Cosmos DB for NoSQL | Microsoft Learn](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/security/how-to-grant-data-plane-role-based-access?tabs=built-in-definition%2Cpython&pivots=azure-interface-cli)
202
+
-[az cosmosdb sql role assignment | Microsoft Learn](https://learn.microsoft.com/en-us/cli/azure/cosmosdb/sql/role/assignment?view=azure-cli-latest#az-cosmosdb-sql-role-assignment-create)
203
+
204
+
Add the appropriate endpoints from Cosmos and OpenAI services to your .env file.
205
+
Note that you can configure the name of the Cosmos database in the configuration. This can be helpful if you wish to separate the data messages generated in local debugging from those associated with the cloud based solution. If you choose to use a different database, you will need to create that database in the Cosmos instance as this is not done automatically.
206
+
207
+
If you are using VSCode, you can use the debug configuration shown in the [local deployment guide](./documentation/LocalDeployment.md).
172
208
173
-
```
174
-
<br></br>
175
209
## Supporting documentation
176
210
177
211
178
212
###
179
213
180
214
### How to customize
181
215
182
-
This solution is designed to be easily customizable. You can modify the front end site, or even build your own front end and attach to the backend API. You can further customize the backend by adding your own agents with their own specific capabilities. Deeper technical information to aid in this customization can be found in this [document](.\documentation\CustomizeSolution.md).
216
+
This solution is designed to be easily customizable. You can modify the front end site, or even build your own front end and attach to the backend API. You can further customize the backend by adding your own agents with their own specific capabilities. Deeper technical information to aid in this customization can be found in this [document](./documentation/CustomizeSolution.md).
0 commit comments