Skip to content

Commit 71d7c60

Browse files
Merge pull request #496 from microsoft/dev
chore: merging dev changes to main branch
2 parents a211e49 + 287ef57 commit 71d7c60

13 files changed

+454
-9
lines changed

.github/workflows/deploy-waf.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ jobs:
117117
enableMonitoring=true \
118118
enablePrivateNetworking=true \
119119
enableScalability=true \
120+
createdBy="Pipeline" \
120121
121122
122123
- name: Send Notification on Failure

docs/ACRBuildAndPushGuide.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Azure Container Registry (ACR) – Build & Push Guide
2+
3+
This guide provides step-by-step instructions to build and push Docker images for **WebApp** and **Backend** services into Azure Container Registry (ACR).
4+
5+
## 📋 Prerequisites
6+
Before starting, ensure you have:
7+
- An active [Azure Subscription](https://portal.azure.com/)
8+
- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) installed and logged in
9+
- [Docker Desktop](https://docs.docker.com/get-docker/) installed and running
10+
- Access to your Azure Container Registry (ACR)
11+
- To create an Azure Container Registry (ACR), you can refer to the following guides:
12+
13+
- [Create Container Registry using Azure CLI](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli)
14+
15+
- [Create Container Registry using Azure Portal](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal?tabs=azure-cli)
16+
17+
- [Create Container Registry using PowerShell](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-powershell)
18+
19+
- [Create Container Registry using ARM Template](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-geo-replication-template)
20+
21+
- [Create Container Registry using Bicep](https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-bicep?tabs=CLI)
22+
23+
---
24+
25+
Login to ACR :
26+
``` bash
27+
az acr login --name $ACR_NAME
28+
```
29+
30+
## 🚀 Build and Push Images
31+
32+
**Backend :**
33+
34+
```bash
35+
az acr login --name <containerregname>
36+
docker build --no-cache -f docker/Backend.Dockerfile -t <acrloginserver>/<repo>:<tagname> .
37+
docker push <acrloginserver>/<repo>:<tagname>
38+
```
39+
40+
If you want to update image tag and image manually you can follow below steps:
41+
- Go to your **Container App** in the [Azure Portal](https://portal.azure.com/#home).
42+
- In the left menu, select **Containers**.
43+
- Under your container, update:
44+
45+
- Image source → Azure Container Registry / Docker Hub.
46+
47+
- Image name → myapp/backend.
48+
49+
- Tag → change to the new one you pushed (e.g., v2).
50+
51+
- Click **Save** → this will create a new revision automatically with the updated image.
52+
53+
![alt text](./images/ContainerApp.png)
54+
55+
**WebApp :**
56+
57+
```bash
58+
az acr login --name <containerregname>
59+
docker build --no-cache -f docker/Frontend.Dockerfile -t <acrloginserver>/<repo>:<tagname> .
60+
docker push <acrloginserver>/<repo>:<tagname>
61+
```
62+
63+
If you want to update image tag and image manually you can follow below steps:
64+
- Go to your App Service in the [Azure Portal](https://portal.azure.com/#home).
65+
- In the left menu, select Deployment → Deployment Center
66+
- Under Container settings, you can configure:
67+
68+
- Image Source → (e.g., Azure Container Registry / Docker Hub / Other).
69+
70+
- Image Name → e.g., myapp/backend.
71+
72+
- Tag → e.g., v1.2.3.
73+
74+
![alt text](./images/AppServiceContainer.png)
75+
76+
77+
## ✅ Verification
78+
79+
Run the following command to verify that images were pushed successfully:
80+
```bash
81+
az acr repository list --name $ACR_NAME --output table
82+
```
83+
84+
You should see repositories in the output.
85+
86+
## 📝 Notes
87+
88+
- Always use meaningful tags (v1.0.0, staging, prod) instead of just latest.
89+
90+
- If you are pushing from a CI/CD pipeline, make sure the pipeline agent has access to Docker and ACR.
91+
92+
- For private images, ensure your services (e.g., Azure Container Apps, AKS, App Service) are configured with appropriate ACR pull permissions.
93+
94+
95+

docs/CustomizingAzdParameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ By default this template will use the environment name as the prefix to prevent
1313
| `AZURE_ENV_OPENAI_LOCATION` | string | `<User selects during deployment>` | Specifies the region for OpenAI resource deployment. |
1414
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
1515
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o` | Specifies the name of the GPT model to be deployed. |
16-
| `AZURE_ENV_FOUNDRY_PROJECT_ID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. |
16+
| `AZURE_EXISTING_AI_PROJECT_RESOURCE_ID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. |
1717
| `AZURE_ENV_MODEL_VERSION` | string | `2024-08-06` | Version of the GPT model to be used for deployment. |
1818
| `AZURE_ENV_MODEL_CAPACITY` | int | `150` | Sets the GPT model capacity. |
1919
| `AZURE_ENV_IMAGETAG` | string | `latest` | Docker image tag used for container deployments. |

docs/DeploymentGuide.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,23 @@ By default, the `azd up` command uses the [`main.parameters.json`](../infra/main
6161

6262
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:
6363

64+
**Prerequisite** — Enable the Microsoft.Compute/EncryptionAtHost feature for every subscription (and region, if required) where you plan to deploy VMs or VM scale sets with `encryptionAtHost: true`. Repeat the registration steps below for each target subscription (and for each region when applicable). This step is required for **WAF-aligned** (production) deployments.
65+
66+
Steps to enable the feature:
67+
1. Set the target subscription:
68+
Run: <code>az account set --subscription "&lt;YourSubscriptionId&gt;"</code>
69+
2. Register the feature (one time per subscription):
70+
Run: <code>az feature register --name EncryptionAtHost --namespace Microsoft.Compute</code>
71+
3. Wait until registration completes and shows "Registered":
72+
Run: <code>az feature show --name EncryptionAtHost --namespace Microsoft.Compute --query properties.state -o tsv</code>
73+
4. Refresh the provider (if required):
74+
Run: <code>az provider register --namespace Microsoft.Compute</code>
75+
5. Re-run the deployment after registration is complete.
76+
77+
Note: Feature registration can take several minutes. Ensure the feature is registered before attempting deployments that require encryptionAtHost.
78+
79+
Reference: Azure Host Encryption — https://learn.microsoft.com/azure/virtual-machines/disks-enable-host-based-encryption-portal?tabs=azure-cli
80+
6481
- Enhanced network security (e.g., Network protection with private endpoints)
6582
- Stricter access controls and managed identities
6683
- Logging, monitoring, and diagnostics enabled by default

0 commit comments

Comments
 (0)