Start your Azure experience with Azure Resource Manager

I’m currently designing an Azure environment for a client and was wondering why Microsoft have provided two different management portals. While both contain a large amount of common functionality, each do so in a different manner and some functionality is only available through one or the other.

Following a meeting with Microsoft Professional Services earlier this month (May 2015), I found out why.

Azure Service Management (ASM)

Microsoft Azure started off life with the (1st Generation) Azure Management Site:
https://manage.windowsazure.com/

This site uses the original Rest API, and provides all 1st Generation functionality for managing Windows Azure resources.

While this site provides a pleasant user experience, much of the more advanced management functionality is still only available through the Azure CLI, PowerShell, or Rest API. These can often be daunting to the first time user, but understanding them will help you make the right decision when working out how to build your first service within Azure.

Interestingly, even the “default” Azure CLI, PowerShell and Rest API interfaces appear to be out of date as Microsoft has introduced a new portal and provided new “Resource Manager” functionality into Azure.

Azure Resource Manager (ARM)

Microsoft Azure recently released the new (2nd Generation) Azure Portal – currently in preview:
https://portal.azure.com/

Other than looking cosmetically different, this “portal” works slightly differently to the original portal in that all Azure resources (user-managed entities such as a virtual machines, database servers, database, or websites) are configured within “Resource Groups”.

So what difference does this make to an end user and why has Microsoft introduced this?

Well in simple terms, ASM manages objects individually while ARM manages objects in groups. This allows an administrator to modify multiple objects as a single entity. Sounds simple doesn’t it?

Unfortunately, like all such changes this will have a significant impact on the way you approach the design and topology for your Azure implementation. This has a particularly large impact on the infrastructure and networking professionals, as the traditional boundaries are becoming increasingly blurred.

As taken from Microsoft’s “Azure Resource Manager Overview“:

  1. All of the resources in your group must share the same lifecycle. You will deploy, update and delete them together. If one resource, such as a database server, needs to exist on a different deployment cycle it should be in another resource group
  2. Each resource can only exist in one resource group
  3. You can add or remove a resource to a resource group at any time
  4. A resource group can contain resources that reside in different regions
  5. A resource group can be used to scope access control for administrative actions

Does this mean you can’t manage resources independently? No. But it does mean you need to give a bit more thought to how you group resources into templates for ease of deployment and management.

For example, would you include your network configuration within a resource group with your other application components, or overlay your application on an existing network topology?

Manage Azure Using ARM

The simplest way to start using ARM to create your resources in Microsoft Azure is to use the new portal:

https://portal.azure.com/

Of course, this provides limited functionality and is currently in preview so may not provide the capabilities you need. To overcome this (and provide additional capabilities such as automation and API integration for developers and partners) Microsoft has provided a number of additional management options:

Azure Management Options

Azure CLI for Mac, Linux, and Windows

The Azure CLI is a powerful cross-platform administrative tool for Azure popular due to it’s platform agnostic capabilities.

By enabling the ARM mode, Azure CLI allows administrators to manage resources in both an imperative way (as per the standard ASM mode in which resources are managed individually) or in a declarative way using Azure JSON templates to define the structure and relationship of resources within a group (leaving Azure to figure out how to create the desired state).

Because the Resource Manager mode is not enabled by default, you must use the following command to enable Azure CLI resource manager commands:

azure config mode arm

To switch back to the Azure Service Management mode, type:

azure config mode asm

For more information, please refer to the following resource:

http://azure.microsoft.com/en-gb/documentation/articles/xplat-cli-azure-resource-manager/

Azure PowerShell Modules

Microsoft has included the Azure Resource Manager module since version 0.8.0 of the Azure PowerShell installation. To switch from the default Azure Module to the Azure Resource Manager module, type:

PS C:> Switch-AzureMode -Name AzureResourceManager

To switch back to the Azure Module, type:

PS C:> Switch-AzureMode -Name AzureServiceManagement

For more information, please refer to the following resource:

http://azure.microsoft.com/en-gb/documentation/articles/powershell-azure-resource-manager/

Azure Rest API

The Azure Rest APIs are primarily aimed at developers, and overcome many of the limitations imposed through the web portals, Azure CLI and PowerShell. For example, many tasks can only be run in serial unless performed through the Rest API.

Moreover, as all other methods of managing Azure are just administrator friendly front-ends to the Rest API, functionality is much more complete within the Rest APIs. As a general rule of thumb, Azure functionality/capability is released in the following order:

  1. Rest API
  2. PowerShell / Azure CLI
  3. Web Management

As such, to achieve maximum functionality out of Azure the most capable management interface is the Rest API.

The following links provide useful information relating to the Azure Rest APIs:

Azure Service Management APIs
https://msdn.microsoft.com/en-us/library/azure/dn948465.aspx

Azure Resource Management APIs
https://msdn.microsoft.com/en-us/library/azure/dn948464.aspx

If you’d like me to cover any particular topics based on the above, please provide your feedback in the comments section below.

Kevin is a passionate and driven IT consultant with over a decade of experience in designing and implementing data centre infrastructure… he also has a passion for the coast, and loves kitesurfing!

2 thoughts on “Start your Azure experience with Azure Resource Manager

Leave a Reply

Your email address will not be published. Required fields are marked *

Protected with IP Blacklist CloudIP Blacklist Cloud