Skip to content

Commit e33927d

Browse files
authored
Merge pull request #268621 from ShawnJackson/container-instances-tutorial-deploy-confidential-containers-cce-arm
[AQ] edit pass: container-instances-tutorial-deploy-confidential-containers-cce-arm
2 parents fa2a2ec + dbac01d commit e33927d

File tree

2 files changed

+65
-64
lines changed

2 files changed

+65
-64
lines changed

articles/container-instances/container-instances-tutorial-deploy-confidential-containers-cce-arm.md

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Tutorial - Prepare a deployment for a confidential container on Azure Container Instances
3-
description: Azure Container Instances tutorial deploys a confidential container - ARM
2+
title: "Tutorial: Prepare a deployment for a confidential container on Azure Container Instances"
3+
description: Learn how to create an Azure Resource Manager template for a confidential container deployment with a custom confidential computing enforcement policy.
44
ms.topic: tutorial
55
ms.author: tomcassidy
66
author: tomvcassidy
@@ -10,36 +10,37 @@ ms.date: 05/23/2023
1010
ms.custom: mvc, devx-track-arm-template, linux-related-content
1111
---
1212

13-
# Tutorial: Create an ARM template for a confidential container deployment with custom confidential computing enforcement policy
13+
# Tutorial: Prepare a deployment for a confidential container on Azure Container Instances
1414

15-
Confidential containers on ACI is a SKU on the serverless platform that enables customers to run container applications in a hardware-based and attested trusted execution environment (TEE), which can protect data in use and provides in-memory encryption via Secure Nested Paging.
15+
In Azure Container Instances, you can use confidential containers on the serverless platform to run container applications in a hardware-based and attested trusted execution environment (TEE). This capability can help protect data in use and provides in-memory encryption via Secure Nested Paging.
1616

17-
In this article, you'll:
17+
In this tutorial, you learn how to:
1818

1919
> [!div class="checklist"]
20-
> * Create an ARM template for a confidential container group
21-
> * Generate a confidential computing enforcement (CCE) policy
22-
> * Deploy the confidential container group to Azure
20+
>
21+
> * Create an Azure Resource Manager template (ARM template) for a confidential container group.
22+
> * Generate a confidential computing enforcement (CCE) policy.
23+
> * Deploy the confidential container group to Azure.
2324
24-
## Before you begin
25+
## Prerequisites
2526

2627
[!INCLUDE [container-instances-tutorial-prerequisites-confidential-containers](../../includes/container-instances-tutorial-prerequisites-confidential-containers.md)]
2728

28-
## Create an ACI container group ARM Template
29+
## Create an ARM template for a Container Instances container group
2930

30-
In this tutorial, you deploy a hello world application that generates a hardware attestation report. You start by creating an ARM template with a container group resource to define the properties of this application. You'll use this ARM template with the Azure CLI confcom tooling to generate a confidential computing enforcement (CCE) policy for attestation. In this tutorial, we use this [ARM template](https://raw.githubusercontent.com/Azure-Samples/aci-confidential-hello-world/main/template.json?token=GHSAT0AAAAAAB5B6SJ7VUYU3G6MMQUL7KKKY7QBZBA). To view the source code for this application, visit [ACI Confidential Hello World](https://aka.ms/ccacihelloworld).
31+
In this tutorial, you deploy a Hello World application that generates a hardware attestation report. You start by creating an ARM template with a container group resource to define the properties of this application. You then use this ARM template with the Azure CLI confcom tooling to generate a CCE policy for attestation.
3132

