Skip to content

Commit 40b870a

Browse files
Merge pull request #150 from microsoft/dev
feat: Merge the AVM WAF and Azd Quota check changes from dev to main
2 parents 240561c + bec8978 commit 40b870a

31 files changed

+3058
-8531
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
--template-file infra/main.bicep \
9696
--parameters \
9797
Prefix="${{ env.SOLUTION_PREFIX }}" \
98-
AzureAiServiceLocation="eastus" \
98+
aiDeploymentsLocation="eastus" \
9999
capacity=${{ env.GPT_MIN_CAPACITY }} \
100100
imageVersion="${IMAGE_TAG}"\
101101
--debug

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Modernize your code solution accelerator allows users to specify a group of
88
<br/>
99

1010
<div align="center">
11-
11+
1212
[**SOLUTION OVERVIEW**](#solution-overview) \| [**QUICK DEPLOY**](#quick-deploy) \| [**BUSINESS SCENARIO**](#business-scenario) \| [**SUPPORTING DOCUMENTATION**](#supporting-documentation)
1313

1414
</div>
@@ -24,7 +24,10 @@ The solution leverages Azure AI Foundry, Azure OpenAI Service, Azure Container A
2424
|![image](./docs/images/read_me/solArchitecture.png)|
2525
|---|
2626

27+
This architecture will be deployed with the 'sandbox' setting of our deployment process. Optionally you can deploy [Well-Architected Framework (WAF) aligned](https://learn.microsoft.com/en-us/azure/well-architected/) architecture, described in [WAF-Aligned Solution Architecture](./docs/ArchitectureWAF.md), with the WAF-Aligned deployment option described in [Deployment Guide](./docs/DeploymentGuide.md).
28+
2729
### Agentic architecture
30+
2831
|![image](./docs/images/read_me/agentArchitecture.png)|
2932
|---|
3033

@@ -51,16 +54,16 @@ If you'd like to customize the solution accelerator, here are some common areas
5154
<summary>Click to learn more about the key features this solution enables</summary>
5255

5356
- **Code language modernization** <br/>
54-
Modernizing outdated code ensures compatibility with current technologies, reduces reliance on legacy expertise, and keeps businesses competitive.
57+
Modernizing outdated code ensures compatibility with current technologies, reduces reliance on legacy expertise, and keeps businesses competitive.
5558

5659
- **Summary and review of new code** <br/>
57-
Generating summaries and translating code files keeps humans in the loop, enhances their understanding, and facilitates timely interventions, ensuring the files are ready to export.
60+
Generating summaries and translating code files keeps humans in the loop, enhances their understanding, and facilitates timely interventions, ensuring the files are ready to export.
5861

5962
- **Business logic analysis** <br/>
60-
Leveraging AI to decipher business logic from legacy code helps minimizes the risk of human error.
63+
Leveraging AI to decipher business logic from legacy code helps minimizes the risk of human error.
6164

6265
- **Efficient code transformation** <br/>
63-
Streamlining the process of analyzing, converting, and iterative error testing reduces time and effort required to modernize the systems.
66+
Streamlining the process of analyzing, converting, and iterative error testing reduces time and effort required to modernize the systems.
6467

6568
</details>
6669

@@ -77,7 +80,7 @@ Follow the quick deploy steps on the deployment guide to deploy this solution to
7780

7881
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) |
7982
|---|---|
80-
83+
8184
<br/>
8285

8386
> ⚠️ **Important: Check Azure OpenAI Quota Availability**
@@ -141,19 +144,19 @@ The sample data used in this repository is synthetic and generated using Azure O
141144
<summary>Click to learn more about what value this solution provides</summary>
142145

143146
- **Accelerated Migration** <br/>
144-
Automate the translation of SQL queries, significantly reducing migration time and effort.
147+
Automate the translation of SQL queries, significantly reducing migration time and effort.
145148

146149
- **Error Reduction** <br/>
147-
Multi-agent validation ensures accurate translations and maintains data integrity.
150+
Multi-agent validation ensures accurate translations and maintains data integrity.
148151

149152
- **Knowledge Preservation** <br/>
150-
Captures and preserves business logic during the modernization process.
153+
Captures and preserves business logic during the modernization process.
151154

152155
- **Cost Efficiency** <br/>
153-
Reduces reliance on specialized legacy system expertise and manual translation efforts.
156+
Reduces reliance on specialized legacy system expertise and manual translation efforts.
154157

155158
- **Standardization** <br/>
156-
Ensures consistent query translation across the organization.
159+
Ensures consistent query translation across the organization.
157160

158161
</details>
159162

azure.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
environment:
2-
name: modernize-your-code-solution-accelerator
3-
location: eastus
41
name: modernize-your-code-solution-accelerator
52
metadata:
63
@@ -21,19 +18,3 @@ deployment:
2118
AzureAiServiceLocation: ${{ parameters.AzureAiServiceLocation }}
2219
Prefix: ${{ parameters.Prefix }}
2320
baseUrl: ${{ parameters.baseUrl }}
24-
hooks:
25-
preprovision:
26-
posix:
27-
shell: sh
28-
run: >
29-
chmod u+r+x ./scripts/validate_model_deployment_quota.sh; chmod u+r+x ./scripts/validate_model_quota.sh; ./scripts/validate_model_deployment_quota.sh --SubscriptionId "$AZURE_SUBSCRIPTION_ID" --Location "${AZURE_AISERVICE_LOCATION:-japaneast}" --ModelsParameter "aiModelDeployments"
30-
interactive: false
31-
continueOnError: false
32-
33-
windows:
34-
shell: pwsh
35-
run: >
36-
$location = if ($env:AZURE_AISERVICE_LOCATION) { $env:AZURE_AISERVICE_LOCATION } else { "japaneast" };
37-
./scripts/validate_model_deployment_quota.ps1 -SubscriptionId $env:AZURE_SUBSCRIPTION_ID -Location $location -ModelsParameter "aiModelDeployments"
38-
interactive: false
39-
continueOnError: false

docs/ArchitectureWAF.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Azure WAF-Aligned Architecture
2+
3+
This architecture implements [Azure Well-Architected Framework (WAF)](https://learn.microsoft.com/en-us/azure/well-architected/) principles for enterprise-grade deployments, deployed with the WAF-Aligned deployment option:
4+
5+
![WAF-Aligned Architecture Diagram](../docs/images/read_me/solArchitectureWAF.png)
6+
7+
## WAF Pillars Implementation
8+
9+
### Security
10+
- **Zero Trust Network:** Private VNet with private endpoints for all PaaS services
11+
- **Identity & Access:** Managed identities with RBAC and least-privilege access
12+
- **Secure Admin Access:** Azure Bastion + Jumpbox for internal administration
13+
- **Secrets Management:** Azure Key Vault integration
14+
15+
### Operational Excellence
16+
- **Observability:** Centralized logging via Log Analytics Workspace
17+
- **Application Monitoring:** Application Insights for telemetry and diagnostics
18+
- **Infrastructure as Code:** Bicep templates with parameterized configurations
19+
20+
### Performance Efficiency
21+
- **Auto-scaling:** Container Apps with configurable scaling policies
22+
- **Regional Proximity:** Resources deployed in optimal Azure regions
23+
24+
### Cost Optimization
25+
- **Right-sizing:** Parameterized SKUs and capacity settings
26+
- **Resource Sharing:** Shared networking and monitoring infrastructure
27+
28+
### Reliability
29+
- **High Availability:** Multi-zone deployment options
30+
- **Data Redundancy:** Configurable geo-replication for critical data stores
31+
- **Private Connectivity:** Eliminates internet dependencies
32+
33+
## Core Architecture Components
34+
35+
| Component | Purpose | WAF Alignment |
36+
|-----------|---------|---------------|
37+
| **Virtual Network** | Network isolation boundary | Security, Reliability |
38+
| **Private Endpoints** | Secure PaaS connectivity (AI Services, Storage, Cosmos DB, Key Vault) | Security |
39+
| **Private DNS Zones** | Internal name resolution | Security, Reliability |
40+
| **Azure Bastion + Jumpbox** | Secure administrative access | Security |
41+
| **Container Apps** | Application hosting with VNet integration | Performance, Reliability |
42+
| **Log Analytics + App Insights** | Centralized monitoring and diagnostics | Operational Excellence |
43+
44+
## Deployment Configuration
45+
- **Configurable Parameters:** If user selects to deploy as WAF Aligned, Parameters like Monitoring, Scaling, VPN will get enabled.
46+
- **Network-first Design:** All components deployed within private network boundaries
47+
- **Enterprise-ready:** Production-grade security and monitoring enabled
48+
49+
## Application Information Flow
50+
51+
The application information flow remains the same for both 'sandbox' and 'waf-aligned' configuration.
52+
53+
The solution is composed of several services:
54+
55+
- The web app front end and the backend app logic are containerized and run from Azure Container service instances.
56+
- When a request for conversion is created in the web app admin console, the user specifies what files should be converted and the target SQL dialect for conversion.
57+
- These files are then uploaded to blob storage and initial data about the request is stored in Cosmos DB.
58+
- The conversion takes place using appropriate LLM models using multiple agents, with each agent having a dedicated purpose in the conversion process. As files are converted, they are placed into blob storage, with metadata collected into Cosmos detailing the conversion process and the current state of the batch.
59+
- Cosmos also stores the logs from the individual agents so the results can be fully reviewed before any of the converted files are put into production.

docs/CmsaArchitectureSource.pptx

352 KB
Binary file not shown.

docs/DeploymentGuide.md

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

3232
| [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/microsoft/Modernize-your-Code-Solution-Accelerator) | [![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/microsoft/Modernize-your-Code-Solution-Accelerator) |
3333
|---|---|
34-
34+
3535
### **Configurable Deployment Settings**
3636

3737
When you start the deployment, most parameters will have **default values**, but you can update the following settings by following the steps [here](../docs/CustomizingAzdParameters.md):
@@ -61,7 +61,33 @@ By default, the **GPT model capacity** in deployment is set to **5k tokens**.
6161
6262
To adjust quota settings, follow these [steps](../docs/AzureGPTQuotaSettings.md)
6363

64-
### Deployment Options
64+
### Deployment Options & Steps
65+
### Sandbox or WAF Aligned Deployment Options
66+
67+
The [`infra`](../infra) folder contains the [`main.bicep`](../infra/main.bicep) Bicep script, which defines all Azure infrastructure components for this solution.
68+
69+
When running `azd up`, you’ll now be prompted to choose between a **WAF-aligned configuration** and a **sandbox configuration** using a simple selection:
70+
71+
- A **sandbox environment** — ideal for development and proof-of-concept scenarios, with minimal security and cost controls for rapid iteration.
72+
73+
- 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:
74+
- Enhanced network security (e.g., Network protection with private endpoints)
75+
- Stricter access controls and managed identities
76+
- Logging, monitoring, and diagnostics enabled by default
77+
- Resource tagging and cost management recommendations
78+
79+
**How to choose your deployment configuration:**
80+
81+
When prompted during `azd up`:
82+
83+
![useWAFAlignedArchitecture](images/macae_waf_prompt.png)
84+
85+
- Select **`true`** to deploy a **WAF-aligned, production-ready environment**
86+
- Select **`false`** to deploy a **lightweight sandbox/dev environment**
87+
-
88+
> [!TIP]
89+
> 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.
90+
6591
Pick from the options below to see step-by-step instructions for: GitHub Codespaces, VS Code Dev Containers, Local Environments, and Bicep deployments.
6692

6793
<details>
@@ -133,23 +159,28 @@ To change the azd parameters from the default values, follow the steps [here](..
133159
134160
1. Login to Azure:
135161
136-
```shell
137-
azd auth login
138-
```
162+
```shell
163+
azd auth login
164+
```
165+
166+
#### Note: To authenticate with Azure Developer CLI (`azd`) to a specific tenant, use the previous command with your **Tenant ID**:
167+
168+
```sh
169+
azd auth login --tenant-id <tenant-id>
170+
```
139171
140-
#### Note: To authenticate with Azure Developer CLI (`azd`) to a specific tenant, use the previous command with your **Tenant ID**:
172+
2. Provide an `azd` environment name (like "cmsaapp")
141173
142-
```sh
143-
azd auth login --tenant-id <tenant-id>
174+
```sh
175+
azd env new <cmsaapp>
144176
```
145177
146-
2. Provision and deploy all the resources:
178+
3. Provision and deploy all the resources:
147179
148180
```shell
149181
azd up
150182
```
151183
152-
3. Provide an `azd` environment name (like "cmsaapp")
153184
4. Select a subscription from your Azure account, and select a location which has quota for all the resources.
154185
* This deployment will take *6-9 minutes* to provision the resources in your account and set up the solution with sample data.
155186
* If you get an error or timeout with deployment, changing the location can help, as there may be availability constraints for the resources.

docs/images/macae_waf_prompt.png

5.06 KB
Loading
235 KB
Loading

0 commit comments

Comments
 (0)