Skip to content

Commit 21fc8d1

Browse files
update deployment guide and azure.yaml
1 parent 440824b commit 21fc8d1

3 files changed

Lines changed: 46 additions & 95 deletions

File tree

azure.yaml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
22
name: multi-agent-custom-automation-engine-solution-accelerator
3-
# metadata:
4-
# template: multi-agent-custom-automation-engine-solution-accelerator@1.0
3+
metadata:
4+
template: multi-agent-custom-automation-engine-solution-accelerator@1.0
55
requiredVersions:
66
azd: '>= 1.18.0 != 1.23.9'
77
hooks:
8-
postprovision:
9-
windows:
10-
run: |
11-
# Build the backend, frontend and MCP images, push them to the ACR
12-
# provisioned by this deployment and update the Container Apps /
13-
# Web App to use the freshly built images.
14-
#
15-
# Set AZURE_ENV_SKIP_IMAGE_BUILD=true to skip this step.
16-
# Set AZURE_ENV_BUILD_MODE=local to build with local Docker instead
17-
# of the default remote 'az acr build'.
18-
& "$PWD/infra/scripts/Build-And-Push-Images.ps1"
19-
shell: pwsh
20-
interactive: true
21-
continueOnError: false
22-
posix:
23-
run: |
24-
# Build the backend, frontend and MCP images, push them to the ACR
25-
# provisioned by this deployment and update the Container Apps /
26-
# Web App to use the freshly built images.
27-
#
28-
# Set AZURE_ENV_SKIP_IMAGE_BUILD=true to skip this step.
29-
# Set AZURE_ENV_BUILD_MODE=local to build with local Docker instead
30-
# of the default remote 'az acr build'.
31-
bash "$PWD/infra/scripts/build_and_push_images.sh"
32-
shell: sh
33-
interactive: true
34-
continueOnError: false
358
postdeploy:
369
windows:
3710
run: |
@@ -44,6 +17,11 @@ hooks:
4417
Write-Host "===============================================================" -ForegroundColor Yellow
4518
Write-Host ""
4619
20+
Write-Host " Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:" -ForegroundColor White
21+
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
22+
Write-Host " bash infra/scripts/build_and_push_images.sh" -ForegroundColor Cyan
23+
Write-Host ""
24+
4725
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
4826
Write-Host " 👉 Run the following command in Bash:" -ForegroundColor White
4927
Write-Host " bash infra/scripts/selecting_team_config_and_data.sh" -ForegroundColor Cyan
@@ -60,6 +38,11 @@ hooks:
6038
Write-Host "===============================================================" -ForegroundColor Yellow
6139
Write-Host ""
6240
41+
Write-Host " Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:" -ForegroundColor White
42+
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
43+
Write-Host " infra\scripts\Build-And-Push-Images.ps1" -ForegroundColor Cyan
44+
Write-Host ""
45+
6346
Write-Host " Upload Team Configurations and index sample data" -ForegroundColor White
6447
Write-Host " 👉 Run the following command in PowerShell:" -ForegroundColor White
6548
Write-Host " infra\scripts\Selecting-Team-Config-And-Data.ps1" -ForegroundColor Cyan
@@ -85,6 +68,10 @@ hooks:
8568
printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n"
8669
printf "${Yellow}===============================================================${NC}\n\n"
8770
71+
printf "Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them:\n"
72+
printf " 👉 Run the following command in Bash:\n"
73+
printf " ${Blue}bash infra/scripts/build_and_push_images.sh${NC}\n\n"
74+
8875
printf "Upload Team Configurations and index sample data:\n"
8976
printf " 👉 Run the following command in Bash:\n"
9077
printf " ${Blue}bash infra/scripts/selecting_team_config_and_data.sh${NC}\n\n"
@@ -93,4 +80,4 @@ hooks:
9380
printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname"
9481
9582
shell: sh
96-
interactive: true
83+
interactive: true

docs/DeploymentGuide.md

Lines changed: 29 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -322,66 +322,8 @@ azd up
322322

323323
**Expected Duration:** 9-10 minutes for default configuration
324324

