Skip to content

Commit 62b35e0

Browse files
author
RoseHJM
committed
First draft
1 parent 4392d61 commit 62b35e0

File tree

1 file changed

+51
-43
lines changed

1 file changed

+51
-43
lines changed
Lines changed: 51 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,69 @@
11
---
2-
title:
3-
description:
2+
title: Use Azure Developer CLI with Azure Deployment Environments
3+
description: Understand ADE and `azd` work together to provision application infrastructure and deploy application code to the new infrastructure.
44
author: RoseHJM
55
ms.author: rosemalcolm
66
ms.service: dev-box
77
ms.topic: concept-article
88
ms.date: 02/24/2024
99

10-
# Customer intent: As a platform engineer, I want to understand how to use ADE and AZD together to provision application infrastructure and deploy application code to the new infrastructure.
10+
# Customer intent: As a platform engineer, I want to understand ADE and `azd` work together to provision application infrastructure and deploy application code to the new infrastructure.
1111

1212
---
1313

14-
# Use Azure Developer CLI templates with Azure Deployment Environments
14+
# Use Azure Developer CLI with Azure Deployment Environments
1515

16-
In this article, you learn how to use the Azure Developer CLI (azd) with Azure Deployment Environments (ADE) to provision application infrastructure and deploy application code to the new infrastructure.
16+
In this article, you learn about Azure Developer CLI (`azd`) and how it works with Azure Deployment Environments (ADE) to provision application infrastructure and deploy application code to the new infrastructure.
17+
18+
With ADE, you can create environments from an environment definition in a catalog attached to your dev center. By adding `azd`, you can deploy your application code to the new infrastructure.
1719

1820
## What is the Azure Developer CLI?
1921

20-
The Azure Developer CLI (`azd`) is an open-source command-line tool that provides developer-friendly commands that map to key stages in your workflow, whether you're working in the terminal, your preferred local development environment (e.g. editor or integrated development environment (IDE)), or CI/CD (continuous integration/continuous deployment) pipelines. You can install `azd` locally on your machine or use it in other environments.
22+
The Azure Developer CLI (`azd`) is an open-source command-line tool that provides developer-friendly commands that map to key stages in your workflow. You can install `azd` locally on your machine or use it in other environments.
2123

22-
### AZD commands
23-
`azd` is designed to have a minimal number of commands with a small number of parameters for ease of use. Some of the most common azd commands you'll use include:
24+
<!-- more context here -->
2425

25-
- azd init - Initialize a new application.
26-
- azd up - Provision Azure resources and deploy your project with a single command.
27-
- azd provision - Provision the Azure resources for an application.
28-
- azd deploy - Deploy the application code to Azure.
29-
- azd pipeline - (Beta) Manage and configure your deployment pipelines.
30-
- azd auth - Authenticate with Azure.
31-
- azd config - Manage azd configurations (e.g. default Azure subscription, location).
32-
- azd down - Delete Azure resources for an application.
3326

3427
## How does `azd` work with ADE?
3528

36-
`azd` works with Azure Deployment Environments (ADE) to enable you to create environments from where you’re working.
37-
38-
`azd` working with ADE supports the following scenarios:
39-
- Create an environment from code in a local folder
40-
- This technique works well for individual developers working with unique infrastructure and code that they want to upload to the cloud.
41-
- They can use `azd` to provision an environment and to deploy their code.
42-
-
43-
- Create an environment from an `azd` compatible template
44-
- For use at scale, you can create multiple ADE environments from an `azd` compatible template. You can create a new `azd`-compatible template, or you can use an existing environment definition from the Azure Deployment Environments dev center catalog.
45-
- If you choose to use an existing environment definition, you will need to make a few changes to make it compatible with `azd`.
29+
`azd` works with ADE to enable you to create environments from where you’re working.
4630

31+
With ADE and `azd`, individual developers working with unique infrastructure and code that they want to upload to the cloud can create an environment from a local folder. They can use `azd` to provision an environment and deploy their code seamlessly.
4732

