Translated from Savannah Ostrowski's blog
Today, we're excited to announce the public preview of the Azure Developer CLI (azd) - a new open source tool that accelerates the time it takes to get started with Azure. The Azure Developer CLI provides developer-friendly commands that map to key stages in the workflow, such as code, build, deploy, monitor, repeat. Creating, configuring and deploying a new application in one step is as simple as:
azd up --template todo-nodejs-mongo
You can use the Azure Developer CLI with extensible templates that contain everything you need to get your application up and running in Azure. They also include best practices, application code, and reusable infrastructure as code assets.
The new Azure Developer CLI builds on the experience and foundation of the Azure CLI. You can use both tools together as needed to support your Azure workflows. Want to get up to speed on the Azure Developer CLI? Check out our Developer Center .
Tools to help developers code for the cloud
As a developer, there are many decisions you need to make when building, deploying, and securing your application, and you may be wondering:
- Which cloud services should I use?
- Which libraries do I need to use?
- How should I setup my local development environment?
- How do I configure the necessary infrastructure for my application?
- How do I know what I'm doing includes security best practices?
The Azure Developer CLI can help you answer these questions. It gives you a clear path to building applications in the cloud.
Using the Azure Developer CLI, a typical developer workflow looks like this:
- azd init: Create an application and initialize the environment using sample templates in your favorite language.
- azd provision: Provision the necessary resources for an application on Azure.
- azd deploy: Deploy the application to Azure.
- azd monitor: Monitor application behavior and performance and verify deployments.
- azd pipeline config: Create and manage CI/CD (Continuous Integration and Continuous Delivery).
Even better, you can also use azd up to create, configure, and deploy new applications in one step. See the Developer CLI reference documentation for a list of supported commands. Alternatively, you can run azd -h from your favorite terminal after installation. If you don't want or no longer need the resource you created, you can run azd down.
Whether working in a terminal, editor or IDE such as Visual Studio Code or Visual Studio, or a GitHub Actions pipeline, Azure Dveloper CLI commands remain consistent regardless of context.
Application Templates for Python, JavaScript/TypeScript and C#
The Azure Developer CLI uses idiomatic application templates that go beyond "Hello World!", including "scaffolding" for monitoring and CI/CD to better facilitate your application development. Each template contains the application code, an /infra directory that contains all the infrastructure code files (written in Bicep) needed to provision Azure resources, and an azure.yaml file that describes the application. These templates can be extended and customized for your specific use case.
In the first preview, we wrote an initial set of template apps written in Python, JavaScript/TypeScript, and C# for Azure App Service, Azure Container Apps, and Azure Static Web Apps + Function Apps, among others . The list of templates is constantly expanding, please check it out.
Get started with the Azure Developer CLI
Installation Instructions: Install prerequisites
After that, install the standalone Azure Developer CLI via the following command in your preferred terminal.
Windows
powershell -ex AllSigned -c "Invoke-RestMethod ' https://aka.ms/uninstall-azd.ps1 ' | Invoke-Expression"
macOS/Linux
curl -fsSL https://aka.ms/install-azd.sh | bash
Editor and IDE Support
▌Visual Studio Code
From now on, you can also access preview Azure Developer CLI features from within Visual Studio Code and Visual Studio. You can try it out by installing our VS Code extension from the VS Code Marketplace, where you can use all Azure Developer CLI commands.
▌Visual Studio
In Visual Studio 2022 17.3 Preview 2 or later, you can enable the CLI by clicking the "Integrate with azd, Azure Developer CLI" Preview Features flag by going to: Tools > Options > Environment > Preview Features > Integrate with azd, Azure Developer CLI. This allows Visual Studio to detect the existence of a solution created using the Azure Developer CLI in the terminal.
What's our next step?
During the public preview, we want to hear your thoughts and suggestions as we continue to improve the developer experience built on Azure. Based on feedback received during the private preview, we are also currently prioritizing adding support for the following: Java Language Templates, Azure Kubernetes Service Templates, Azure Pipelines Support, Terraform Support. Feedback and Contribution
▌ Contribute to the CLI
The Developer CLI is an open-source, MIT-licensed product. Our team is excited to work with you and intends to make the Azure Developer CLI a community-driven product. Contributions to the core Developer CLI codebase in the form of templates are welcome. You are welcome to submit issues, pull requests, participate in discussions, and more through the GitHub repo .
▌Creating templates
Our team has created templates for some key Python, JavaScript/TypeScript, and C#, and plans to create more in the future to cover more developer scenarios. If you want to author your own templates, you can add the azd-templates tag to your repo on GitHub. You can also open an issue on our GitHub repo if you would like to see use cases and templates created.
Want to get up to speed on the Azure Developer CLI? Check out our Developer Center.
Long press to identify the QR code
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。