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 at https://portal.azure.com. To authenticate, simply call “azure login –username firstname.lastname@example.org”. 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 Virtual Machines course.
Google Cloud Certification: Preparation and Prerequisites
Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2018, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the first time. In t...
Azure Stack Use Cases and Applications
This is the second of a two-part series covering Azure Stack. Our first post provided an introduction to Azure Stack. Why would your organization consider using Azure Stack? What are the key differences between Azure Stack and Microsoft Azure? In this post, we'll begin to answer bot...
Highlights from Microsoft Ignite 2018
Microsoft Ignite 2018 was a big success. Over 26,000 people attended Microsoft’s flagship conference for IT professionals in sunny Orlando, Florida. As usual, Microsoft made a huge number of announcements, ranging from minor to major in importance. To save you the trouble of sifting thr...
Planning for Microsoft Ignite 2018 Sessions: What Not to Miss
Cloud Academy is proud to be a sponsor of the Microsoft Ignite Conference to be held September 24 - 28 in Orlando, Florida. This is Microsoft’s biggest event of the year and is a great way to stay up to date on how to get the most from Microsoft’s products. In this post, I’ll help you p...
How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy
One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...
What are the Benefits of Machine Learning in the Cloud?
A Comparison of Machine Learning Services on AWS, Azure, and Google CloudArtificial intelligence and machine learning are steadily making their way into enterprise applications in areas such as customer support, fraud detection, and business intelligence. There is every reason to beli...
How Does Azure Encrypt Data?
In on-premises environments, data security is typically a siloed activity, with a company's security team telling the internal technology groups (server administration, database, networking, and so on) what needs to be protected against intrusion.This approach is absolutely a bad idea...
Disadvantages of Cloud Computing
If you want to deliver digital services of any kind, you’ll need to compute resources including 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 to do your homework first.Cloud ...
Preparing for the Microsoft Azure 70-535 Exam
The credibility of Microsoft Azure continues to grow in the first quarter of 2018 with an increasing number of enterprises migrating their workloads, resulting in a jump for Azure from 10% to 13% in market share. Most organizations will find that simply “lifting and shifting” applicatio...
Azure Migration Strategy: A Checklist to Get Started
By now, you’ve heard it many times and from many sources: cloud technology is the future of IT. If your organization isn’t already running critical workloads on a cloud platform (and, if your career isn’t cloud-focused), you’re running the very real risk of being overtaken by nimbler co...
Three Must-Use Azure Security Services
Keeping your cloud environment safe continues to be the top priority for the enterprise, followed by spending, according to RightScale’s 2018 State of the Cloud report.The safety of your cloud environment—and the data and applications that your business runs on—depends on how well y...
Is Multi-Cloud a Solution for High Availability?
With the average cost of downtime estimated at $8,850 per minute, businesses can’t afford to risk system failure. Full access to services and data anytime, anywhere is one of the main benefits of cloud computing.By design, many of the core services with the public cloud and its unde...