Azure Developer Command Line Interface open-source tool to accelerate the time it takes to deploy

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

As a developer, you need to make decisions when it comes to building, deploying, and securing your application.
Frequent questions you might ask are:

  • Which cloud services should I use with my code?
  • Which libraries do I need to use?
  • How should I set up my local development environment?
  • How do I provision the necessary infrastructure for my application?
  • How do I know that what I’m doing incorporates security best practices?

The Azure Developer CLI helps you answer these questions. It provides you with a clear path for building your application in the cloud. Azure Developer CLI (azd) —a new, open-source tool that accelerates the time it takes to get started on Azure. The Azure Developer CLI provides developer-friendly commands that map to key stages in your workflow: code, build, deploy, monitor, repeat. The new Azure Developer CLI builds upon the experience and foundations of the Azure CLI. You can use both tools together, as needed, to support your Azure workflow.

 

For a quick intro to the Azure Developer CLI, be sure to check out our Developer Hub!

With the Azure Developer CLI, a typical developer workflow looks like this:

  1. azd init: Create an application and initialize an environment using a sample template in your preferred language.
  2. azd provision: Provision the necessary resources for your application on Azure.
  3. azd deploy: Deploy your application to Azure.
  4. azd monitor: Monitor your application’s behavior and performance and validate deployments.
  5. azd pipeline config: Create and manage CI/CD (continuous integration and continuous delivery).

Better yet, you can also use azd up to create, provision, and deploy a new application in one step! For a list of supported commands, see the Developer CLI reference docs.


azd-developer-workflow

Application templates for Python, JavaScript/TypeScript, and C#

The Azure Developer CLI uses idiomatic application templates that extend beyond “Hello World!” to include the scaffolding for monitoring and CI/CD for your application.


Each template includes application code, an /infra directory containing all the infra-as-code files (written in Bicep) needed to provision the Azure resources, and an azure.yaml file that describes your application. These templates are extensible and customizable to your specific use case. There are an initial set of template applications written in Python, JavaScript/TypeScript, and C# and for hosts such as Azure App Service, Azure Container Apps, and Azure Static Web Apps + Function Apps. 

 

Get started with the Azure Developer CLI

Whether you’re working in the terminal, your editor or IDE (like Visual Studio Code or Visual Studio), or your GitHub Actions pipeline, Azure Developer CLI commands remain consistent regardless of the context. 

 

Installation Instructions

Once you’ve installed the prerequisites, install the standalone Azure Developer CLI via the following command in your preferred terminal.

 

Windows

powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"

 

macOS/Linux

curl -fsSL https://aka.ms/install-azd.sh | bash

 

Editor and IDE Support

Visual Studio Code

As of today, you can also access preview Azure Developer CLI functionality from within both Visual Studio Code and Visual Studio. You can try out our Visual Studio Code extension by installing it from the Visual Studio Code Marketplace. From the VS Code extension, you can use all the Azure Developer CLI commands.

 

azd-vscode

Visual Studio

In Visual Studio 2022 17.3 Preview 2 or later, you can enable the CLI by flipping the Integration with azd, the Azure Developer CLI preview feature flag (Tools > Options > Environment > Preview Features > Integration with azd, the Azure Developer CLI). Enabling this flag will enable Visual Studio to detect the presence of a solution that was created with the Azure Developer CLI in the terminal.

LeeStott_0-1661853408823.png

 

Feedback + Contributions


Contributing to the CLI

The Developer CLI is an open-source, MIT-licensed product! Our team is excited to collaborate with all of you and intends for the Azure Developer CLI to be community-driven. We welcome contributions to the core Developer CLI codebase and in the form of templates. Our team encourages you to file issues, open pull requests, contribute to discussions and more via our GitHub repository.


Authoring Templates

If you author your own templates, you can add the azd-templates tag to your repository on GitHub. That way, other developers can find, fork, and build upon your template for their own use case. You can also open an issue on our GitHub repository if there’s a use case and template that you would like to see created.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.