Skip to content

Commit 417cf5e

Browse files
author
RoseHJM
committed
Second restructure
1 parent 9ec4e5c commit 417cf5e

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

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

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ The ADE team provides a selection of images to get you started, including a core
2727
- Azure Deployment Environments set up in your Azure subscription.
2828
- To set up ADE, follow the [Quickstart: Configure Azure Deployment Environments](quickstart-create-and-configure-devcenter.md).
2929

30-
3130
## Use container images with ADE
3231

3332
You can take one of the following approaches to use container images with ADE:
@@ -36,14 +35,12 @@ You can take one of the following approaches to use container images with ADE:
3635
- Customize a container image
3736
- Build a custom container image using the script provided by ADE
3837

39-
Select the appropriate tab to learn more about each approach.
38+
For simple scenarios, you can use the standard Bicep container image provided by ADE. For more complex scenarios, you can customize a container image or build a custom container image using the script provided by ADE.
4039

41-
## [Use the standard Bicep container image](#tab/use-the-standard-bicep-container-image/)
40+
## Use the standard Bicep container image
4241

4342
ADE supports Bicep natively, so you can configure an environment definition that deploys Azure resources for a deployment environment by adding the template files (azuredeploy.json and environment.yaml) to your catalog. ADE then uses the standard Bicep container image to create the deployment environment.
4443

45-
### Specify the standard Bicep container image
46-
4744
In the environment.yaml file, the runner property specifies the location of the container image you want to use. To use the sample image published on the Microsoft Artifact Registry, use the respective identifiers runner, as listed in the following table.
4845

4946
The following example shows a runner that references the sample Bicep container image:
@@ -57,7 +54,9 @@ The following example shows a runner that references the sample Bicep container
5754
```
5855
You can see the standard Bicep container image in the ADE sample repository under the [Runner-Images folder for the ARM-Bicep](https://github.com/Azure/deployment-environments/tree/main/Runner-Images/ARM-Bicep) image.
5956
60-
## [Create a custom bicep container image](#tab/create-a-custom-bicep-container-image/)
57+
## Create a custom bicep container image
58+
59+
Creating a custom container image allows you to customize your deployments and deletions to fit your workflow. You can create custom images based on the ADE standard container images.
6160
6261
### Create and build a Docker image
6362
@@ -72,7 +71,7 @@ To build an image configured for ADE, follow these steps:
7271
1. Build and push your image to your container registry, and ensure it's accessible to ADE.
7372
1. Reference your image in the `runner` property of your environment definition.
7473

75-
#### Select a sample container image by using the FROM statement
74+
### Select a sample container image by using the FROM statement
7675

7776
Include a FROM statement within a created DockerFile for your new image pointing to a sample image hosted on Microsoft Artifact Registry.
7877

@@ -84,7 +83,7 @@ FROM mcr.microsoft.com/deployment-environments/runners/core:latest
8483

8584
This statement pulls the most recently published core image, and makes it a basis for your custom image.
8685

87-
#### Install Bicep in a Dockerfile
86+
### Install Bicep in a Dockerfile
8887

8988
You can install the Bicep package with the Azure CLI by using the RUN statement, as shown in the following example:
9089

@@ -96,7 +95,7 @@ The ADE sample images are based on the Azure CLI image, and have the ADE CLI and
9695

9796
To install any more packages you need within your image, use the RUN statement.
9897

99-
#### Execute operation shell scripts
98+
### Execute operation shell scripts
10099

101100
Within the sample images, operations are determined and executed based on the operation name. Currently, the two operation names supported are *deploy* and *delete*.
102101

@@ -110,7 +109,7 @@ RUN find /scripts/ -type f -iname "*.sh" -exec dos2unix '{}' '+'
110109
RUN find /scripts/ -type f -iname "*.sh" -exec chmod +x {} \;
111110
```
112111

113-
#### Author operation shell scripts to deploy ARM or Bicep templates
112+
### Author operation shell scripts to deploy ARM or Bicep templates
114113
To ensure you can successfully deploy ARM or Bicep infrastructure through ADE, you must:
115114
- Convert ADE parameters to ARM-acceptable parameters
116115
- Resolve linked templates if they're used in the deployment
@@ -213,7 +212,13 @@ fi
213212
echo "{\"outputs\": $deploymentOutput}" > $ADE_OUTPUTS
214213
```
215214

216-
#### Build the image
215+
## Make the custom image accessible to ADE
216+
217+
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.
218+
219+
Select the appropriate tab to learn more about each approach.
220+
221+
### [Build the image with Docker CLI](#tab/build-the-image-with-docker-cli/)
217222

218223
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:
219224

@@ -250,7 +255,7 @@ When you're ready to push your image to your registry, run the following command
250255
docker push {YOUR_REGISTRY}.azurecr.io/{YOUR_IMAGE_LOCATION}:{YOUR_TAG}
251256
```
252257

253-
### Connect the image to your environment definition
258+
## Connect the image to your environment definition
254259

255260
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).
256261

@@ -262,6 +267,12 @@ runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}"
262267

263268
[!INCLUDE [custom-image-script](includes/custom-image-script.md)]
264269

270+
## Connect the image to your environment definition
271+
272+
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).
273+
274+
```yaml
275+
runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}"
265276
---
266277
267278
## Access operation logs and error details

0 commit comments

Comments
 (0)