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 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 Cross-Platform CLI Tool course or the Getting Started with Azure Virtual Machines course.
New on Cloud Academy: Red Hat, Agile, OWASP Labs, Amazon SageMaker Lab, Linux Command Line Lab, SQL, Git Labs, Scrum Master, Azure Architects Lab, and Much More
Happy New Year! We hope you're ready to kick your training in overdrive in 2020 because we have a ton of new content for you. Not only do we have a bunch of new courses, hands-on labs, and lab challenges on AWS, Azure, and Google Cloud, but we also have three new courses on Red Hat, th...
Azure Security: Best Practices You Need to Know
When it comes to Azure Security best practices, where do you begin? In a lot of ways, Azure is very similar to any other data center. But with that said, Azure can also be very different. Securing Azure can pose many unique challenges. The security of resources hosted in Azure is of the...
Google Cloud Platform 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 2019, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the second consecuti...
New Lab Challenges: Push Your Skills to the Next Level
Build hands-on experience using real accounts on AWS, Azure, Google Cloud Platform, and more Meaningful cloud skills require more than book knowledge. Hands-on experience is required to translate knowledge into real-world results. We see this time and time again in studies about how pe...
New on Cloud Academy: AWS Solution Architect Lab Challenge, Azure Hands-on Labs, Foundation Certificate in Cyber Security, and Much More
Now that Thanksgiving is over and the craziness of Black Friday has died down, it's now time for the busiest season of the year. Whether you're a last-minute shopper or you already have your shopping done, the holidays bring so much more excitement than any other time of year. Since our...
Understanding Enterprise Cloud Migration
What is enterprise cloud migration? Cloud migration is about moving your data, applications, and even infrastructure from your on-premises computers or infrastructure to a virtual pool of on-demand, shared resources that offer compute, storage, and network services at scale. Why d...
Kubernetes Services: AWS vs. Azure vs. Google Cloud
Kubernetes is a popular open-source container orchestration platform that allows us to deploy and manage multi-container applications at scale. Businesses are rapidly adopting this revolutionary technology to modernize their applications. Cloud service providers — such as Amazon Web Ser...
New on Cloud Academy: AZ-900 Exam Update; MS-100 Exam Prep; PRINCE2 Foundation; Azure, Kubernetes, and Google Hands-on Labs; and Much More
This month, our Content Team really kicked it into overdrive with tons of new content. If you're Team Azure, then you'll be amazed at the number of Azure Courses and Hands-on Labs we published this month alone! At any time, you can find all of our new releases by going to our Training ...
How to Get Hands-on Experience on AWS, Azure, and GCP: Lab Challenges
Meaningful cloud skills require more than book knowledge. Hands-on experience is required to translate knowledge into real-world results. We see this time and time again in studies about how kids and adults best learn — doing the actual learning task is key. Hands-on Labs and Lab Challe...
Which Certifications Should I Get?
As we mentioned in an earlier post, the old AWS slogan, “Cloud is the new normal” is indeed a reality today. Really, cloud has been the new normal for a while now and getting credentials has become an increasingly effective way to quickly showcase your abilities to recruiters and compan...
New on Cloud Academy: ITIL® 4, Microsoft 365 Tenant, Jenkins, TOGAF® 9.1, and more
At Cloud Academy, we're always striving to make improvements to our training platform. Based on your feedback, we released some new features to help make it easier for you to continue studying. These new features allow you to: Remove content from “Continue Studying” section Disc...
Cloud Migration Risks & Benefits
If you’re like most businesses, you already have at least one workload running in the cloud. However, that doesn’t mean that cloud migration is right for everyone. While cloud environments are generally scalable, reliable, and highly available, those won’t be the only considerations dri...