Skip to content

Commit cc5b564

Browse files
Merge pull request #293171 from RoseHJM/ade-extensibility-updates-03
ADE - extensibility updates from Jack's review
2 parents 4dd354b + b4dcaa8 commit cc5b564

File tree

3 files changed

+88
-42
lines changed

3 files changed

+88
-42
lines changed

articles/deployment-environments/concept-extensibility-model.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: RoseHJM
55
ms.author: rosemalcolm
66
ms.service: azure-deployment-environments
77
ms.topic: concept-article
8-
ms.date: 10/17/2024
8+
ms.date: 01/17/2025
99

1010
# Customer intent: As a platform engineer, I want to know how to use custom container images to create deployment environments.
1111

@@ -18,7 +18,7 @@ The following diagram shows the full workflow for ADE. The catalog stores IaC te
1818

1919
:::image type="content" source="media/concept-extensibility-model/deployment-environments-overview.svg" alt-text="Diagram showing Azure Deployment Environments components.":::
2020

21-
The extensibility model enables platform engineers to define the app infrastructure using their preferred IaC framework including Azure Resource Manager (ARM), Bicep, Terraform, and Pulumi. Platform engineers create and customize container images for different scenarios. They push these images to a container registry and reference them in the environment definitions metadata file. This ensures that whenever a deployment is made, the deployment execution happens based on how the container image is configured. The following diagram shows the relationship between the custom images stored in a container registry, and the environment definition within the catalog.
21+
The extensibility model enables platform engineers to define the app infrastructure using their preferred IaC framework including Azure Resource Manager (ARM), Bicep, Terraform, and Pulumi. Platform engineers create and customize container images for different scenarios. They push these images to a container registry and reference them in the environment definition's metadata file. This ensures that whenever a deployment is made, the deployment execution happens based on how the container image is configured. The following diagram shows the relationship between the custom images stored in a container registry, and the environment definition within the catalog.
2222

2323
:::image type="content" source="media/concept-extensibility-model/extensibility-model-detail.svg" alt-text="Diagram showing Azure Deployment Environments extensibility model components.":::
2424