48-
<!-- intro paragraph & point to: https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/ade-integration -->
33+
At scale, using ADE and `azd` together enables you to provide a way for developers to create app infrastructure and code. Your team can create multiple ADE environments from the same `azd` compatible environment definition, and provision code to the cloud in a consistent way.
4934

50-
## `azd` templates
35+
## Understand `azd` templates
5136

5237
The Azure Developer CLI commands are designed to work with standardized templates. Each template is a code repository that adheres to specific file and folder conventions. The templates contain the assets `azd` needs to provision an Azure Deployment Environment environment. When you run a command like `azd up`, the tool uses the template assets to execute various workflow steps, such as provisioning or deploying resources to Azure.
5338

54-
All azd templates include the following assets:
39+
All `azd` templates include the following assets:
5540

5641
```txt
42+
├── infra [ Contains infrastructure as code files ]
5743
├── .azdo [ Configures an Azure Pipeline ]
5844
├── .devcontainer [ For DevContainer ]
5945
├── .github [ Configures a GitHub workflow ]
6046
├── .vscode [ VS Code workspace configurations ]
6147
├── .azure [ Stores Azure configurations and environment variables ]
48+
├── src [ Contains all of the deployable app source code ]
6249
└── azure.yaml [ Describes the app and type of Azure resources]
6350
```
6451

65-
- infra folder - Not used in azd with ADE - ADE provides the infrastructure as code files for the azd template. You don't need to include these files in your azd template.
52+
- *infra folder* - Contains all of the Bicep or Terraform infrastructure as code files for the azd template. The infra folder is not used in `azd` with ADE. ADE provides the infrastructure as code files for the `azd` template. You don't need to include these files in your `azd` template.
6653

67-
- azure.yaml file - A configuration file that defines one or more services in your project and maps them to Azure resources for deployment. For example, you might define an API service and a web front-end service, each with attributes that map them to different Azure resources for deployment.
54+
- *azure.yaml file* - A configuration file that defines one or more services in your project and maps them to Azure resources for deployment. For example, you might define an API service and a web front-end service, each with attributes that map them to different Azure resources for deployment.
6855

69-
- .azure folder - Contains essential Azure configurations and environment variables, such as the location to deploy resources or other subscription information.
56+
- *.azure folder* - Contains essential Azure configurations and environment variables, such as the location to deploy resources or other subscription information.
7057

71-
- src folder - Contains all of the deployable app source code. Some azd templates only provide infrastructure assets and leave the src directory empty for you to add your own application code.
58+
- *src folder* - Contains all of the deployable app source code. Some `azd` templates only provide infrastructure assets and leave the src directory empty for you to add your own application code.
7259

73-
Most azd templates also optionally include one or more of the following folders:
60+
Most `azd` templates also optionally include one or more of the following folders:
7461

75-
- .devcontainer folder - Allows you to set up a Dev Container environment for your application. This is a common development environment approach that is not specific to azd.
62+
- *.devcontainer folder* - Allows you to set up a Dev Container environment for your application. This is a common development environment approach that isn't specific to azd.
7663

77-
- .github folder - Holds the CI/CD workflow files for GitHub Actions, which is the default CI/CD provider for azd.
64+
- *.github folder* - Holds the CI/CD workflow files for GitHub Actions, which is the default CI/CD provider for azd.
7865

79-
- .azdo folder - If you decide to use Azure Pipelines for CI/CD, define the workflow configuration files in this folder.
66+
- *.azdo folder* - If you decide to use Azure Pipelines for CI/CD, define the workflow configuration files in this folder.
8067

8168
## `azd` compatible catalogs
8269

