Skip to content

Commit 03a3fde

Browse files
Merge pull request #274232 from RoseHJM/ade-extensibility-env-def-updates
ADE - Updates to environment definitions how-to.
2 parents e393e38 + 94bfd44 commit 03a3fde

File tree

1 file changed

+57
-27
lines changed

1 file changed

+57
-27
lines changed

articles/deployment-environments/configure-environment-definition.md

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
---
22
title: Add and configure an environment definition in a catalog
33
titleSuffix: Azure Deployment Environments
4-
description: Learn how to add and configure an environment definition to use in your Azure Deployment Environments projects.
4+
description: Learn how to add and configure an environment definition to use in ADE projects. Learn how to reference a container image to deploy your environment.
55
services: Azure Deployment Environments
66
author: RoseHJM
77
ms.author: rosemalcolm
88
ms.service: deployment-environments
99
ms.topic: how-to
10-
ms.date: 03/29/2024
10+
ms.date: 05/03/2024
1111
ms.custom: devdivchpfy22, build-2023
12+
13+
#customer intent: As a platform engineer, I want to add and configure an environment definition in a catalog so that I can provide my development teams with a curated set of predefined infrastructure as code templates to deploy environments in Azure.
1214
---
1315

1416
# Add and configure an environment definition
1517

16-
This guide explains how to add or update an environment definition in an Azure Deployment Environments catalog.
18+
This article explains how to add, update, or delete an environment definition in an Azure Deployment Environments catalog. It also explains how to reference a container image to deploy your environment.
1719

