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
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 and resources**. Follow the steps in [Azure Account Set Up](./docs/AzureAccountSetUp.md)
82
+
83
+
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:
➡️ To ensure sufficient quota is available in your subscription, please follow **[Quota check instructions guide](./documentation/quota_check.md)** before you deploy the solution.
|[](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator)|[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator)|
98
+
|---|---|
77
99
78
-
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FMulti-Agent-Custom-Automation-Engine-Solution-Accelerator%2Frefs%2Fheads%2Fmain%2Fdeploy%2Fmacae-continer-oc.json)
100
+
101
+
<!-- [](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2FMulti-Agent-Custom-Automation-Engine-Solution-Accelerator%2Frefs%2Fheads%2Fmain%2Fdeploy%2Fmacae-continer-oc.json) -->
79
102
80
103
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
104
82
-
## Local Deployment
83
-
To run the solution site and API backend only locally for development and debugging purposes, See the [local deployment guide](./documentation/LocalDeployment.md).
105
+
### Configurable Deployment Settings
84
106
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.
107
+
When you start the deployment, most parameters will have **default values**, but you can update the below settings by following the steps [here](./docs/CustomizingAzdParameters.md):
87
108
88
-
### Prerequisites
109
+
|**Setting**|**Description**|**Default value**|
110
+
|------------|----------------| ------------|
111
+
|**Environment Name**| A **3-20 character alphanumeric value** used to generate a unique ID to prefix the resources. | byctemplate |
112
+
|**Secondary Location**| A **less busy** region for **CosmosDB**, useful in case of availability constraints. | eastus2 |
113
+
|**Deployment Type**| Select from a drop-down list. | Global Standard |
114
+
|**GPT Model**| Choose from **gpt-4, gpt-4o**| gpt-4o |
115
+
|**GPT Model Deployment Capacity**| Configure capacity for **GPT models**. | 30k |
89
116
90
-
- Current Azure CLI installed
91
-
You can update to the latest version using ```az upgrade```
92
-
- Azure account with appropriate permissions
93
-
- Docker installed
94
117
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:
118
+
### [Optional] Quota Recommendations
119
+
By default, the **Gpt-4o model capacity** in deployment is set to **30k tokens**, so we recommend
120
+
> **For Global Standard | GPT-4o - the capacity to at least 150k tokens post-deployment for optimal performance.**
97
121
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
-
```
122
+
> **For Standard | GPT-4 - ensure a minimum of 30k–40k tokens for best results.**
110
123
111
-
Note: if you are using windows with PowerShell, the continuation character (currently ‘\’) should change to the tick mark (‘`’).
124
+
To adjust quota settings, follow these [steps](./documentation/AzureGPTQuotaSettings.md)
112
125
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.
126
+
### Deployment Options
127
+
Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.
114
128
115
-
### Create the Containers
116
-
#### Get admin credentials from ACR
129
+
<details>
130
+
<summary><b>Deploy in GitHub Codespaces</b></summary>
117
131
118
-
Retrieve the admin credentials for your Azure Container Registry (ACR):
132
+
### GitHub Codespaces
119
133
120
-
```sh
121
-
az acr credential show \
122
-
--name <e.g. macaeacr2t62qyozi76bs> \
123
-
--resource-group <rg-name>
124
-
```
134
+
You can run this solution using GitHub Codespaces. The button will open a web-based VS Code instance in your browser:
125
135
126
-
#### Login to ACR
136
+
1. Open the solution accelerator (this may take several minutes):
127
137
128
-
Login to your Azure Container Registry:
138
+
[](https://codespaces.new/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator)
139
+
2. Accept the default values on the create Codespaces page
140
+
3. Open a terminal window if it is not already open
141
+
4. Continue with the [deploying steps](#deploying)
129
142
130
-
```sh
131
-
az acr login --name <e.g. macaeacr2t62qyozi76bs>
132
-
```
143
+
</details>
133
144
134
-
#### Build and push the image
145
+
<details>
146
+
<summary><b>Deploy in VS Code</b></summary>
135
147
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:
148
+
### VS Code Dev Containers
137
149
138
-
```sh
139
-
az acr build \
140
-
--registry <e.g. macaeacr2t62qyozi76bs> \
141
-
--resource-group <rg-name> \
142
-
--image <e.g. backendmacae:latest>.
143
-
```
150
+
You can run this solution in VS Code Dev 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):
144
151
145
-
### Add images to the Container APP and Web App services
152
+
1. Start Docker Desktop (install it if not already installed)
153
+
2. Open the project:
146
154
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):
155
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator)
156
156
157
-
name: 'COSMOSDB_ENDPOINT'
158
-
value: \<Cosmos endpoint>
157
+
3. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window.
158
+
4. Continue with the [deploying steps](#deploying)
159
159
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'
160
+
</details>
166
161
167
-
name: 'AZURE_OPENAI_ENDPOINT'
168
-
value: <Azure OpenAI endpoint>
162
+
<details>
163
+
<summary><b>Deploy in your local environment</b></summary>
169
164
170
-
name: 'AZURE_OPENAI_DEPLOYMENT_NAME'
171
-
value: 'gpt-4o'
165
+
### Local environment
172
166
173
-
name: 'AZURE_OPENAI_API_VERSION'
174
-
value: '2024-08-01-preview'
175
-
Note: Version should be updated based on latest available
167
+
To run the solution site and API backend only locally for development and debugging purposes, See the [local deployment guide](./documentation/LocalDeployment.md).
168
+
169
+
</details>
170
+
171
+
### Manual Azure Deployment
172
+
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. See the [local deployment guide](./documentation/ManualAzureDeployment.md).
173
+
174
+
175
+
### Deploying
176
+
177
+
Once you've opened the project in [Codespaces](#github-codespaces) or in [Dev Containers](#vs-code-dev-containers) or [locally](#local-environment), you can deploy it to Azure following the following steps.
178
+
179
+
To change the azd parameters from the default values, follow the steps [here](./documentation/CustomizingAzdParameters.md).
180
+
181
+
182
+
1. Login to Azure:
176
183
177
-
name: 'FRONTEND_SITE_NAME'
178
-
value: 'https://<website Name>.azurewebsites.net'
184
+
```shell
185
+
azd auth login
186
+
```
179
187
180
-
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
181
-
value: <Application Insights Connection String>
188
+
#### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**:
182
189
183
-
- Click 'Save' and deploy your new revision
190
+
```sh
191
+
azd auth login --tenant-id <tenant-id>
192
+
```
184
193
185
-
To add the new container to your website run the following:
194
+
2. Provision and deploy all the resources:
186
195
187
-
```
188
-
az webapp config container set --resource-group <resource_group_name> \
3. Provide an `azd` environment name (like "macaeapp")
201
+
4. Select a subscription from your Azure account, and selecta location which has quota for all the resources.
202
+
* This deployment will take *7-10 minutes* to provision the resources in your account and set up the solution with sample data.
203
+
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.
204
+
5. 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`.
194
205
195
-
### Add the Entra identity provider to the Azure Web App
196
-
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)
206
+
6. You can now delete the resources by running `azd down`, if you are done trying out the application.
207
+
<!-- 6. You can now proceed to run the [development server](#development-server) to test the app locally, or if you are done trying out the app, you can delete the resources by running `azd down`. -->
208
+
209
+
<h2>
210
+
Additional Steps
211
+
</h2>
212
+
213
+
1. **Add App Authentication**
214
+
215
+
Follow steps in [App Authentication](./documentation/azure_app_service_auth_setup.md) to configure authenitcation in app service.
216
+
217
+
Note: Authentication changes can take up to 10 minutes
218
+
219
+
2. **Deleting Resources After a Failed Deployment**
220
+
221
+
Follow steps in [Delete Resource Group](./documentation/DeleteResourceGroup.md) If your deployment fails and you need to clean up the resources.
197
222
198
223
### Run locally and debug
199
224
@@ -209,10 +234,11 @@ Note that you can configure the name of the Cosmos database in the configuration
209
234
210
235
If you are using VSCode, you can use the debug configuration shown in the [local deployment guide](./documentation/LocalDeployment.md).
211
236
212
-
## Supporting documentation
237
+
## Sample Questions
213
238
239
+
To help you get started, here are some [Sample Questions](./documentation/SampleQuestions.md) you can follow once your application is up and running.
0 commit comments