325-
> **Note — Automatic container image build & push:** After the Bicep templates finish provisioning, `azd` runs an automatic **postprovision** hook that:
326-
>
327-
> 1. Builds the `backend`, `frontend` and `mcp` container images from `src/backend`, `src/App` and `src/mcp_server`.
328-
> 2. Pushes them to the Azure Container Registry (ACR) that was just provisioned in your resource group.
329-
> 3. Updates the two Container Apps and the frontend Web App to run the freshly pushed images.
330-
>
331-
> Add another 4-8 minutes for this step. See [Container image build behavior](#42a-container-image-build-behavior-optional) below to change how the images are built or to skip the step.
332325

333-
### 4.2.a Container image build behavior (optional)
334-
335-
The postprovision hook is driven by environment variables you can set on the `azd` environment **before** running `azd up`.
336-
337-
| `azd env set` key | Values | Default | Purpose |
338-
|-------------------|--------|---------|---------|
339-
| `AZURE_ENV_BUILD_MODE` | `remote` \| `local` | `remote` | `remote` builds each image with `az acr build` (an ACR Task — no local Docker required). `local` runs `docker build` + `docker push` from your machine. |
340-
| `AZURE_ENV_IMAGE_TAG` | any tag | `latest` | Tag applied to every image pushed to the ACR. |
341-
| `AZURE_ENV_SKIP_IMAGE_BUILD` | `true` \| unset | unset | When `true`, the postprovision hook is skipped entirely. Use this if you plan to push images yourself. |
342-
343-
**Examples**
344-
345-
```shell
346-
# Default: remote ACR build, tag "latest" (no local Docker needed)
347-
azd up
348-
349-
# Local Docker build with a custom tag
350-
azd env set AZURE_ENV_BUILD_MODE local
351-
azd env set AZURE_ENV_IMAGE_TAG dev
352-
azd up
353-
354-
# Skip the automatic build step (I'll push my own images later)
355-
azd env set AZURE_ENV_SKIP_IMAGE_BUILD true
356-
azd up
357-
```
358-
359-
**Prerequisites**
360-
361-
- `remote` mode requires only the Azure CLI (`az`) that comes with the deployment environments listed in Step 2.
362-
- `local` mode additionally requires [Docker Desktop](https://www.docker.com/products/docker-desktop/) to be running on the machine where `azd up` is executed.
363-
364-
**Running the script manually**
365-
366-
You can also invoke the same script directly, for example after a code change:
367-
368-
```powershell
369-
# PowerShell (Windows)
370-
infra\scripts\Build-And-Push-Images.ps1 # remote build, tag "latest"
371-
infra\scripts\Build-And-Push-Images.ps1 -BuildMode local # local Docker build
372-
infra\scripts\Build-And-Push-Images.ps1 -ImageTag v1.2.0 # custom tag
373-
```
374-
375-
```bash
376-
# Bash (Linux / macOS / WSL)
377-
bash infra/scripts/build_and_push_images.sh # remote build, tag "latest"
378-
AZURE_ENV_BUILD_MODE=local bash infra/scripts/build_and_push_images.sh
379-
AZURE_ENV_IMAGE_TAG=v1.2.0 bash infra/scripts/build_and_push_images.sh
380-
```
381-
382-
The script reads the ACR name, resource group and target Container App / Web App names from the current `azd` environment (`azd env get-values`), so it must be run from the project root after a successful `azd provision` / `azd up`.
383-
384-
- **Upon successful completion**, you will see a success message indicating that all resources have been deployed, along with the application URL and next steps for uploading team configurations and sample data.
326+
- **Upon successful completion**, you will see a success message indicating that all resources have been deployed, along with the application URL and next steps for Build and push the backend/frontend/mcp_server container images to ACR, then point the container app and webapp at them and uploading team configurations and sample data.
385327

386328
![Deployment Success message](./images/Deployment_success_message.png)
387329

@@ -399,9 +341,27 @@ After successful deployment:
399341

400342
## Step 5: Post-Deployment Configuration
401343

402-
### 5.1 Run Post Deployment Script
344+
When `azd up` finishes, the `postdeploy` hook (defined in `azure.yaml`) prints the exact commands to run next. Complete the following steps, in order, from the project root before accessing the application.
345+
346+
### 5.1 Build and Push Container Images
347+
348+
Build and push the backend, frontend, and mcp_server container images to ACR, then point the Container App and Web App at them. Run the command for your shell:
349+
350+
- **For Bash (Linux/macOS/WSL):**
351+
```bash
352+
bash infra/scripts/build_and_push_images.sh
353+
```
354+
355+
- **For PowerShell (Windows):**
356+
```powershell
357+
infra\scripts\Build-And-Push-Images.ps1
358+
```
403359

404-
1. You can upload Team Configurations using command printed in the terminal. The command will look like one of the following. Run the appropriate command for your shell from the project root:
360+
The script reads the ACR name, resource group and target Container App / Web App names from the current `azd` environment, so it must be run from the project root after a successful `azd up`. See [Step 4.2](#step-4-deploy-application) for build options (`remote` vs `local` mode and custom image tags).
361+
362+
### 5.2 Upload Team Configurations and Index Sample Data
363+
364+
1. Upload Team Configurations and index the sample data using the command printed in the terminal. Run the appropriate command for your shell from the project root:
405365

406366
- **For Bash (Linux/macOS/WSL):**
407367
```bash
@@ -418,25 +378,29 @@ After successful deployment:
418378

419379
![Usecase selection](./images/Usecase_selection.png)
420380

381+
### 5.3 Access the Application
382+
383+
Once both scripts complete, access your deployed frontend application at the URL printed by the `postdeploy` hook (`https://<webSiteDefaultHostname>`), or retrieve it from the Azure Portal as described in [Step 4.3](#43-get-application-url).
384+
421385

422-
### 5.2 Configure Authentication (Optional)
386+
### 5.4 Configure Authentication (Optional)
423387

424388
1. Follow [App Authentication Configuration](./azure_app_service_auth_setup.md)
425389
2. Wait up to 10 minutes for authentication changes to take effect
426390

427-
### 5.3 Verify Deployment
391+
### 5.5 Verify Deployment
428392

429393
1. Access your application using the URL from Step 4.3
430394
2. Confirm the application loads successfully
431395
<!-- 3. Verify you can sign in with your authenticated account -->
432396

433-
### 5.4 Test the Application
397+
### 5.6 Test the Application
434398

435399
**Quick Test Steps:**
436400

437401
1. **Access the application** using the URL from Step 4.3
438402
2. **Sign in** with your authenticated account
439-
3. **Select a use case** from the available scenarios you uploaded in Step 5.1
403+
3. **Select a use case** from the available scenarios you uploaded in Step 5.2
440404
4. **Ask a sample question** relevant to the selected use case
441405
5. **Verify the response** includes appropriate multi-agent collaboration
442406
6. **Check the logs** in Azure Portal to confirm backend processing
-2.9 KB
Loading

0 commit comments

Comments
 (0)