18-
In Azure Deployment Environments, you can use a [catalog](concept-environments-key-concepts.md#catalogs) to provide your development teams with a curated set of predefined [infrastructure as code (IaC)](/devops/deliver/what-is-infrastructure-as-code) templates called [environment definitions](concept-environments-key-concepts.md#environment-definitions).
20+
In Azure Deployment Environments, you use a [catalog](concept-environments-key-concepts.md#catalogs) to provide your development teams with a curated set of predefined [infrastructure as code (IaC)](/devops/deliver/what-is-infrastructure-as-code) templates called [environment definitions](concept-environments-key-concepts.md#environment-definitions).
1921

20-
An environment definition is composed of least two files:
22+
An environment definition is composed of at least two files:
2123

2224
- A template from an IaC framework. For example:
2325
- An Azure Resource Manager (ARM) template might use a file called *azuredeploy.json*.
24-
- A Bicep template might use a file called *azuredeploy.bicep*.
25-
- A Terraform template might use a file called *azuredeploy.tf*, or *azuredeploy.tf.json*.
26+
- A Bicep template might use a file called *main.bicep*.
27+
- A Terraform template might use a file called *azuredeploy.tf*.
2628
- A configuration file that provides metadata about the template. This file should be named *environment.yaml*.
2729

2830
Your development teams use the environment definitions that you provide in the catalog to deploy environments in Azure.
@@ -31,14 +33,6 @@ Microsoft offers a [sample catalog](https://aka.ms/deployment-environments/Sampl
3133

3234
After you [add a catalog](how-to-configure-catalog.md) to your dev center, the service scans the specified folder path to identify folders that contain a template and an associated environment file. The specified folder path should be a folder that contains subfolders that hold the environment definition files.
3335

34-
In this article, you learn how to:
35-
36-
> [!div class="checklist"]
37-
>
38-
> - Add an environment definition
39-
> - Update an environment definition
40-
> - Delete an environment definition
41-
4236
<a name="add-a-new-environment-definition"></a>
4337

4438
## Add an environment definition
@@ -83,32 +77,68 @@ To add an environment definition:
8377

8478
1. In your dev center, go to **Catalogs**, select the repository, and then select **Sync**.
8579

86-
:::image type="content" source="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png" alt-text="Screenshot that shows how to sync the catalog." lightbox="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png":::
80+
:::image type="content" source="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png" alt-text="Screenshot that shows how to synchronize the catalog." lightbox="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png":::
81+
82+
The service scans the repository to find new environment definitions. After you synchronize the repository, new environment definitions are available to all projects in the dev center.
83+
84+
## Use container images to deploy environments
85+
86+
ADE uses container images to define how templates for deployment environments are deployed. ADE supports ARM and 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 a standard ARM or Bicep container image to create the deployment environment.
8787

88-
The service scans the repository to find new environment definitions. After you sync the repository, new environment definitions are available to all projects in the dev center.
88+
You can create custom container images for more advanced environment deployments. For example, you can run scripts before or after the deployment. ADE supports custom container images for environment deployments, which can help deploy IaC frameworks such as Pulumi and Terraform.
8989

90-
### Specify a Terraform image
90+
The ADE team provides sample ARM and Bicep container images accessible through the Microsoft Artifact Registry (also known as the Microsoft Container Registry) to help you get started.
9191

92-
The ADE extensibility model enables you to use your own custom container image to deploy your preferred choice of IaC framework. You can build and use your own container image to execute deployments using Terraform. Learn how to [Configure a container image to execute deployments with Terraform](https://aka.ms/deployment-environments/container-image-terraform).
92+
For more information on building a custom container image, see:
93+
- [Configure a container image to execute deployments](how-to-configure-extensibility-generic-container-image.md)
94+
- [Configure container image to execute deployments with ARM and Bicep](how-to-configure-extensibility-bicep-container-image.md)
95+
- [Configure a container image to execute deployments with Terraform](how-to-configure-extensibility-terraform-container-image.md)
9396

94-
When creating environment definitions that use a custom image in their deployment, the runner property provides a link to a container registry where this container image is stored.
97+
### Specify the ARM or Bicep sample container image
98+
In the environment.yaml file, the runner property specifies the location of the 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.
9599

96-
The runner property specifies the location of the image you want to use. When you're using a Terraform image from a container registry, edit the runner property to specify the location that image, as shown in the following example:
100+
| IaC framework | Runner value |
101+
|---------------|--------------|
102+
| ARM | ARM |
103+
| Bicep | Bicep |
104+
| Terraform | No sample image. Use a custom container image instead. |
97105

106+
The following example shows a runner that references the sample Bicep container image:
98107
```yaml
99-
runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}"
108+
name: WebApp
109+
version: 1.0.0
110+
summary: Azure Web App Environment
111+
description: Deploys a web app in Azure without a datastore
112+
runner: Bicep
113+
templatePath: azuredeploy.json
100114
```
101115

102-
### Specify an ARM or Bicep image
116+
### Specify a custom container image
103117

104-
The ADE team provides sample ARM and Bicep templates accessible through the Microsoft Artifact registry (also known as the Microsoft Container Registry) to help you get started. When you perform deployments by using ARM or Bicep, you can use the standard image that is published on [Microsoft Artifact Registry](https://mcr.microsoft.com/) (previously known as the Microsoft Container Registry).
118+
To use a custom container image stored in a repository, use the following runner format in the environment.yaml file:
119+
```yaml
120+
runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}”`
121+
```
122+
123+
Edit the runner value to reference your repository and custom image, as shown in the following example:
105124

106-
To use the sample image published on the Microsoft Artifact Registry, use the respective identifiers `runner: ARM` for ARM and `runner:Bicep` for Bicep deployments.
125+
```yaml
126+
name: WebApp
127+
version: 1.0.0
128+
summary: Azure Web App Environment
129+
description: Deploys a web app in Azure without a datastore
130+
runner: "{YOUR_REGISTRY}.azurecr.io/{YOUR_REPOSITORY}:{YOUR_TAG}"
131+
templatePath: azuredeploy.json
132+
```
107133
108-
For more information how to build and utilize ARM or Bicep container images within environment definitions, see [Configure container image to execute deployments with ARM and Bicep](https://aka.ms/deployment-environments/container-image-bicep).
134+
| Property | Description |
135+
|----------|--------------|
136+
| YOUR_REGISTRY | The registry that stores the custom image. |
137+
| YOUR_REPOSITORY | Your repository on that registry. |
138+
| YOUR_TAG | A tag such as a version number. |
109139
110140
111-
### Specify parameters for an environment definition
141+
## Specify parameters for an environment definition
112142
113143
You can specify parameters for your environment definitions to allow developers to customize their environments.
114144

0 commit comments

Comments
 (0)