Building Hybrid Clouds with Azure Stack
上QQ阅读APP看书,第一时间看更新

Azure Resource Manager

The magical Azure Resource Manager is a 1-1 bit share with ARM from Azure, so it has the same update frequency and features that are available in Azure, too.

ARM is a consistent management layer that saves resources, dependencies, inputs, and outputs as an idempotent deployment as a JSON file called an ARM template. This template defines the tastes of a deployment, whether be it VMs, databases, websites, or anything else. The goal is that once a template is designed, it can be run on each Azure-based cloud platform, including Azure Stack. ARM provides cloud consistency with the finest granularity, and the only difference between the clouds is the region the template is being deployed to and the corresponding REST endpoints.

ARM not only provides a template for a logical combination of resources within Azure, it also manages subscriptions and role-based access control (RBAC) and defines the gallery, metric, and usage data, too. This means quite simply, that everything that needs to be done with Azure resources should be done with ARM.

Not only does Azure Resource Manager design one virtual machine, it is responsible for setting up one to a bunch of resources that fit together for a specific service. Even ARM templates can be nested; this means they can depend on each other.

When working with ARM, you should know the following vocabulary:

  • Resource: A resource is a manageable item available in Azure.
  • Resource group: A resource group is the container of resources that fit together within a service.
  • Resource provider: A resource provider is a service that can be consumed within Azure.
  • Resource manager template: A resource manager template is the definition of a specific service.
  • Declarative syntax: Declarative syntax means that the template does not define the way to set up a resource; it just defines how the result and the resource itself have the feature to set up and configure itself to fulfill the syntax. To create your own ARM templates, you need to fulfill the following minimum requirements:
    • A test editor of your choice
    • Visual Studio Community edition
    • Azure SDK

Visual Studio Community edition is available for free from the internet. After setting these things up, you could start it, and define your own templates:

Setting up a simple blank template looks like this:

There are different ways to get a template that you can work on and modify it to fit your needs:

  • Visual Studio templates
  • Quick-start templates on GitHub
  • Azure ARM templates

You could export the ARM template directly from Azure portal if the resource has been deployed:

After clicking on View template, the following opens up:

For further reading on ARM basics, the Getting started with Azure Resource Manager document is a good place to begin:
http://aka.ms/GettingStartedWithARM.