Skip to content

Commit ff681af

Browse files
Merge pull request #665 from microsoft/dev
feat: WAF Implementation for Client Advisor
2 parents 064a340 + 185a83a commit ff681af

35 files changed

+60665
-4280
lines changed

.github/workflows/CAdeploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ jobs:
127127
id: determine_tag
128128
run: |
129129
BRANCH=${{ github.ref_name }}
130-
if [[ "$BRANCH" == "main" ]]; then TAG="latest"
130+
if [[ "$BRANCH" == "main" ]]; then TAG="latest_waf"
131131
elif [[ "$BRANCH" == "dev" ]]; then TAG="dev"
132132
elif [[ "$BRANCH" == "demo" ]]; then TAG="demo"
133-
else TAG="latest"; fi
133+
else TAG="latest_waf"; fi
134134
echo "IMAGE_TAG=$TAG" >> $GITHUB_ENV
135135
echo "Image Tag: $TAG"
136136
- name: Deploy and extract values from deployment output
@@ -144,7 +144,7 @@ jobs:
144144
DEPLOY_OUTPUT=$(az deployment group create \
145145
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
146146
--template-file infra/main.bicep \
147-
--parameters aiDeploymentsLocation=${{ env.AZURE_LOCATION }} solutionName=${{ env.SOLUTION_PREFIX }} cosmosLocation=westus gptDeploymentCapacity=${{ env.GPT_MIN_CAPACITY }} embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} imageTag=${{ env.IMAGE_TAG }} createdBy="Pipeline" \
147+
--parameters location=${{ env.AZURE_LOCATION }} azureAiServiceLocation=${{ env.AZURE_LOCATION }} solutionName=${{ env.SOLUTION_PREFIX }} cosmosLocation=westus gptModelCapacity=${{ env.GPT_MIN_CAPACITY }} embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} containerImageTag=${{ env.IMAGE_TAG }} createdBy="Pipeline" \
148148
--query "properties.outputs" -o json)
149149
150150
echo "Deployment output: $DEPLOY_OUTPUT"

.github/workflows/build-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
id: determine_tag
5353
run: |
5454
if [[ "${{ github.ref_name }}" == "main" ]]; then
55-
echo "tagname=latest" >> $GITHUB_OUTPUT
55+
echo "tagname=latest_waf" >> $GITHUB_OUTPUT
5656
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
5757
echo "tagname=dev" >> $GITHUB_OUTPUT
5858
elif [[ "${{ github.ref_name }}" == "demo" ]]; then

docs/CustomizingAzdParameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ By default this template will use the environment name as the prefix to prevent
1717
| `AZURE_ENV_MODEL_CAPACITY` | integer | `30` | Set the model capacity for GPT deployment. Choose based on your Azure quota and usage needs. |
1818
| `AZURE_ENV_EMBEDDING_MODEL_NAME` | string | `text-embedding-ada-002` | Set the model name used for embeddings. |
1919
| `AZURE_ENV_EMBEDDING_MODEL_CAPACITY` | integer | `80` | Set the capacity for embedding model deployment. |
20-
| `AZURE_ENV_IMAGETAG` | string | `latest` | Set the image tag (allowed values: `latest`, `dev`, `hotfix`). |
20+
| `AZURE_ENV_IMAGETAG` | string | `latest_waf` | Set the image tag (allowed values: `latest_waf`, `dev`, `hotfix`). |
2121
| `AZURE_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for resource deployment. |
2222
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Reuses an existing Log Analytics Workspace instead of provisioning a new one. |
2323
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | `<Existing AI Foundry Project Resource Id>` | Reuses an existing AI Foundry Project Resource Id instead of provisioning a new one. |

docs/DeploymentGuide.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,53 @@ Check the [Azure Products by Region](https://azure.microsoft.com/en-us/explore/g
1414

1515
Here are some example regions where the services are available: East US, East US2, Australia East, UK South, France Central.
1616

17-
18-
### **Important: Check Azure OpenAI Quota Availability**
19-
20-
⚠️ To ensure sufficient quota is available in your subscription, please follow [quota check instructions guide](./QuotaCheck.md) before you deploy the solution.
21-
22-
2317
### [Optional] Quota Recommendations
2418
By default, the **Gpt-4o-mini model capacity** in deployment is set to **30k tokens**, so we recommend updating the following:
2519

2620
> **For Global Standard | GPT-4o-mini - increase the capacity to at least 150k tokens post-deployment for optimal performance.**
2721
2822
Depending on your subscription quota and capacity, you can [adjust quota settings](AzureGPTQuotaSettings.md) to better meet your specific needs. You can also [adjust the deployment parameters](CustomizingAzdParameters.md) for additional optimization.
2923
­
24+
## Deployment Options
25+
26+
### Sandbox or WAF Aligned Deployment Options
27+
28+
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.
29+
30+
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.
31+
32+
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:
33+
34+
- Enhanced network security (e.g., Network protection with private endpoints)
35+
- Stricter access controls and managed identities
36+
- Logging, monitoring, and diagnostics enabled by default
37+
- Resource tagging and cost management recommendations
38+
39+
**How to choose your deployment configuration:**
40+
41+
* Use the default `main.parameters.json` file for a **sandbox/dev environment**
42+
* For a **WAF-aligned, production-ready deployment**, copy the contents of `main.waf.parameters.json` into `main.parameters.json` before running `azd up`
43+
44+
---
45+
46+
### VM Credentials Configuration
47+
48+
By default, the solution sets the VM administrator username and password from environment variables.
49+
50+
To set your own VM credentials before deployment, use:
51+
52+
```sh
53+
azd env set AZURE_ENV_VM_ADMIN_USERNAME <your-username>
54+
azd env set AZURE_ENV_VM_ADMIN_PASSWORD <your-password>
55+
```
56+
57+
> [!TIP]
58+
> 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.
59+
60+
61+
> [!IMPORTANT]
62+
> The WAF-aligned configuration is under active development. More Azure Well-Architected recommendations will be added in future updates.
63+
3064
## Deployment Options & Steps
3165

3266
Pick from the options below to see step-by-step instructions for GitHub Codespaces, VS Code Dev Containers, and Local Environments.
@@ -114,7 +148,7 @@ When you start the deployment, most parameters will have **default values**, but
114148
| **GPT Model Deployment Capacity** | Configure capacity for **GPT models**. Choose based on Azure OpenAI quota. | `30` |
115149
| **Embedding Model** | OpenAI embedding model used for vector similarity. | `text-embedding-ada-002` |
116150
| **Embedding Model Capacity** | Set the capacity for **embedding models**. Choose based on usage and quota. | `80` |
117-
| **Image Tag** | The version of the Docker image to use (e.g., `latest`, `dev`, `hotfix`). | `latest` |
151+
| **Image Tag** | The version of the Docker image to use (e.g., `latest_waf`, `dev`, `hotfix`). | `latest_waf` |
118152
| **Azure OpenAI API Version** | Set the API version for OpenAI model deployments. | `2025-04-01-preview` |
119153
| **AZURE_LOCATION** | Sets the Azure region for resource deployment. | `<User selects during deployment>` |
120154
| **Existing Log Analytics Workspace** | To reuse an existing Log Analytics Workspace ID instead of creating a new one. | *(empty)* |

0 commit comments

Comments
 (0)