32-
> [!NOTE]
33-
> The ccePolicy parameter of the template is blank and needs to be updated based on the next step of this tutorial.
33+
This tutorial uses [this ARM template](https://raw.githubusercontent.com/Azure-Samples/aci-confidential-hello-world/main/template.json?token=GHSAT0AAAAAAB5B6SJ7VUYU3G6MMQUL7KKKY7QBZBA) as an example. To view the source code for this application, see [Azure Container Instances Confidential Hello World](https://aka.ms/ccacihelloworld).
3434

35-
There are two properties added to the Azure Container Instance resource definition to make the container group confidential:
35+
The example template adds two properties to the Container Instances resource definition to make the container group confidential:
3636

37-
1. **sku**: The SKU property enables you to select between confidential and standard container group deployments. If this property isn't added, the container group will be deployed as standard SKU.
38-
2. **confidentialComputeProperties**: The confidentialComputeProperties object enables you to pass in a custom confidential computing enforcement policy for attestation of your container group. If this object isn't added to the resource there will be no validation of the software components running within the container group.
37+
* `sku`: Enables you to select between confidential and standard container group deployments. If you don't add this property to the resource, the container group will be a standard deployment.
38+
* `confidentialComputeProperties`: Enables you to pass in a custom CCE policy for attestation of your container group. If you don't add this object to the resource, the software components that run within the container group won't be validated.
3939

40-
Use your preferred text editor to save this ARM template on your local machine as **template.json**.
40+
> [!NOTE]
41+
> The `ccePolicy` parameter under `confidentialComputeProperties` is blank. You'll fill it in after you generate the policy later in the tutorial.
4142
42-
You can see under **confidentialComputeProperties**, we have left a blank **ccePolicy** for you to fill in once you generate the policy in the next step.
43+
Use your preferred text editor to save this ARM template on your local machine as *template.json*.
4344

4445
```ARM
4546
{
@@ -155,18 +156,17 @@ You can see under **confidentialComputeProperties**, we have left a blank **cceP
155156
}
156157
```
157158

158-
## Create a custom CCE Policy
159-
160-
With the ARM template that you've crafted and the Azure CLI confcom extension, you're able to generate a custom CCE policy. the CCE policy is used for attestation. The tool takes the ARM template as an input to generate the policy. The policy enforces the specific container images, environment variables, mounts, and commands, which can then be validated when the container group starts up. For more information on the Azure CLI confcom extension, see [Azure CLI confcom extension](https://github.com/Azure/azure-cli-extensions/blob/main/src/confcom/azext_confcom/README.md).
159+
## Create a custom CCE policy
161160

161+
With the ARM template that you crafted and the Azure CLI confcom extension, you can generate a custom CCE policy. The CCE policy is used for attestation. The tool takes the ARM template as an input to generate the policy. The policy enforces the specific container images, environment variables, mounts, and commands, which can then be validated when the container group starts up. For more information on the Azure CLI confcom extension, see the [documentation on GitHub](https://github.com/Azure/azure-cli-extensions/blob/main/src/confcom/azext_confcom/README.md).
162162

163-
1. To generate the CCE policy, you'll run the following command using the ARM template as input:
163+
1. To generate the CCE policy, run the following command by using the ARM template as input:
164164

165165
```azurecli-interactive
166166
az confcom acipolicygen -a .\template.json --print-policy
167167
```
168168

169-
When this command completes, you should see a Base 64 string generated as output in the format seen below. This string is the CCE policy that you will copy and paste into your ARM template under the ccePolicy property.
169+
When this command finishes, a Base64 string generated as output should appear in the following format. This string is the CCE policy that you copy and paste into your ARM template as the value of the `ccePolicy` property.
170170

171171
```output
172172
cGFja2FnZSBwb2xpY3kKCmFwaV9zdm4gOj0gIjAuOS4wIgoKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5ldmVyeQppbXBvcnQgZnV0dXJlLmtleXdvcmRzLmluCgpmcmFnbWVudHMgOj0gWwpd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cmVhdGVfY29udGFpbmVyIDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CmV4ZWNfaW5fY29udGFpbmVyIDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CmV4ZWNfZXh0ZXJuYWwgOj0geyAiYWxsb3dlZCIgOiB0cnVlIH0Kc2h1dGRvd25fY29udGFpbmVyIDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CnNpZ25hbF9jb250YWluZXJfcHJvY2VzcyA6PSB7ICJhbGxvd2VkIiA6IHRydWUgfQpwbGFuOV9tb3VudCA6PSB7ICJhbGxvd2VkIiA6IHRydWUgfQpwbGFuOV91bm1vdW50IDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CmdldF9wcm9wZXJ0aWVzIDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CmR1bXBfc3RhY2tzIDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CnJ1bnRpbWVfbG9nZ2luZyA6PSB7ICJhbGxvd2VkIiA6IHRydWUgfQpsb2FkX2ZyYWdtZW50IDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CnNjcmF0Y2hfbW91bnQgOj0geyAiYWxsb3dlZCIgOiB0cnVlIH0Kc2NyYXRjaF91bm1vdW50IDo9IHsgImFsbG93ZWQiIDogdHJ1ZSB9CnJlYXNvbiA6PSB7ImVycm9ycyI6IGRhdGEuZnJhbWV3b3JrLmVycm9yc30K
@@ -176,61 +176,64 @@ With the ARM template that you've crafted and the Azure CLI confcom extension, y
176176

177177
## Deploy the template
178178

179-
1. Select the following **Deploy to Azure** button to sign in to Azure and begin an Azure Container Instances deployment.
179+
In the following steps, you use the Azure portal to deploy the template. You can also use Azure PowerShell, the Azure CLI, or the REST API. To learn about other deployment methods, see [Deploy templates](../azure-resource-manager/templates/deploy-cli.md).
180+
181+
1. Select the **Deploy to Azure** button to sign in to Azure and begin a Container Instances deployment.
180182

181183
:::image type="content" source="~/articles/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://ms.portal.azure.com/#create/Microsoft.Template":::
182184

183-
1. Choose **Build your own template in the editor**. You'll see a mostly blank template JSON.
185+
1. Select **Build your own template in the editor**.
184186

185-
![Screenshot of Build your own template in the editor button on deployment screen, PNG.](./media/container-instances-confidential-containers-tutorials/confidential-containers-cce-build-template.png)
187+
![Screenshot of the button for building your own template in the editor.](./media/container-instances-confidential-containers-tutorials/confidential-containers-cce-build-template.png)
186188

187-
1. Select **Load file** and upload **template.json**, which you've modified by adding the CCE policy you generated in the previous steps.
189+
The template JSON that appears is mostly blank.
188190

189-
![Screenshot of Load file button on template screen, PNG.](./media/container-instances-confidential-containers-tutorials/confidential-containers-cce-load-file.png)
191+
1. Select **Load file** and upload *template.json*, which you modified by adding the CCE policy in the previous steps.
190192

191-
1. Click **Save**.
193+
![Screenshot of the button for loading a file.](./media/container-instances-confidential-containers-tutorials/confidential-containers-cce-load-file.png)
192194

193-
1. Select or enter the following values.
195+
1. Select **Save**.
194196

195-
* **Subscription**: select an Azure subscription.
196-
* **Resource group**: select **Create new**, enter a unique name for the resource group, and then select **OK**.
197-
* **Location**: select a location for the resource group. Choose a region where the [Confidential SKU is supported](./container-instances-region-availability.md#linux-container-groups). Example: **North Europe**.
198-
* **Name**: accept the generated name for the instance, or enter a name.
199-
* **Image**: accept the default image name. This sample Linux image displays a hardware attestation.
197+
1. Select or enter the following values:
200198

201-
Accept default values for the remaining properties.
199+
* **Subscription**: Select an Azure subscription.
200+
* **Resource group**: Select **Create new**, enter a unique name for the resource group, and then select **OK**.
201+
* **Name**: Accept the generated name for the instance, or enter a name.
202+
* **Location**: Select a location for the resource group. Choose a region where [confidential containers are supported](./container-instances-region-availability.md#linux-container-groups). Example: **North Europe**.
203+
* **Image**: Accept the default image name. This sample Linux image displays a hardware attestation.
202204

203-
Review the terms and conditions. If you agree, select **I agree to the terms and conditions stated above**.
205+
Accept default values for the remaining properties, and then select **Review + create**.
204206

205-
![Screenshot of custom ARM template deployment, PNG.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-custom-arm-deployment.png)
207+
![Screenshot of details for a custom ARM template deployment.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-custom-arm-deployment.png)
206208

207-
1. After the instance has been created successfully, you get a notification:
209+
1. Review the terms and conditions. If you agree, select **I agree to the terms and conditions stated above**.
208210

209-
![Screenshot of portal notification for successful deployment, PNG.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-deployment-succeed.png)
211+
1. Wait until the **Deployment succeeded** notification appears. It confirms that you successfully created the instance.
210212

211-
The Azure portal is used to deploy the template. In addition to the Azure portal, you can use the Azure PowerShell, Azure CLI, and REST API. To learn other deployment methods, see [Deploy templates](../azure-resource-manager/templates/deploy-cli.md).
213+
![Screenshot of a portal notification for successful deployment.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-deployment-succeed.png)
212214

213215
## Review deployed resources
214216

215-
Use the Azure portal or a tool such as the [Azure CLI](container-instances-quickstart.md) to review the properties of the container instance.
217+
In the following steps, you use the Azure portal to review the properties of the container instance. You can also use a tool such as the [Azure CLI](container-instances-quickstart.md).
216218

217-
1. In the portal, search for Container Instances, and select the container instance you created.
219+
1. In the portal, search for **Container Instances**, and then select the container instance that you created.
218220

219-
2. On the **Overview** page, note the **Status** of the instance and its **IP address**.
221+
2. On the **Overview** page, note the status of the instance and its IP address.
220222

221-
![Screenshot of overview page for container group instance, PNG.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-portal.png)
223+
![Screenshot of the overview page for a container group instance.](media/container-instances-confidential-containers-tutorials/confidential-containers-cce-portal.png)
222224

223-
3. Once its status is *Running*, navigate to the IP address in your browser.
225+
3. When the status of the instance is **Running**, go to the IP address in your browser.
224226

225-
![Screenshot of browser view of app deployed using Azure Container Instances, PNG.](media/container-instances-confidential-containers-tutorials/confidential-containers-aci-hello-world.png)
227+
![Screenshot of a browser view of an app deployed via Azure Container Instances.](media/container-instances-confidential-containers-tutorials/confidential-containers-aci-hello-world.png)
226228

227229
The presence of the attestation report below the Azure Container Instances logo confirms that the container is running on hardware that supports a TEE.
228-
If you deploy to hardware that does not support a TEE, for example by choosing a region where the ACI Confidential SKU is not available, no attestation report will be shown.
229230

230-
## Next Steps
231+
If you deploy to hardware that doesn't support a TEE (for example, by choosing a region where Container Instances Confidential isn't available), no attestation report appears.
232+
233+
## Related content
231234

232-
Now that you have deployed a confidential container group on ACI, you can learn more about how policies are enforced.
235+
Now that you've deployed a confidential container group on Container Instances, you can learn more about how policies are enforced:
233236

234-
* [Confidential computing enforcement policies overview](./container-instances-confidential-overview.md)
237+
* [Confidential containers on Azure Container Instances](./container-instances-confidential-overview.md)
235238
* [Azure CLI confcom extension examples](https://github.com/Azure/azure-cli-extensions/blob/main/src/confcom/azext_confcom/README.md)
236239
* [Confidential Hello World application](https://aka.ms/ccacihelloworld)

includes/container-instances-tutorial-prerequisites-confidential-containers.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: include file
3-
description: include file
2+
title: Include file
3+
description: Include file
44
services: container-instances
55
author: tomvcassidy
66

@@ -11,24 +11,22 @@ ms.author: tomcassidy
1111
ms.custom: include file
1212
---
1313

14-
You must satisfy the following requirements to complete this tutorial:
14+
To complete this tutorial, you must satisfy the following requirements:
1515

16-
1. **Azure CLI**: You must have Azure CLI version 2.44.1 or later installed on your local computer. Run `az --version` to find the version. If you need to install or upgrade, see [Install the Azure CLI][azure-cli-install].
16+
* **Azure CLI**: You must have Azure CLI version 2.44.1 or later installed on your local computer. To find your version, run `az --version`. If you need to install or upgrade, see [Install the Azure CLI][azure-cli-install].
1717

18-
2. **Azure CLI confcom extension**: You must have the Azure CLI confcom extension version 0.2.13+ installed to generate confidential computing enforcement policies.
18+
* **Azure CLI confcom extension**: You must have Azure CLI confcom extension version 0.30+ installed to generate confidential computing enforcement policies.
1919

20-
**Docker**: This tutorial assumes a basic understanding of core Docker concepts like containers, container images, and basic `docker` commands. For a primer on Docker and container basics, see the [Docker overview][docker-get-started].
20+
```bash
21+
az extension add -n confcom
22+
```
2123

22-
**Docker**: To complete this tutorial, you need Docker installed locally. Docker provides packages that configure the Docker environment on [macOS][docker-mac], [Windows][docker-windows], and [Linux][docker-linux].
24+
* **Docker**: You need Docker installed locally. Docker provides packages that configure the Docker environment on [macOS][docker-mac], [Windows][docker-windows], and [Linux][docker-linux].
2325

24-
**Azure CLI confcom extension**: You must have the Azure CLI confcom extension version 0.30+ to generate confidential computing enforcement policies.
25-
26-
```bash
27-
az extension add -n confcom
28-
```
26+
This tutorial assumes a basic understanding of core Docker concepts like containers, container images, and basic `docker` commands. For a primer on Docker and container basics, see the [Docker overview][docker-get-started].
2927

3028
> [!IMPORTANT]
31-
> Because the Azure Cloud shell does not include the Docker daemon, you *must* install both the Azure CLI and Docker Engine on your *local computer* to complete this tutorial. You cannot use the Azure Cloud Shell for this tutorial.
29+
> Because Azure Cloud Shell doesn't include the Docker daemon, you must install both the Azure CLI and Docker Engine on your *local computer* to complete this tutorial. You can't use Azure Cloud Shell for this tutorial.
3230
3331
<!-- LINKS - External -->
3432
[docker-get-started]: https://docs.docker.com/engine/docker-overview/

0 commit comments

Comments
 (0)