Skip to content

Commit 80e704d

Browse files
refactor: added post-deployment guide and updated post deployment scripts for users deployed using AVM template (#550)
* updated post deployment scripts for avm deployment * fix update function call typo * refactor: improve extraction of deployment outputs in team_config_and_data.sh * add AVM Post Deployment Guide * update AVM Post Deployment Guide
1 parent 015d2ef commit 80e704d

10 files changed

+498
-63
lines changed

docs/AVMPostDeploymentGuide.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# AVM Post Deployment Guide
2+
3+
> **📋 Note**: This guide is specifically for post-deployment steps after using the AVM template. For complete deployment from scratch, see the main [Deployment Guide](./DeploymentGuide.md).
4+
5+
---
6+
7+
This document provides guidance on post-deployment steps after deploying the Multi-Agent Custom Automation Engine Solution Accelerator from the [AVM (Azure Verified Modules) repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/multi-agent-custom-automation-engine).
8+
9+
## Overview
10+
11+
After deploying the infrastructure using AVM, you'll need to complete the application layer setup, which includes:
12+
- Configuring team agent configurations
13+
- Processing and uploading sample datasets
14+
- Setting up Azure AI Search indexes
15+
- Configuring blob storage containers
16+
- Setting up application authentication
17+
18+
## Prerequisites
19+
20+
Before starting the post-deployment process, ensure you have the following:
21+
22+
### Required Software
23+
24+
1. **[PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7.4)** <small>(v7.0+ recommended)</small> - Available for Windows, macOS, and Linux
25+
26+
2. **[Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli)** <small>(v2.50+)</small> - Command-line tool for managing Azure resources
27+
28+
3. **[Python](https://www.python.org/downloads/)** <small>(v3.9+ recommended)</small> - Required for data processing scripts
29+
30+
4. **[Git](https://git-scm.com/downloads/)** - Version control system for cloning the repository
31+
32+
### Azure Requirements
33+
34+
5. **Azure Access** - One of the following roles on the subscription or resource group:
35+
- `Contributor`
36+
- `Owner`
37+
38+
6. **Deployed Infrastructure** - A successful Multi-Agent Custom Automation Engine deployment from the [AVM repository](https://github.com/Azure/bicep-registry-modules/tree/main/avm/ptn/sa/multi-agent-custom-automation-engine)
39+
40+
#### **Important Note for PowerShell Users**
41+
42+
If you encounter issues running PowerShell scripts due to execution policy restrictions, you can temporarily adjust the `ExecutionPolicy` by running the following command in an elevated PowerShell session:
43+
44+
```powershell
45+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
46+
```
47+
48+
This will allow the scripts to run for the current session without permanently changing your system's policy.
49+
50+
## Post-Deployment Steps
51+
52+
### Step 1: Clone the Repository
53+
54+
First, clone this repository to access the post-deployment scripts:
55+
56+
```powershell
57+
git clone https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator.git
58+
```
59+
```powershell
60+
cd Multi-Agent-Custom-Automation-Engine-Solution-Accelerator
61+
```
62+
63+
### Step 2: Run the Post-Deployment Script
64+
65+
The post-deployment process is automated through a single PowerShell or Bash script that completes the following tasks in approximately 5-10 minutes:
66+
67+
#### What the Script Does:
68+
1. **Configure Team Agent Settings** - Upload HR, Marketing, and Retail team configurations
69+
2. **Process Sample Datasets** - Upload and index sample customer data, analytics, and business metrics
70+
3. **Set Up Azure AI Search** - Create and configure search indexes for agent data retrieval
71+
4. **Configure Blob Storage** - Set up containers for document and data storage
72+
73+
#### Execute the Script:
74+
75+
1. **Choose the appropriate command based on your deployment method and OS:**
76+
77+
**If you deployed using custom templates, ARM/Bicep deployments, or `az deployment group` commands:**
78+
79+
- **For PowerShell (Windows/Linux/macOS):**
80+
```powershell
81+
.\infra\scripts\Team-Config-And-Data.ps1 -ResourceGroup "<your-resource-group-name>"
82+
```
83+
84+
- **For Bash (Linux/macOS/WSL):**
85+
```bash
86+
bash infra/scripts/team_config_and_data.sh "<your-resource-group-name>"
87+
```
88+
89+
**If you deployed using `azd up` command:**
90+
91+
- **For PowerShell (Windows/Linux/macOS):**
92+
```powershell
93+
.\infra\scripts\Team-Config-And-Data.ps1
94+
```
95+
96+
- **For Bash (Linux/macOS/WSL):**
97+
```bash
98+
bash infra/scripts/team_config_and_data.sh
99+
```
100+
101+
> **Note**: Replace `<your-resource-group-name>` with the actual name of the resource group containing your deployed Azure resources.
102+
103+
> **💡 Tip**: Since this guide is for AVM deployments, you'll most likely use the first command with the `-ResourceGroup` parameter.
104+
105+
### Step 3: Provide Required Information
106+
107+
During script execution, you'll be prompted for:
108+
109+
- You'll be prompted to authenticate with Azure if not already logged in
110+
- Select the appropriate Azure subscription
111+
112+
#### Resource Validation
113+
- The script will automatically detect and validate your deployed Azure resources
114+
- Confirmation prompts will appear before making configuration changes
115+
116+
### Step 4: Post Deployment Script Completion
117+
118+
Upon successful completion, you'll see a success message.
119+
120+
**🎉 Congratulations!** Your post-deployment configuration is complete.
121+
122+
### Step 5: Set Up App Authentication (Optional)
123+
124+
Follow the steps in [Set Up Authentication in Azure App Service](azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service.

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
235235
TemplateName: 'MACAE'
236236
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
237237
CreatedBy: createdBy
238+
DeploymentName: deployment().name
238239
}
239240
}
240241
}

infra/main_custom.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
234234
TemplateName: 'MACAE'
235235
Type: enablePrivateNetworking ? 'WAF' : 'Non-WAF'
236236
CreatedBy: createdBy
237+
DeploymentName: deployment().name
237238
}
238239
}
239240
}

infra/scripts/Process-Sample-Data.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ param(
55
[string]$BlobContainer,
66
[string]$AiSearch,
77
[string]$AiSearchIndex,
8-
[string]$ResourceGroup
8+
[string]$ResourceGroup,
9+
[string]$AzSubscriptionId
910
)
1011

1112
# Get parameters from azd env, if not provided
@@ -29,7 +30,9 @@ if (-not $ResourceGroup) {
2930
$ResourceGroup = $(azd env get-value AZURE_RESOURCE_GROUP)
3031
}
3132

32-
$AzSubscriptionId = $(azd env get-value AZURE_SUBSCRIPTION_ID)
33+
if (-not $AzSubscriptionId) {
34+
$AzSubscriptionId = $(azd env get-value AZURE_SUBSCRIPTION_ID)
35+
}
3336

3437
# Check if all required arguments are provided
3538
if (-not $StorageAccount -or -not $BlobContainer -or -not $AiSearch) {

0 commit comments

Comments
 (0)