September 6th, 2023

Azure Developer CLI (azd) – September 2023 Release

Savannah Ostrowski
Senior Product Manager

We’re pleased to announce that the September 2023 release (version 1.3.0) of the Azure Developer CLI (azd) is now available. As always, you can learn about how to get started with the Azure Developer CLI by visiting our official documentation.

Here’s what’s new in azd:

A simplified way to initialize your application for Azure

One of the biggest problems that application developers face is the complexity of getting their application hosted on cloud infrastructure. There are so many different services and tools to learn, and it can be difficult to know where to start. With the Azure Developer CLI, we’re continuously working to make it as easy as possible for you to get started by providing you with a single pane of glass for all your cloud development needs.

To help, we’re excited to announce an easier way to initialize your application for development and deployment to Azure. This workflow is being rolled out incrementally over the next couple of weeks. We’ll continue to support the current workflow that starts from finding and modifying a template, as many developers have found that to be a great starting point. This easy initialization flow just provides you with another option for getting your app on Azure.

With this new init flow, you can run the Azure Developer CLI over your codebase, have the CLI detect the application stack (for example, Python, React, PostgreSQL), and then generate the right configurations and Infrastructure as Code files to get your application up and running on Azure.

For this first release, we have support to host applications on Azure Container Apps. If you have Dockerfiles in the application’s source code, we use them to build container images for your application services (for example, frontend, backend) as specified in your azure.yaml. If your application isn’t yet containerized, no worries! We’ve also added support for Cloud Native Buildpacks this release (more on Buildpacks later in the blog post), which containerize your application for you.

The new and improved azd init workflow

With the new workflow, you can:

  • Run azd init in the directory where your application code lives.
  • Follow a wizard-type flow to confirm the detected stack and generate the right configurations and Infrastructure as Code files to get your application up and running on Azure.
  • Run azd up to package your application, provision infrastructure, and deploy your application to Azure.

Sometimes more configuration like specifying a database connection string or adding environment variables is needed before running azd up. You can find some helpful tips in a next-steps.md file.

 

What’s generated for me?

After walking through the flow in azd init, you’ll see a couple new files and folders in your project:

  • infra/– Contains Infrastructure as Code files (written in Bicep) that specify and configure all the Azure resources needed for your application to run in the cloud
  • azure.yaml – Used to configure the application for use with the Azure Developer CLI
  • next-steps.md – Outlines the specifics of what was generated for your project, details about the services selected, billing information, and troubleshooting tips

This init flow only adds these files to the project. We won’t update your application source code!

Rollout and feedback

The simplified init flow is an experimental feature in alpha stage. We’re rolling out the simplified initialization flow incrementally to users, starting in mid-September. If you don’t see it right away, don’t worry! It will be available soon.

With any experimental feature, we expect there to be edge cases or scenarios where it doesn’t perform perfectly. That said, we welcome and would greatly appreciate any feedback about the new simplified initialization flow. Let us know how about your experience using it on our repository. Your feedback is valuable in helping us refine the feature!

Support for Cloud Native Buildpacks

We’re excited to announce that we now support Oryx-based Cloud Native Buildpacks in the Azure Developer CLI! If you’re unfamiliar, Buildpacks are a way to transform your application code into a container image that can be run in the cloud (no Dockerfile required!).

To try out the new Buildpack support, you first need to run azd config set alpha.buildpacks on to enable the feature. After that, you can run azd package and Buildpacks are now used to create images for the services specified in your azure.yaml if you’re targeting Azure Container Apps or Azure Kubernetes Service as your host. If you do have a Dockerfile in your application service directories, we use that instead.

You can learn more about Buildpacks via the specification documentation.

Specify custom template sources for azd init

Another awesome feature new to the Azure Developer CLI is the ability to specify custom template sources. With custom template sources, you’re now able to control what templates are shown when you run azd template list or azd init without --template.

By default, we include the templates in the Awesome-azd template gallery. However, you can add or remove template sources by running azd template source add or azd template source remove respectively. For example, if I wanted to add a template source from a private repository, I could run:

azd template source add my_private_repo_name --type url --location https://github.com/contoso/my-private-repo.json

You can also specify a template source from a local directory by running:

azd template source add my_local_templates --type file --location /path/to/my/local/templates.json

You can see an example format for a template source via this JSON file, which is the default template source that’s included in the Azure Developer CLI.

Other changes and enhancements

We have also added smaller enhancements and fixed issues requested by users that should improve your experience working with the Azure Developer CLI. Some notable changes include:

  • Smaller features:
  • Bug fixes for azd core:
    • Fix coloring for OperationTypeIgnore in --preview (azure-dev#2630)
    • Costing information should be more prominent on templates (azure-dev#2480)
    • Reauthentication required: run `azd auth login“ even after logging in (azure-dev#2659)
    • Show message to the user when we’re failing to get deployment info for a resource. (azure-dev#2622)
    • Wrong README for todo-csharp-cosmos-sql (not Mongo!) (azure-dev#2527)
    • Costing information should be more prominent on templates (azure-dev#2480)
    • Short description should be added to Bicep files in /core (azure-dev#2466)
    • Give me a way to bring in the “core” Bicep files (azure-dev#2368)
    • Improve documentation on pre/post command hooks (azure-dev#2224)
    • Uninstall text not showing on uninstall for MSI package (azure-dev#1858)

Community contributions

We’d also like to extend a special thanks to the community contributors of this release:

You can use the Azure Developer CLI from:

Author

Savannah Ostrowski
Senior Product Manager

Savannah Ostrowski is a senior product manager at Microsoft, focused on Azure cloud native developer tools and experience. She is also the product lead for the open source Azure Developer CLI (azd) and its ecosystem.

0 comments

Discussion are closed.