Questions? Feedback? powered by Olark live chat software
Ignorar Navegação

Announcing Azure Command-Line Interface (Azure CLI) 2.0 Preview

Publicado em 26 setembro, 2016

Senior Program Manager

With the continued growth of Azure, we’ve seen a lot of customers using our command-line tools, particularly the Windows PowerShell tools and our Azure XPlat command-line interface (CLI).  We’ve received a lot of feedback on the great productivity provided by command-line tools, but have also heard, especially from customers working with Linux, about our XPlat CLI and its poor integration with popular Linux command-line tools as well as difficulties with installing and maintaining the Node environment (on which it was based).

Based on this feedback - along with the growth in the Azure Resource Manager-based configuration model - we improved the CLI experience and now provide a great experience for Azure. Starting today, we’re making this new CLI available. We’re calling it the Azure Command-Line Interface (Azure CLI) 2.0 Preview, now available as a beta on GitHubPlease try it out and give us your feedback!

Now, if you’re interested in how we approached this project and what it means for you, read on!

What Makes a Great, Modern CLI?

As we set out to develop our next generation of command-line tools, we quickly settled on some guiding principles:

It must be natural and easy to install: Regardless of your platform, our CLI should be installed from where you expect it, be it from “brew install azure-cli” on a MacBook, or from “apt-get install azure-cli” for BASH on Windows (coming soon).

It must be consistent with POSIX tools: Success with command-line tools is the result of the ease and predictability that comes with the implementation of well-understood standards.

It must be part of the open source ecosystem: The value of open source comes from the community and the amazing features and integrations they develop, from DevOps (Chef, Ansible) solutions to query languages (JMESPath).

It must be evergreen and current with Azure: In an age of continuous delivery, it's not enough to simply deploy a service. We must have up-to-date tools that let our customers immediately take advantage of that service. 

As we applied these principles, we realized that the scope of improvements went beyond a few breaking changes, and when combined with the feedback we’ve received about our XPlat CLI, it made sense to start from the ground up. This choice allowed us to focus exclusively on our ARM management and address another common point of feedback: the ASM/ARM “config mode” switch of our XPlat CLI.

Introducing the Azure CLI 2.0 Preview

While we are building out support for core Azure services at this time, we would like to introduce you to the next generation of our command-line tool: Azure CLI 2.0 Preview.

AzBlogAnimation4

Get Started without delay with a quick and easy install, regardless of platform

Your tools should always be easy to access and install, whether you work in operations or development. Soon, Azure CLI 2.0 Preview will be available on all popular platform package services.

Love using command-line tools such as GREP, AWK, JQ?  So do we!

Command-line tools are the most productive when they work together well. The Azure CLI 2.0 Preview provides clean and pipe-able outputs for interacting with popular command-line tools, such as grep, cut, and jq.

Feel like an Azure Ninja with consistent patterns and help at your fingertips

Getting started in the cloud can feel overwhelming, given all the tools and options available, but the Azure CLI 2.0 Preview can help you on your journey, guiding you with examples and educational content for common commands.  We've completely redesigned our help system with improved in-tool help.

In future releases, we will expand our documentation to include detailed man-pages and online documentation in popular repositories.

The less you type, the more productive you are

We offer 'tab completion' for commands and parameter names. This makes it easy to find the right command or parameter without interrupting your flow. For parameters that include known choices, as well as resource groups and resource names, you can use tab completion to look-up appropriate values.

Moving to the Azure CLI 2.0 Preview

What does this mean to existing users of the XPlat CLI? We're glad you asked! Here are a few key answers to some questions we've anticipated:

You don't need to change anything: The XPlat CLI will continue to work and scripts will continue to function. We are continuing to support and add new features to the CLI.

You can install and use both CLIs side-by-side: Credentials and some defaults, such as default subscriptions, are shared between CLIs. This allows you to try out the CLI 2.0 Preview while leaving your existing Azure XPlat CLI installation untouched. 

No, ASM/Classic mode is not supported in the Azure CLI 2.0 Preview: We've designed around ARM primitives, such as resource groups and templates. ASM/Classic mode will continue to be supported by the XPlat CLI.

Yes, we'll help you along the way: While we can't convert scripts for you, we've created an online conversion guide, including a conversion table that maps commands between the CLIs.

Please note: credential sharing with the Azure XPlat CLI requires version 0.10.5 or later.

Interested in trying us out?

We're on GitHub, but we also publish on Docker: get the latest release by running "$ docker run -it azuresdk/azure-cli-python".

If you have any feedback, please type "az feedback" into the CLI and let us know!

Attending the Microsoft Ignite conference (September 26-30, 2016, Atlanta, GA)? Come visit us at the Azure Tools booth for a demo or attend our session titled:  Build cloud-ready apps that rock with open and flexible tools for Azure.

Frequently Asked Questions

What does this mean to existing users of the XPlat CLI?

The XPlat CLI will continue to work and scripts will continue to function. Both of them support a different top level command (‘azure’ vs ‘az’), and you can use them together for specific scenarios. Credentials and some defaults (such as default subscription) are shared between CLIs allowing you to try out Azure CLI 2.0 Preview while leaving your existing CLI installation untouched. We are continuing to support and add new features the XPlat CLI.

I have scripts that call the “azure” command – will those work with the new tool?

Existing scripts built against the Azure XPlat CLI ("azure" command) will not work with the Azure CLI 2.0 Preview. While most commands have similar naming conventions, the structure of the input and output have changed. For most customers, this means changing scripts to 'workarounds' required by the Azure XPlat CLI, or relying on the co-existence of both tools.

Are you going to discontinue the Azure XPlat CLI? When will you take Azure CLI 2.0 out of preview?

The current XPlat CLI will continue to be available and supported, as it is needed for all ASM/Classic based services. The new Azure CLI 2.0 will stay in preview for now as we collect early user feedback to drive improvements up until the final release (date TBD).

Is .NET Core and PowerShell support changing on this release?

Support for .NET Core and PowerShell is not changing with this release. They will continue to be available and fully supported. We feel that PowerShell and POSIX-based CLIs serve different sets of users and provides the best choice for automation/scripting scenarios from the command-line. Both of these options are available on multiple platforms.  Both are open source now and we are investing in both of them.