@@ -48,11 +48,23 @@ For instructions, see: [Create a custom container image manually](https://aka.ms
4848

4949
### Terraform
5050

51+
**Create a custom image using a script**
52+
53+
To make the process of building a Terraform specific image and pushing it to a container registry easier, Microsoft provides a script that builds and pushes the image to a registry that you specify.
54+
55+
For instructions, see: [Create a custom container image by using a script](https://aka.ms/ade/terraform-custom-script).
56+
57+
**Create a custom image using a GitHub workflow**
58+
59+
To make the process of building a Terraform specific image and pushing it to a container registry easier, you can use a published workflow that builds and pushes the image to a registry that you specify.
60+
61+
For instructions, see: [Create a custom container image by using a GitHub workflow](https://aka.ms/ade/terraform-workflow).
62+
5163
**Create a Terraform specific container image manually**
5264

53-
You can use a GitHub workflow to create a custom Terraform image that includes the software, settings, and other customizations you need for your Terraform specific image. You can then upload the new image to a container registry and use it by referencing it in the environment.yaml file.
65+
You can use a GitHub workflow to create a Terraform specific image that includes the software, settings, and other customizations you need for your Terraform specific image. You can then upload the new image to a container registry and use it by referencing it in the environment.yaml file.
5466

55-
For instructions, see: [Create a container image using a GitHub workflow](https://aka.ms/ade/terraform-workflow-custom-manual).
67+
For instructions, see: [Create a custom container image manually](https://aka.ms/ade/terraform-workflow-custom-manual).
5668

5769
### Pulumi
5870

articles/deployment-environments/how-to-configure-extensibility-model-custom-image.md

Lines changed: 72 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: azure-deployment-environments
66
ms.custom: devx-track-azurecli, devx-track-bicep
77
author: RoseHJM
88
ms.author: rosemalcolm
9-
ms.date: 01/10/2025
9+
ms.date: 01/17/2025
1010
ms.topic: how-to
1111
zone_pivot_groups: ade-extensibility-iac-framework
1212

@@ -69,17 +69,31 @@ For more information about how to create environment definitions that use the AD
6969
### [Create a custom image by using a script](#tab/custom-script/)
7070
### Create a custom container image by using a script
7171
72-
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create custom images based on the ADE standard images.
72+
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create and build an image based on the ADE standard image and push it to your container registry by using a quick start script provided by Microsoft. You can find the script in the [Deployment Environments repo](https://aka.ms/ade/arm-bicep-repo-script). To use the quick start script, fork the repo and then run the script locally.
73+
74+
The script builds an image and pushes it to the specified Azure Container Registry (ACR) under the repository 'ade' and the tag 'latest'. This script requires your registry name and directory for your custom image, have the Azure CLI and Docker Desktop installed and in your PATH variables, and requires that you have permissions to push to the specified registry.
7375
74-
After you complete the image customization, you can build the image and push it to your container registry by using a script provided by Microsoft to automate the process.
76+
To use the script, you must:
7577
76-
[!INCLUDE [custom-image-create-arm](includes/custom-image-create-arm.md)]
78+
1. Create a Dockerfile and scripts folder to support the ADE extensibility model.
79+
1. Supply a registry name and directory for your custom image.
80+
1. Have the Azure CLI and Docker Desktop installed and in your PATH variables.
81+
1. Have Docker Desktop running.
82+
1. Have permissions to push to the specified registry.
7783
78-
### Build a container image with a script
84+
You can call the script using the following command in PowerShell:
7985
80-
Rather than building your custom image and pushing it to a container registry yourself, you can use a script to build and push it to a specified container registry.
86+
```azurepowershell
87+
.\quickstart-image-build.ps1 -Registry '{YOUR_REGISTRY}' -Directory '{DIRECTORY_TO_YOUR_IMAGE}'
88+
```
8189

82-
[!INCLUDE [custom-image-script](includes/custom-image-script-build.md)]
90+
Additionally, if you would like to push to a specific repository and tag name, you can run:
91+
92+
```azurepowershell
93+
.\quickstart-image.build.ps1 -Registry '{YOUR_REGISTRY}' -Directory '{DIRECTORY_TO_YOUR_IMAGE}' -Repository '{YOUR_REPOSITORY}' -Tag '{YOUR_TAG}'
94+
```
95+
96+
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
8397

8498
### [Create a custom image manually](#tab/custom-manual/)
8599
### Create a custom container image manually
@@ -105,11 +119,59 @@ After you complete the image customization, you can build the image and push it
105119
## Use container images with ADE
106120

107121
You can take one of the following approaches to use container images with ADE:
108-
- **Create a container image leveraging a GitHub workflow:** To start with, you can use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
109-
- **Create a custom container image:** You can create a workflow that creates a Terraform specific image customized with all the software, settings, and configuration that you need.
122+
- **Create a custom container image by using a script:** Use the published script to create a Terraform specific image.
123+
- **Create a custom container image leveraging a GitHub workflow:** Use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
124+
- **Create a custom container image manually:** Create a customized Terraform specific image manually
125+
126+
## Create a custom container image
127+
128+
### [Create an image using a script](#tab/terraform-script/)
129+
130+
## Create a custom container image by using a script
131+
132+
Creating a custom container image allows you to customize your deployments to fit your requirements. You can build an image based on the ADE standard image and push it to your container registry by using a quick start script provided by Microsoft. You can find the script in the [Deployment Environments with Terraform repo](https://aka.ms/ade/terraform-repo-script). To use the quick start script, fork the repo and then run the script locally.
133+
134+
To use the quickstart script to quickly build and push this sample image to an Azure Container Registry, you will need to:
135+
136+
- Fork this repository into your personal account.
137+
- Ensure the Azure CLI and the Docker Desktop application are installed on your computer and within your PATH variables.
138+
- Ensure you have permissions to push images to your selected Azure Container Registry.
139+
140+
The script builds an image and pushes it to the specified Azure Container Registry (ACR) under the repository 'ade' and the tag 'latest'. This script requires your registry name and directory for your custom image, have the Azure CLI and Docker Desktop installed and in your PATH variables, and requires that you have permissions to push to the specified registry. You can call the script using the following command in PowerShell:
141+
142+
```azurepowershell
143+
.\quickstart-image-build.ps1 -Registry '{YOUR_REGISTRY}' -Directory '{DIRECTORY_TO_YOUR_IMAGE}'
144+
```
145+
146+
Additionally, if you would like to push to a specific repository and tag name, you can run:
147+
148+
```azurepowershell
149+
.\quickstart-image.build.ps1 -Registry '{YOUR_REGISTRY}' -Directory '{DIRECTORY_TO_YOUR_IMAGE}' -Repository '{YOUR_REPOSITORY}' -Tag '{YOUR_TAG}'
150+
```
151+
152+
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
153+
154+
### [Create an image using a GitHub workflow](#tab/github-workflow/)
155+
156+
## Create a custom container image by using a GitHub workflow
157+
158+
To start with, you can use the published GitHub workflow from the Leveraging ADE's Extensibility Model With Terraform repository.
159+
160+
In order to use the workflow, you will need to:
161+
162+
- Fork this repository into your personal account
163+
- Allow GitHub Actions to connect to Azure via an Microsoft Entra ID application's federated credentials through OIDC. You can find more documentation about this process here
164+
- Set up Repository Secrets for your repository containing your Microsoft Entra ID application's application ID set as AZURE_CLIENT_ID, the subscription ID set as AZURE_SUBSCRIPTION_ID, and the tenant ID set as AZURE_TENANT_ID
165+
- Set up Repository Variables for your repository containing your personal Azure Container Registry (ACR) name as REGISTRY_NAME, your preferred repository name as REPOSITORY_NAME, and your preferred tag as TAG for the created image. You can modify your variables between workflow runs to push the generated image to different registries, repositories and tags.
110166

167+
Run the workflow by navigating to the Actions tab in your forked repository and selecting the workflow you would like to run. You can then select the Run workflow button to start the workflow.
168+
169+
To use the image in your environment deployments, you need to add the location of the image to your manifest file [Connect the image to your environment definition](#connect-the-image-to-your-environment-definition) and you might need to configure permissions for the ACR to [make the custom image available to ADE](#make-the-custom-image-available-to-ade).
170+
171+
### [Create an image manually](#tab/terraform-manual/)
172+
173+
## Create a custom container image manually
111174

112-
## Create a container image using a GitHub workflow
113175
Creating a custom container image allows you to customize your deployments to fit your requirements. You can create custom images based on the ADE standard images.
114176

115177
After you complete the image customization, you must build the image and push it to your container registry.

articles/deployment-environments/includes/custom-image-script-build.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)