Get started using Azure Developer CLI (preview)

Run a Node.js template

Let's put the basic Azure Developer CLI (azd) commands to the test and run one of our Node.js template applications. We'll use the ToDo Application with a Node.js API and Azure Cosmos DB for MongoDB for this guide.

Upon completion, you'll get the code in your development environment and be able to run commands to build, deploy, and monitor the app in Azure.

Select your preferred environment to continue:

Prerequisites

Run up command

  1. In File Explorer or a terminal, create a new empty directory, and change into it.

  2. Run the following command:

azd up --template todo-nodejs-mongo

Provide parameters

When you run the azd up command, you'll be prompted to provide the following information:

Parameter Description
Environment Name Prefix for the resource group that will be created to hold all Azure resources. What is an Environment Name in azd? You can always create a new environment with azd env new.
Azure Location The Azure location where your resources will be deployed.
Azure Subscription The Azure Subscription where your resources will be deployed.

This process may take some time to complete, as the azd up command:

  • Downloads code
  • Initializes your project (azd init)
  • Creates and configures all necessary Azure resources (azd provision), including:
    • Access policies and roles for your account
    • Service-to-service communication with Managed Identities
  • Deploys the code (azd deploy)

Once you've provided the necessary parameters and the azd up command completes, the CLI displays two Azure portal links to view resources created:

  • ToDo API app
  • ToDo web app frontend

Screenshot of command output listing endpoint URLs.

What happened?

Upon successful completion of the azd up command:

Note

You can call azd up as many times as you like to both provision and deploy your solution, but you only need to provide the --template parameter the first time you call it to get the code locally. Subsequent azd up calls do not require the template parameter. If you do provide the parameter, all your local source code will be overwritten if you agree to overwrite when prompted.

Run a Python template

Let's put the basic Azure Developer CLI (azd) commands to the test and run one of our Python template applications. We'll use the ToDo Application with a Python API and Azure Cosmos DB for MongoDB for this guide.

Upon completion, you'll get the code in your development environment and be able to run commands to build, deploy, and monitor the app in Azure.

Select your preferred environment to continue:

Pre-requisites

Create and activate a Python virtual environment

In this guide, the app uses Python Virtual Environments to isolate Python package installations. Start by creating and activating a virtual environment.

Run up command

  1. In File Explorer or a terminal, create a new empty directory, and change into it.

  2. Run the following command:

azd up --template todo-python-mongo

Provide parameters

When you run the azd up command, you'll be prompted to provide the following information:

Parameter Description
Environment Name Prefix for the resource group that will be created to hold all Azure resources. What is an Environment Name in azd? You can always create a new environment with azd env new.
Azure Location The Azure location where your resources will be deployed.
Azure Subscription The Azure Subscription where your resources will be deployed.

This process may take some time to complete, as the azd up command:

  • Downloads code
  • Initializes your project (azd init)
  • Creates and configures all necessary Azure resources (azd provision), including:
    • Access policies and roles for your account
    • Service-to-service communication with Managed Identities
  • Deploys the code (azd deploy)

Once you've provided the necessary parameters and the azd up command completes, the CLI displays two Azure portal links to view resources created:

  • ToDo API app
  • ToDo web app frontend

Screenshot of command output listing endpoint URLs.

What happened?

Upon successful completion of the azd up command:

Note

You can call azd up as many times as you like to both provision and deploy your solution, but you only need to provide the --template parameter the first time you call it to get the code locally. Subsequent azd up calls do not require the template parameter. If you do provide the parameter, all your local source code will be overwritten if you agree to overwrite when prompted.

Run a C# template

Let's put the basic Azure Developer CLI (azd) commands to the test and run one of our C# template applications. We'll use the ToDo Application with a C# API and Azure Cosmos DB for NoSQL for this guide.

Upon completion, you'll get the code in your development environment and be able to run commands to build, deploy, and monitor the app in Azure.

Select your preferred environment to continue:

Pre-requisites

Run up command

  1. In File Explorer or a terminal, create a new empty directory, and change into it.

  2. Run the following command:

azd up --template todo-csharp-cosmos-sql

Provide parameters

When you run the azd up command, you'll be prompted to provide the following information:

Parameter Description
Environment Name Prefix for the resource group that will be created to hold all Azure resources. What is an Environment Name in azd? You can always create a new environment with azd env new.
Azure Location The Azure location where your resources will be deployed.
Azure Subscription The Azure Subscription where your resources will be deployed.

This process may take some time to complete, as the azd up command:

  • Downloads code
  • Initializes your project (azd init)
  • Creates and configures all necessary Azure resources (azd provision), including:
    • Access policies and roles for your account
    • Service-to-service communication with Managed Identities
  • Deploys the code (azd deploy)

Once you've provided the necessary parameters and the azd up command completes, the CLI displays two Azure portal links to view resources created:

  • ToDo API app
  • ToDo web app frontend

Screenshot of command output listing endpoint URLs.

What happened?

Upon successful completion of the azd up command:

Note

You can call azd up as many times as you like to both provision and deploy your solution, but you only need to provide the --template parameter the first time you call it to get the code locally. Subsequent azd up calls do not require the template parameter. If you do provide the parameter, all your local source code will be overwritten if you agree to overwrite when prompted.

Run a Java template

Let's put the basic Azure Developer CLI (azd) commands to the test and run one of our Java template applications. We'll use the ToDo Application with a Java API and Azure Cosmos DB API for MongoDB for this guide.

Upon completion, you'll get the code in your development environment and be able to run commands to build, deploy, and monitor the app in Azure.

Select your preferred environment to continue:

Pre-requisites

Run up command

  1. In File Explorer or a terminal, create a new empty directory, and change into it.

  2. Run the following command:

azd up --template todo-java-mongo

Provide parameters

When you run the azd up command, you'll be prompted to provide the following information:

Parameter Description
Environment Name Prefix for the resource group that will be created to hold all Azure resources. What is an Environment Name in azd? You can always create a new environment with azd env new.
Azure Location The Azure location where your resources will be deployed.
Azure Subscription The Azure Subscription where your resources will be deployed.

This process may take some time to complete, as the azd up command:

  • Downloads code
  • Initializes your project (azd init)
  • Creates and configures all necessary Azure resources (azd provision), including:
    • Access policies and roles for your account
    • Service-to-service communication with Managed Identities
  • Deploys the code (azd deploy)

Once you've provided the necessary parameters and the azd up command completes, the CLI displays two Azure portal links to view resources created:

  • ToDo API app
  • ToDo web app frontend

Screenshot of command output listing endpoint URLs.

What happened?

Upon successful completion of the azd up command:

Note

You can call azd up as many times as you like to both provision and deploy your solution, but you only need to provide the --template parameter the first time you call it to get the code locally. Subsequent azd up calls do not require the template parameter. If you do provide the parameter, all your local source code will be overwritten if you agree to overwrite when prompted.

Clean up resources

When you no longer need the resources created in this article, run the following command to power down the app:

azd down

Next steps