The xPlat Azure CLI allows users to manage their Azure cloud resources from non-Windows devices.
This is the first of a series of articles on xPlat: the Microsoft Azure CLI tool. Did you know that the Microsoft Azure platform can be managed from non-Windows devices? It’s true. The most powerful automation capabilities are offered through the Windows-only Microsoft Azure PowerShell module, however there is a cross-platform (xPlat) CLI tool, that enables you to perform management tasks from Mac OS X or Linux systems. The Azure xPlat CLI tool runs on top of the Node.js application framework, which is what enables it to run cross-platform.
xPlat Azure CLI: what can it do
Let’s explore some of the capabilities that this tool offers.
- Authenticate to Microsoft Azure via Azure Active Directory (AAD) or Microsoft Account
- List and select an Azure subscription to operate on
- Retrieve account billing / consumption details
- Create and manage Microsoft Azure Storage Accounts, Blob Containers, Blobs, and permissions
- Deploy Microsoft Azure Resource Manager (ARM) JSON Templates
- Create and manage Microsoft Azure App Service Web Jobs
- Create and manage Microsoft Azure App Service Web Apps
- Create and manage IaaSv1 & IaaSv2 Windows and Linux Virtual Machines, VM Endpoints
- Create and manage Docker container hosts
- And much more!
The Azure xPlat CLI tool interfaces with both the older Azure Service Management (ASM) REST API and the newer Azure Resource Manager (ARM) REST API. You can deploy ARM JSON templates with the xPlat CLI Tool, which enable you to rapidly provision Cloud Resources into a Resource Group.
xPlat Azure CLI: installation and authentication
Installing the Azure xPlat CLI is fairly straightforward. First, you need to install the Node.js application framework. This framework includes a package manager called NPM (Node Package Manager). Next, you need to call npm install -g azure-cli. That’s it! Once you’ve got the Azure CLI Node.js package installed, you will be able to call it directly from the command line. The command name is simply “azure.”
Now that you have installed the Azure xPlat CLI Tool, you will need to authenticate against Azure, using either Azure Active Directory (AAD) or your Microsoft Account (MSA). This account would be the same one that you use to access the Microsoft Azure Portal. To authenticate, simply call “azure login –username email@example.com”. You’ll be prompted for your password, so go ahead and enter that.
Once you’re authenticated to Azure, you’ll want to make sure that your future command calls are operating on the correct subscription (aka. Azure account). Your user account could have access to more than one Azure subscription, so first you’ll need to “select” the appropriate subscription context. To select a subscription, use the command “azure account set <MySubscriptionName>”. If you don’t know the name of your subscription, you can easily discover them by using the “azure account list” command.
Great, now you’ve installed the Azure CLI, logged into Azure, and gotten the basics down for subscription management! In the next article, we’ll take a look at provisioning resources into your subscription using the Azure CLI using xPlat.
In the meantime, perhaps you’d like to take Cloud Academy’s Getting started with Azure Cross-Platform CLI Tool course or the Getting Started with Azure Virtual Machines course.
Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More
Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...
Disadvantages of Cloud Computing
If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are CPU, memory, storage, and network connectivity. Which resources you choose for your delivery — cloud-based or local — is up to you. But you’ll definitely want...
How to Effectively Use Azure Management Groups, Subscriptions, and Resource Groups
When used individually, Azure Management Groups, Subscriptions, and Resource Groups are very powerful. But when used together, they can establish the entire organizational structure of Azure. In this article, I will explain Azure Resource Manager, Management Groups, Subscriptions an...
Cloud Academy’s Blog Digest: July 2019
July has been a very exciting month for us at Cloud Academy. On July 10, we officially joined forces with QA, the UK’s largest B2B skills provider (read the announcement). Over the coming weeks, you will see additions from QA’s massive catalog of 500+ certification courses and 1500+ ins...
Top 10 Things Cybersecurity Professionals Need to Know
There has been an increase in data breaches over the recent years. With almost 143 million Americans who have had their data compromised in data breaches. These breaches include all sorts of sensitive data, including financial information, election controversies, social security, just t...
Running Apache Spark on Azure Databricks
In this article, we’ll cover how to set up an Azure Databricks cluster and how to run queries in an interactive notebook. However, this article only scratches the surface of what you can do with Azure Databricks. If you would like to learn more, including how to create graphs, run sched...
Understanding the Core Azure Architectural Components
Microsoft Azure relies on a few key architectural components to provide redundancy and high availability. Core Azure architectural components include Azure regions, Azure Availability Zones, resource groups, and the Azure Resource Manager. In this article, we’ll discuss the basics ab...
How to Become a Microsoft Certified Azure Administrator
Microsoft Azure is one of the hottest cloud services on the planet, and it’s growing at a phenomenal rate. This rapid growth has created a huge demand for people who know how to administer and manage Azure implementations. To make it easier for employers to verify the skills of Azure...
Preparing for the Microsoft AZ-900 Exam
Microsoft has offered Azure certification exams for years, but until recently, they were all meant for technical IT professionals. Now non-technical professionals, such as salespeople and managers, can take the new AZ-900 exam to prove their understanding of Azure fundamentals. People w...
An Overview of Azure Storage (Part 2)
Archive Storage Archive Storage offers the lowest storage costs of all Azure storage. Its retrieval costs, however, are higher when compared to Hot and Cool storage. The archive tier of storage is designed for data that can tolerate several hours of latency when being retrieved. It’s a...
An Overview of Azure Storage (Part 1)
Welcome to part one of our series on Azure Storage. Stay tuned for the second part. An Overview of Azure Storage Microsoft Azure Storage is a cloud-based storage offering that provides multiple storage solutions for organizations. In addition to a massively scalable object store for ...
NEW: Custom Hands-On Labs for Azure and Google Cloud Platform
Harvard Business Review recently estimated that some 90% of corporate training never gets applied on the job. Given the $200B training industry, that is a staggering amount of waste. One reason for the disconnect? Lack of context. Cloud Academy’s platform was built to make it extraor...