@@ -85,21 +72,42 @@ Azure Deployment Environments catalogs consist of environment definitions: IaC t
8572
> [!NOTE]
8673
> Currently, Azure Developer CLI works with ARM templates stored in the Azure Deployment Environments dev center catalog.
8774
88-
To properly support certain Azure Compute services, Azure Developer CLI requires more configuration settings in the IaC template. For example, you must tag app service hosts with specific information so that AZD knows how to find the hosts and deploy the app to them.
75+
To properly support certain Azure Compute services, Azure Developer CLI requires more configuration settings in the IaC template. For example, you must tag app service hosts with specific information so that `azd` knows how to find the hosts and deploy the app to them.
8976

9077
You can see a list of supported Azure services here: [Supported Azure compute services (host)](/azure/developer/azure-developer-cli/supported-languages-environments).
9178

92-
To get help with AZD compatibility, see [Make your project compatible with Azure Developer CLI](/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create).
93-
9479
## Make your ADE environment definition compatible with `azd`
9580

96-
<!-- Convert your own app into an azd template - You can also convert an existing app into an azd template by following the Make your project compatible with azd guide. Creating your own template is often more work initially, but allows for the most control and produces a reusable solution for future development work on the app. -->
81+
To enable your development teams to us `azd` with ADE, you need to create an environment definition that is compatible with `azd`. You can create a new `azd`compatible template, or you can use an existing environment definition from the Azure Deployment Environments dev center catalog. If you choose to use an existing environment definition, you need to make a few changes to make it compatible with `azd`.
82+
83+
Changes include:
84+
- If you're modifying an existing `azd` template, remove the `infra` folder. ADE uses the following files to create the infrastructure:
85+
- ARM template (azuredeploy.json.)
86+
- Configuration file that defines parameters (environment.yaml or manifest.yaml)
87+
- Tag resources in *azure.yaml* with specific information so that `azd` knows how to find the hosts and deploy the app to them.
88+
- Learn about [Tagging resources for Azure Deployment Environments](/azure/developer/azure-developer-cli/ade-integration?branch=main#tagging-resources-for-azure-deployment-environments).
89+
- Learn about [Azure Developer CLI's azure.yaml schema](/azure/developer/azure-developer-cli/azd-schema).
90+
- Configure dev center settings like environment variables, `azd` environment configuration, `azd` project configuration, and user configuration.
91+
- Learn about [Configuring dev center settings](/azure/developer/azure-developer-cli/ade-integration?branch=main#configure-dev-center-settings).
92+
93+
To learn more about how to make your ADE environment definition compatible with `azd`, see [Make your project compatible with Azure Developer CLI](/azure/developer/azure-developer-cli/ade-integration).
94+
95+
## Enable `azd` support in ADE
96+
97+
To enable `azd` support with ADE, you need to set the `platform.type` to devcenter. This configuration allows `azd` to leverage new dev center components for remote environment state and provisioning, and means that the infra folder in your templates will effectively be ignored. Instead, `azd` will use one of the infrastructure templates defined in your dev center catalog for resource provisioning.
98+
99+
To enable `azd` support, run the following command:
100+
101+
```bash
102+
azd config set platform.type devcenter
103+
```
104+
### Explore `azd` commands
97105

106+
When the dev center feature is enabled, the default behavior of some common azd commands changes to work with these remote environments. For more information, see [Work with Azure Deployment Evironments](/azure/developer/azure-developer-cli/ade-integration?branch=main#work-with-azure-deployment-evironments)
98107

99108

100109
## Related content
101110

102111
- [Add and configure an environment definition](./configure-environment-definition.md)
103112
- [Create an environment by using the Azure Developer CLI](./how-to-create-environment-with-azure-developer.md)
104-
- [Make your project compatible with Azure Developer CLI](/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create)
105-
- [Supported Azure compute services (host)](/azure/developer/azure-developer-cli/supported-languages-environments)
113+
- [Make your project compatible with Azure Developer CLI](/azure/developer/azure-developer-cli/make-azd-compatible?pivots=azd-create)

0 commit comments

Comments
 (0)