Introduction to Azure Resource Manager
Template Deployment & Advanced Concepts
The course is part of these learning pathsSee 3 more
This course will introduce the Microsoft Azure Resource Manager (ARM) REST API, and how to interact with it using the Azure Cross-Platform (xPlat) CLI Tool and the ARM PowerShell module. The ARM interface is a web service that provides two primary mechanisms for managing cloud resources:
- Declarative provisioning using Azure Resource Manager (ARM) JSON Templates
- Imperative provisioning - provisioning or deprovisioning cloud resources one-by-one
Microsoft's ARM interface offers several different methods of accessing it:
- REST API - A REST interface to interact with ARM
- PowerShell Module - The Azure Resource Manager PowerShell module can be installed directly from the PowerShell Gallery, and enables you to manage cloud resources both declaratively and imperatively.
- Cross-Platform (xPlat) CLI Tool - A Node.js-based automation tool that runs across multiple platforms, including Linux, Mac OS X, and Windows. This utility enables declarative and imperative management of cloud resources inside your Microsoft Azure subscription. It even enables certain automation functions within the Azure Active Directory (AAD) identity service.
- Python Module - a Python module that can be easily installed using pip, enabling declarative and imperative management of Azure resources via ARM.
After participating in this course, you'll be enabled with the following information:
- The architecture of the Microsoft Azure Resource Manager (ARM) interface
- installing and getting started with the ARM PowerShell module
- Installing and getting started with the Azure Cross-Platform (xPlat) CLI Tool
- How to build and understand Azure Resource Manager JSON Templates
- Common software tools you'll encounter, surrounding Azure Resource Manager
- Declarative provisioning and imperative provisioning of cloud resources in Azure
If you have thoughts or suggestions for this course, please contact Cloud Academy at firstname.lastname@example.org.
Hello, and welcome to Microsoft Azure Resource Manager, ARM JSON Template Deployment.
In this lecture, we're going to explore deployment options for ARM JSON templates, requirements for deployment and then an example deployment with the Azure cross-platform CLI tool and an example deployment with the Azure Resource Manager PowerShell module. Let's take a look at a few different options we have for deploying Azure Resource Manager JSON Templates.
Every time that you deploy an ARM JSON Template, you're talking directly to the Azure Resource Manager REST API. However, there're a few different options we have.
First, we can use the Azure cross-platform CLI tool on a Windows or non-Windows operating system. We can use the Azure Resource Manager PowerShell module, which is separate from the Azure Service Management PowerShell module, which is a legacy module and we can also use the Microsoft Azure Portal. There's several things that you'll need in order to deploy an Azure Resource Manager JSON template. First, you'll need the name of a resource group, and you can either create a new one or deploy to an existing one. You'll need an ARM JSON Template file. You also need to specify the Azure Resource Manager JSON Template parameters and then finally you can optionally specify a deployment name. This is an example Bash script that will deploy an Azure JSON Template using the Azure cross-platform CLI tool. As you can see, we are defining several variables that create a new Azure Resource Group for us. We call the Azure group create command to create a new empty resource group.
Next, once we have the resource group created, we then specify several variables in Bash that allow us to specify the template file, the name of the deployment, which is optional, and then finally input parameters for the Azure Resource Manager Template. Once we've specified these variables, we can call the Azure group deployment create command to create the deployment using the specified template file. The process for the Azure PowerShell module is quite similar. First, we declare a hash table that contains the resource group properties such as the name and deployment location. Then we call New AzureRmResourceGroup to create the resource group and then to deploy the Azure Resource Manager JSON template into that resource group, we specify a handful of parameters such as ResourceGroupName, TemplateFile, TemplateParameterObject and then finally we call the new AzureRmResourceGroupDeployment command in order to invoke the deployment of that template to that resource group.
Now that we've explored our options for deploying an Azure Resource Manager JSON Template, let's take a quick look at a demonstration.
About the Author
Trevor Sullivan is a Microsoft MVP for Windows PowerShell, and enjoys working with cloud and automation technologies. As a strong, vocal veteran of the Microsoft-centric IT field since 2004, Trevor has developed open source projects, provided significant amounts of product feedback, authored a large variety of training resources, and presented at IT functions including worldwide user groups and conferences.