Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ By default this template will use the environment name as the prefix to prevent
| `AZURE_ENV_IMAGETAG` | string | `latest` | Docker image tag used for container deployments. |
| `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. |
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
| `AZURE_ENV_VM_ADMIN_USERNAME` | string | `take(newGuid(), 20)` | The administrator username for the virtual machine. |
| `AZURE_ENV_VM_ADMIN_PASSWORD` | string | `newGuid()` | The administrator password for the virtual machine. |
---

## How to Set a Parameter
Expand Down
56 changes: 41 additions & 15 deletions docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,42 +26,68 @@ Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

This will allow the scripts to run for the current session without permanently changing your system's policy.

### **Azure Developer CLI (azd) Requirement**

Ensure that you are using the latest version of the [Azure Developer CLI](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview).
The `azd` version must be **1.18.0 or higher**.

Upgrade commands by OS:

* **Windows (using winget):**

```bash
winget install microsoft.azd
```

* **Linux (using apt):**

```bash
curl -fsSL https://aka.ms/install-azd.sh | bash
```

* **macOS (using Homebrew):**

```bash
brew update && brew tap azure/azd && brew install azd
```

## Deployment Options & Steps

### Sandbox or WAF Aligned Deployment Options

The [`infra`](../infra) folder of the Multi Agent Solution Accelerator contains the [`main.bicep`](../infra/main.bicep) Bicep script, which defines all Azure infrastructure components for this solution.

When running `azd up`, you’ll now be prompted to choose between a **WAF-aligned configuration** and a **sandbox configuration** using a simple selection:
By default, the `azd up` command uses the [`main.parameters.json`](../infra/main.parameters.json) file to deploy the solution. This file is pre-configured for a **sandbox environment** — ideal for development and proof-of-concept scenarios, with minimal security and cost controls for rapid iteration.

- A **sandbox environment** — ideal for development and proof-of-concept scenarios, with minimal security and cost controls for rapid iteration.
For **production deployments**, the repository also provides [`main.waf.parameters.json`](../infra/main.waf.parameters.json), which applies a [Well-Architected Framework (WAF) aligned](https://learn.microsoft.com/en-us/azure/well-architected/) configuration. This option enables additional Azure best practices for reliability, security, cost optimization, operational excellence, and performance efficiency, such as:

- A **production deployments environment**, which applies a [Well-Architected Framework (WAF) aligned](https://learn.microsoft.com/en-us/azure/well-architected/) configuration. This option enables additional Azure best practices for reliability, security, cost optimization, operational excellence, and performance efficiency, such as:
- Enhanced network security (e.g., Network protection with private endpoints)
- Stricter access controls and managed identities
- Logging, monitoring, and diagnostics enabled by default
- Resource tagging and cost management recommendations

**How to choose your deployment configuration:**

When prompted during `azd up`:
* Use the default `main.parameters.json` file for a **sandbox/dev environment**
* For a **WAF-aligned, production-ready deployment**, copy the contents of `main.waf.parameters.json` into `main.parameters.json` before running `azd up`

---

![useWAFAlignedArchitecture](images/macae_waf_prompt.png)
### VM Credentials Configuration

- Select **`true`** to deploy a **WAF-aligned, production-ready environment**
- Select **`false`** to deploy a **lightweight sandbox/dev environment**
By default, the solution sets the VM administrator username and password from environment variables.
If you do not configure these values, a randomly generated GUID will be used for both the username and password.

To set your own VM credentials before deployment, use:

```sh
azd env set AZURE_ENV_VM_ADMIN_USERNAME <your-username>
azd env set AZURE_ENV_VM_ADMIN_PASSWORD <your-password>
```

> [!TIP]
> Always review and adjust parameter values (such as region, capacity, security settings and log analytics workspace configuration) to match your organization’s requirements before deploying. For production, ensure you have sufficient quota and follow the principle of least privilege for all identities and role assignments.

> To reuse an existing Log Analytics workspace, update the existingWorkspaceResourceId field under the logAnalyticsWorkspaceConfiguration parameter in the .bicep file with the resource ID of your existing workspace.
For example:
```
param logAnalyticsWorkspaceConfiguration = {
dataRetentionInDays: 30
existingWorkspaceResourceId: '/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>'
}
```

> [!IMPORTANT]
> The WAF-aligned configuration is under active development. More Azure Well-Architected recommendations will be added in future updates.
Expand Down
5 changes: 4 additions & 1 deletion infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -709,13 +709,16 @@ module maintenanceConfiguration 'br/public:avm/res/maintenance/maintenance-confi
}

var dataCollectionRulesResourceName = 'dcr-${solutionSuffix}'
var dataCollectionRulesLocation = useExistingLogAnalytics
? existingLogAnalyticsWorkspace!.location
: logAnalyticsWorkspace!.outputs.location
module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-rule:0.6.1' = if (enablePrivateNetworking && enableMonitoring) {
name: take('avm.res.insights.data-collection-rule.${dataCollectionRulesResourceName}', 64)
params: {
name: dataCollectionRulesResourceName
tags: tags
enableTelemetry: enableTelemetry
location: location
location: dataCollectionRulesLocation
dataCollectionRuleProperties: {
kind: 'Windows'
dataSources: {
Expand Down
4 changes: 2 additions & 2 deletions infra/main.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"value": "${AZURE_ENV_MODEL_CAPACITY}"
},
"backendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
"value": "${AZURE_ENV_IMAGE_TAG=latest}"
},
"frontendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
"value": "${AZURE_ENV_IMAGE_TAG=latest}"
},
"enableTelemetry": {
"value": "${AZURE_ENV_ENABLE_TELEMETRY}"
Expand Down
4 changes: 2 additions & 2 deletions infra/main.waf.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"value": "${AZURE_ENV_MODEL_CAPACITY}"
},
"backendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
"value": "${AZURE_ENV_IMAGE_TAG=latest}"
},
"frontendContainerImageTag": {
"value": "${AZURE_ENV_IMAGE_TAG}"
"value": "${AZURE_ENV_IMAGE_TAG=latest}"
},
"enableTelemetry": {
"value": "${AZURE_ENV_ENABLE_TELEMETRY}"
Expand Down
Loading