You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/deployment-environments/configure-environment-definition.md
+57-27Lines changed: 57 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,30 @@
1
1
---
2
2
title: Add and configure an environment definition in a catalog
3
3
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.
5
5
services: Azure Deployment Environments
6
6
author: RoseHJM
7
7
ms.author: rosemalcolm
8
8
ms.service: deployment-environments
9
9
ms.topic: how-to
10
-
ms.date: 03/29/2024
10
+
ms.date: 05/03/2024
11
11
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.
12
14
---
13
15
14
16
# Add and configure an environment definition
15
17
16
-
This guide explains how to addor 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.
17
19
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).
19
21
20
-
An environment definition is composed of least two files:
22
+
An environment definition is composed of at least two files:
21
23
22
24
- A template from an IaC framework. For example:
23
25
- 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*.
26
28
- A configuration file that provides metadata about the template. This file should be named *environment.yaml*.
27
29
28
30
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
31
33
32
34
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.
33
35
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
-
42
36
<aname="add-a-new-environment-definition"></a>
43
37
44
38
## Add an environment definition
@@ -83,32 +77,68 @@ To add an environment definition:
83
77
84
78
1. In your dev center, go to **Catalogs**, select the repository, and then select **Sync**.
85
79
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.
87
87
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.
89
89
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.
91
91
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)
93
96
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.
95
99
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. |
97
105
106
+
The following example shows a runner that references the sample Bicep container image:
description: Deploys a web app in Azure without a datastore
112
+
runner: Bicep
113
+
templatePath: azuredeploy.json
100
114
```
101
115
102
-
### Specify an ARM or Bicep image
116
+
### Specify a custom container image
103
117
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:
Edit the runner value to reference your repository and custom image, as shown in the following example:
105
124
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
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. |
109
139
110
140
111
-
### Specify parameters for an environment definition
141
+
## Specify parameters for an environment definition
112
142
113
143
You can specify parameters for your environment definitions to allow developers to customize their environments.
0 commit comments