Skip to content

Commit 53b5ac9

Browse files
Merge pull request #276546 from RoseHJM/ade-extensibility-model-restructure-terraform
ADE - Extensibility model restructure - Terraform
2 parents 12181db + 337c642 commit 53b5ac9

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

articles/deployment-environments/how-to-configure-extensibility-terraform-container-image.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,28 @@ An environment definition comprises at least two files: a template file, like *m
1919

2020
The ADE extensibility model enables you to create custom container images to use with your environment definitions. By using the extensibility model, you can create your own custom container images, and store them in a container registry like DockerHub. You can then reference these images in your environment definitions to deploy your environments.
2121

22-
The ADE CLI is a tool that allows you to build custom images by using ADE base images. You can use the ADE CLI to customize your deployments and deletions to fit your workflow. The ADE CLI is preinstalled on the sample images. To learn more about the ADE CLI, see the [CLI Custom Runner Image reference](https://aka.ms/deployment-environments/ade-cli-reference).
23-
2422
## Prerequisites
2523

2624
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2725
- Azure Deployment Environments set up in your Azure subscription.
2826
- To set up ADE, follow the [Quickstart: Configure Azure Deployment Environments](quickstart-create-and-configure-devcenter.md).
2927

30-
## Create and build a Docker image by using Terraform
28+
## Create a custom Terraform container image
29+
30+
Creating a custom container image allows you to customize your deployments to fit your requirements.
31+
32+
After you complete the image customization, you must build the image and push it to your container registry.
33+
34+
## Create and customize a container image with Docker
3135

3236
In this example, you learn how to build a Docker image to utilize ADE deployments and access the ADE CLI, basing your image on one of the ADE authored images.
3337

34-
To build an image configured for ADE, follow these steps:
38+
The ADE CLI is a tool that allows you to build custom images by using ADE base images. You can use the ADE CLI to customize your deployments and deletions to fit your workflow. The ADE CLI is preinstalled on the sample images. To learn more about the ADE CLI, see the [CLI Custom Runner Image reference](https://aka.ms/deployment-environments/ade-cli-reference).
39+
40+
To create an image configured for ADE, follow these steps:
3541
1. Base your image on an ADE-authored sample image or the image of your choice by using the FROM statement.
3642
1. Install any necessary packages for your image by using the RUN statement.
3743
1. Create a *scripts* folder at the same level as your Dockerfile, store your *deploy.sh* and *delete.sh* files within it, and ensure those scripts are discoverable and executable inside your created container. This step is necessary for your deployment to work using the ADE core image.
38-
1. Build and push your image to your container registry, and ensure it's accessible to ADE.
39-
1. Reference your image in the `runner` property of your environment definition.
4044

4145
### Select a sample container image by using the FROM statement
4246

@@ -152,8 +156,13 @@ tfOutputs=$(jq 'walk(if type == "object" then
152156

153157
echo "{\"outputs\": $tfOutputs}" > $ADE_OUTPUTS
154158
```
159+
## Make the custom image accessible to ADE
160+
161+
You must build your Docker image and push it to your container registry to make it available for use in ADE. You can build your image using the Docker CLI, or by using a script provided by ADE.
162+
163+
Select the appropriate tab to learn more about each approach.
155164

156-
### Build the image
165+
### [Build the image with Docker CLI](#tab/build-the-image-with-docker-cli/)
157166

158167
Before you build the image to be pushed to your registry, ensure the [Docker Engine is installed](https://docs.docker.com/desktop/) on your computer. Then, navigate to the directory of your Dockerfile, and run the following command:
159168

@@ -190,6 +199,12 @@ When you're ready to push your image to your registry, run the following command
190199
docker push {YOUR_REGISTRY}.azurecr.io/{YOUR_IMAGE_LOCATION}:{YOUR_TAG}
191200
```
192201

202+
## [Build a container image with a script](#tab/build-a-container-image-with-a-script/)
203+
204+
[!INCLUDE [custom-image-script](includes/custom-image-script.md)]
205+
206+
---
207+
193208
## Connect the image to your environment definition
194209

195210
When authoring environment definitions to use your custom image in their deployment, edit the `runner` property on the manifest file (environment.yaml or manifest.yaml).
@@ -198,14 +213,11 @@ When authoring environment definitions to use your custom image in their deploym
198213
runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}"
199214
```
200215
201-
## Build a container image with a script
202-
203-
[!INCLUDE [custom-image-script](includes/custom-image-script.md)]
204-
205216
## Access operation logs and error details
206217
207218
[!INCLUDE [custom-image-logs-errors](includes/custom-image-logs-errors.md)]
208219
209220
## Related content
210221
211222
- [ADE CLI Custom Runner Image reference](https://aka.ms/deployment-environments/ade-cli-reference)
223+
- [ADE CLI variables reference](reference-deployment-environment-variables.md)

0 commit comments

Comments
 (0)