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
+44-45Lines changed: 44 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
-
title: Add and configure an environment definition in a catalog
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 ADE projects. Learn how to reference a container image to deploy your environment.
4
+
description: Learn how to add and configure an environment definition to use in Azure Deployment Environments projects.
5
5
services: Azure Deployment Environments
6
6
author: RoseHJM
7
7
ms.author: rosemalcolm
8
8
ms.service: azure-deployment-environments
9
9
ms.topic: how-to
10
-
ms.date: 05/03/2024
10
+
ms.date: 07/25/2025
11
11
ms.custom:
12
12
- devdivchpfy22
13
13
- build-2023
@@ -20,7 +20,7 @@ ms.custom:
20
20
21
21
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.
22
22
23
-
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).
23
+
In 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).
24
24
25
25
An environment definition is composed of at least two files:
26
26
@@ -32,15 +32,15 @@ An environment definition is composed of at least two files:
32
32
33
33
Your development teams use the environment definitions that you provide in the catalog to deploy environments in Azure.
34
34
35
-
Microsoft offers a [sample catalog](https://aka.ms/deployment-environments/SampleCatalog) that you can use as your repository. You can also use your own private repository, or you can fork and customize the environment definitions in the sample catalog.
35
+
Microsoft provides a [sample catalog](https://aka.ms/deployment-environments/SampleCatalog) that you can use as your repository. You can also use your own private repository, or you can fork and customize the environment definitions in the sample catalog.
36
36
37
37
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.
38
38
39
39
<aname="add-a-new-environment-definition"></a>
40
40
41
41
## Add an environment definition
42
42
43
-
To add an environment definition to a catalog in Azure Deployment Environments (ADE), you first add the files to the repository. You then synchronize the dev center catalog with the updated repository.
43
+
To add an environment definition to a catalog in Deployment Environments, you first add the files to the repository. You then synchronize the dev center catalog with the updated repository.
44
44
45
45
To add an environment definition:
46
46
@@ -52,9 +52,9 @@ To add an environment definition:
52
52
53
53
- An environment as a YAML file.
54
54
55
-
The *environment.yaml* file contains metadata related to the IaC template.
55
+
The environment.yaml file contains metadata related to the IaC template.
56
56
57
-
The following script is an example of the contents of an *environment.yaml* file for an ARM template:
57
+
The following script is an example of the contents of an environment.yaml file for an ARM template:
58
58
59
59
```yaml
60
60
name: WebApp
@@ -65,48 +65,47 @@ To add an environment definition:
65
65
templatePath: azuredeploy.json
66
66
```
67
67
68
-
Use the following table to understand the fields in the *environment.yaml* file:
68
+
This table describes the fields in the environment.yaml file:
69
69
70
70
| Field | Description |
71
71
|-------|-------------|
72
-
| name | The name of the environment definition. |
73
-
| version | The version of the environment definition. This field is optional. |
74
-
| summary | A brief description of the environment definition. |
75
-
| description | A detailed description of the environment definition. |
76
-
| runner | The IaC framework that the template uses. The value can be `ARM` or `Bicep`. You can also specify a path to a template stored in a container registry. |
77
-
| templatePath | The path to the IaC template file. |
72
+
| `name` | The name of the environment definition. |
73
+
| `version` | The version of the environment definition. This field is optional. |
74
+
| `summary` | A brief description of the environment definition. |
75
+
| `description` | A detailed description of the environment definition. |
76
+
| `runner` | The IaC framework that the template uses. The value can be `ARM` or `Bicep`. You can also specify a path to a template stored in a container registry. |
77
+
| `templatePath` | The path to the IaC template file. |
78
78
79
-
To learn more about the options and data types you can use in *environment.yaml*, see [Parameters and data types in environment.yaml](concept-environment-yaml.md#what-is-environmentyaml).
79
+
To learn more about the options and data types you can use in environment.yaml, see [Parameters and data types in environment.yaml](concept-environment-yaml.md#what-is-environmentyaml).
80
80
81
-
1. In your dev center, go to **Catalogs**, select the repository, and then select **Sync**.
81
+
1. In your dev center, under **Environment configuration**, select **Catalogs**. Select the repository, and then select **Sync**.
82
82
83
-
:::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":::
83
+
:::image type="content" source="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png" alt-text="Screenshot that shows how to synchronize a catalog." lightbox="../deployment-environments/media/configure-environment-definition/sync-catalog-list.png":::
84
84
85
85
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.
86
86
87
87
## Use container images to deploy environments
88
88
89
-
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.
89
+
Deployment Environments uses container images to define how templates for deployment environments are deployed. Deployment Environments 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. Deployment Environments then uses a standard ARM or Bicep container image to create the deployment environment.
90
90
91
-
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.
91
+
You can create custom container images for more advanced environment deployments. For example, you can run scripts before or after the deployment. Deployment Environments supports custom container images for environment deployments, which can help deploy IaC frameworks such as Pulumi and Terraform.
92
92
93
-
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.
93
+
To get started, you can get sample ARM and Bicep container images via the Microsoft Artifact Registry (also known as the Microsoft Container Registry).
94
94
95
-
For more information on building a custom container image, see:
96
-
- [Configure a container image to execute deployments](how-to-configure-extensibility-generic-container-image.md)
97
-
- [Configure container image to execute deployments with ARM and Bicep](how-to-configure-extensibility-bicep-container-image.md)
98
-
- [Configure a container image to execute deployments with Terraform](how-to-configure-extensibility-terraform-container-image.md)
95
+
For more information on building a custom container image, see [Configure a container image to execute deployments](how-to-configure-extensibility-generic-container-image.md).
99
96
100
97
### Specify the ARM or Bicep sample container image
101
-
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.
102
98
103
-
| IaC framework | Runner value |
99
+
In the environment.yaml file, the `runner` property specifies the location of the image you want to use. To use the sample image published in the Microsoft Artifact Registry, use the `runner` values listed in the following table.
100
+
101
+
| IaC framework | `runner` value |
104
102
|---------------|--------------|
105
103
| ARM | ARM |
106
104
| Bicep | Bicep |
107
105
| Terraform | No sample image. Use a custom container image instead. |
108
106
109
-
The following example shows a runner that references the sample Bicep container image:
107
+
The following example shows a `runner` property that references the sample Bicep container image:
108
+
110
109
```yaml
111
110
name: WebApp
112
111
version: 1.0.0
@@ -118,12 +117,13 @@ The following example shows a runner that references the sample Bicep container
118
117
119
118
### Specify a custom container image
120
119
121
-
To use a custom container image stored in a repository, use the following runner format in the environment.yaml file:
120
+
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:
126
+
Edit the `runner` value to reference your repository and custom image, as shown in this example:
127
127
128
128
```yaml
129
129
name: WebApp
@@ -137,17 +137,16 @@ Edit the runner value to reference your repository and custom image, as shown in
137
137
| Property | Description |
138
138
|----------|--------------|
139
139
| YOUR_REGISTRY | The registry that stores the custom image. |
140
-
| YOUR_REPOSITORY | Your repository on that registry. |
141
-
| YOUR_TAG | A tag such as a version number. |
142
-
140
+
| YOUR_REPOSITORY | Your repository in that registry. |
141
+
| YOUR_TAG | A tag, such as a version number. |
143
142
144
143
## Specify parameters for an environment definition
145
144
146
145
You can specify parameters for your environment definitions to allow developers to customize their environments.
147
146
148
-
Parameters are defined in the *environment.yaml* file.
147
+
Parameters are defined in the environment.yaml file.
149
148
150
-
The following script is an example of an *environment.yaml* file for an ARM template that includes two parameters;`location` and `name`:
149
+
The following script is an example of an environment.yaml file for an ARM template that includes two parameters:`location` and `name`.
151
150
152
151
```YAML
153
152
name: WebApp
@@ -164,19 +163,19 @@ parameters:
164
163
required: false
165
164
- id: "name"
166
165
name: "name"
167
-
description: "Name of the Web App "
166
+
description: "Name of the web app "
168
167
default: ""
169
168
type: "string"
170
169
required: false
171
170
```
172
171
173
-
To learn more about the parameters and their data types that you can use in *environment.yaml*, see [Parameters and data types in environment.yaml](concept-environment-yaml.md#parameters-in-environmentyaml).
172
+
For more information, see [Parameters and data types in environment.yaml](concept-environment-yaml.md#parameters-in-environmentyaml).
174
173
175
-
Developers can supply values for specific parameters for their environments through the [developer portal](https://devportal.microsoft.com).
174
+
Developers can supply values for specific parameters for their environments via the [developer portal](https://devportal.microsoft.com).
176
175
177
-
:::image type="content" source="media/configure-environment-definition/parameters.png" alt-text="Screenshot of the developer portal of the developer portal showing the parameters pane." lightbox="media/configure-environment-definition/parameters.png":::
176
+
:::image type="content" source="media/configure-environment-definition/parameters.png" alt-text="Screenshot of the parameters pane in the developer portal.":::
178
177
179
-
Developers can also supply values for specific parameters for their environments through the CLI.
178
+
Developers can also supply values for specific parameters for their environments via the Azure CLI:
180
179
181
180
```azurecli
182
181
az devcenter dev environment create --environment-definition-name
@@ -193,19 +192,19 @@ az devcenter dev environment create --environment-definition-name
193
192
[--user-id]
194
193
```
195
194
196
-
To learn more about the `az devcenter dev environment create` command, see the [Azure CLI devcenter extension](/cli/azure/devcenter/dev/environment).
195
+
To learn more about the `az devcenter dev environment create` command, see [Azure CLI devcenter extension](/cli/azure/devcenter/dev/environment).
197
196
198
197
## Update an environment definition
199
198
200
-
To modify the configuration of Azure resources in an existing environment definition in Azure Deployment Environments, update the associated template file in the repository. The change is immediately reflected when you create a new environment by using the specific environment definition. The update also is applied when you redeploy an environment associated with that environment definition.
199
+
To modify the configuration of Azure resources in an existing environment definition in Deployment Environments, update the associated template file in the repository. The change is immediately reflected when you create a new environment by using the specific environment definition. The update is also applied when you redeploy an environment associated with that environment definition.
201
200
202
-
To update any metadata related to the template, modify *environment.yaml*, and then [update the catalog](how-to-configure-catalog.md#update-a-catalog).
201
+
To update any metadata related to the template, modify environment.yaml, and then [update the catalog](how-to-configure-catalog.md#update-a-catalog).
203
202
204
203
## Delete an environment definition
205
204
206
-
To delete an existing environment definition, in the repository, delete the subfolder that contains the template file and the associated environment YAML file. Then, [update the catalog](how-to-configure-catalog.md#update-a-catalog).
205
+
To delete an environment definition, in the repository, delete the subfolder that contains the template file and the associated environment.yaml file. Then [update the catalog](how-to-configure-catalog.md#update-a-catalog).
207
206
208
-
After you delete an environment definition, development teams can no longer use the specific environment definition to deploy a new environment. Update the environment definition reference for any existing environments that use the deleted environment definition. If the reference isn't updated and the environment is redeployed, the deployment fails.
207
+
After you delete an environment definition, development teams can no longer use it to deploy a new environment. Update the environment definition reference for any existing environments that use the deleted environment definition. If the reference isn't updated and the environment is redeployed, the deployment fails.
0 commit comments