|
| 1 | +# Deployment Guide |
| 2 | + |
| 3 | +## Deployment Options |
| 4 | + |
| 5 | +### Sandbox or WAF Aligned Deployment Options |
| 6 | + |
| 7 | +The [`infra`](../infra) folder of the Build-your-own-copilot-Solution-Accelerator contains the [`main.bicep`](../infra/main.bicep) Bicep script, which defines all Azure infrastructure components for this solution. |
| 8 | + |
| 9 | +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. |
| 10 | + |
| 11 | +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: |
| 12 | + |
| 13 | + - Enhanced network security (e.g., Network protection with private endpoints) |
| 14 | + - Stricter access controls and managed identities |
| 15 | + - Logging, monitoring, and diagnostics enabled by default |
| 16 | + - Resource tagging and cost management recommendations |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +**How to choose your deployment configuration:** |
| 21 | + |
| 22 | +* Use the default `main.parameters.json` file for a **sandbox/dev environment** |
| 23 | +* For a **WAF-aligned, production-ready deployment**, copy the contents of `main.waf.parameters.json` into `main.parameters.json` before running `azd up` |
| 24 | + |
| 25 | +### VM Credentials Configuration |
| 26 | + |
| 27 | +By default, the solution sets the VM administrator username and password from environment variables. |
| 28 | + |
| 29 | +To set your own VM credentials before deployment, use: |
| 30 | + |
| 31 | +```sh |
| 32 | +azd env set AZURE_ENV_VM_ADMIN_USERNAME <your-username> |
| 33 | +azd env set AZURE_ENV_VM_ADMIN_PASSWORD <your-password> |
| 34 | +``` |
| 35 | + |
| 36 | +> [!TIP] |
| 37 | +> 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. |
| 38 | +
|
| 39 | + |
| 40 | +> [!IMPORTANT] |
| 41 | +> The WAF-aligned configuration is under active development. More Azure Well-Architected recommendations will be added in future updates. |
| 42 | +
|
| 43 | +--- |
| 44 | + |
| 45 | +### Deploying with AZD |
| 46 | + |
| 47 | +Once you've opened the project in locally, you can deploy it to Azure by following these steps: |
| 48 | + |
| 49 | +1. Login to Azure: |
| 50 | + |
| 51 | + ```shell |
| 52 | + azd auth login |
| 53 | + ``` |
| 54 | + |
| 55 | + #### To authenticate with Azure Developer CLI (`azd`), use the following command with your **Tenant ID**: |
| 56 | + |
| 57 | + ```sh |
| 58 | + azd auth login --tenant-id <tenant-id> |
| 59 | + ``` |
| 60 | + |
| 61 | +2. Provision and deploy all the resources: |
| 62 | + |
| 63 | + ```shell |
| 64 | + azd up |
| 65 | + ``` |
| 66 | + |
| 67 | +3. Provide an `azd` environment name (e.g., "resass"). |
| 68 | +4. Select a subscription from your Azure account and choose a location that has quota for all the resources. |
| 69 | + -- This deployment will take *15-20 minutes* to provision the resources in your account and set up the solution with sample data. |
| 70 | + - If you encounter an error or timeout during deployment, changing the location may help, as there could be availability constraints for the resources. |
| 71 | + |
| 72 | +5. When Deployment is complete, follow steps in [AI Foundry Deployment guide](./AIFoundryDeployment.md) to configure the grant draft proposal endpoint. |
| 73 | + |
| 74 | +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`. |
| 75 | + |
| 76 | +6. If you are done trying out the application, you can delete the resources by running `azd down`. |
| 77 | + |
| 78 | +--- |
0 commit comments