Azure Building Blocks: Simplify Resources Deployment

Azure Building Blocks

Microsoft recently announced availability of Azure Building Blocks around October 5th 2017. The purpose of Introducing this new set of tools is to simplify Azure resource deployment.

In Azure, one of the prominent ways to deploy Azure resources (like VMs, VNets, NSGs etc.) within your Subscription is through ARM templates. However, while ARM templates are a very powerful way to deploy resources and create large/complex Infrastructures on Azure, they are equally complex to author, and can very quickly become a maintenance nightmare.

Azure Building Blocks is a set of tools and pre-defined ARM templates, which can be used to greatly simplify Azure resources deployment, without getting into the complexity of authoring/maintaining ARM templates.

The primary advantage is that you don’t need to author any ARM templates with Azure Building Blocks. You only need to specify the parameter settings for the Azure resources you want to deploy. These parameters settings are then automatically merged with best practice defaults for those resources by the azbb tool to produce a set of parameter files. Next, azbb tool deploys these newly generated parameter files using a set of pre-built ARM templates.

You can see the whole process visually in the diagram below, which I have borrowed from the Azure Building Blocks Project Wiki.


Azure Building Blocks


As of writing of this post, Azure Building Blocks supports following Azure resources, but the coverage will expand over time:

  • Virtual Networks (including gateways and peering)
  • Network Security Groups
  • User Defined Routes
  • Windows and Linux VMs
  • VM Extensions
  • Internal and External Load Balancers
  • Application Gateway

How to Install Azure Building Blocks:

To install Azure Building Blocks on your local machine, follow these steps:

  • Install the Azure CLI, following the steps for your OS
  • Install Node.js for your operating system (Note: version 6.9.4 or greater of Node.js required.)
  • In Windows, open a command prompt window. In Linux, use the bash shell.
  • Create a new directory for the Azure Building Blocks. Install the Azure Building Blocks npm package in the new directory:

npm install -g @mspnp/azure-building-blocks

(Note: version 3.10.10 or greater of npm package manager required.)

  • Test Azure Building Blocks with the following command:
If the test was successful, you will see the command line options as follows:
In a near future posts, I will further expand my coverage around Azure Building Blocks. There I will show some practical working examples on deploying resources using Azure Building Blocks. I will also show you on how you can Install Azure Building Blocks within the Azure Cloud Shell of your Azure Subscription, and use it from there instead of your local machine.

Stay tuned until then!

Hope you found this blog post useful. If you have any queries/feedback, please feel free to mention in the comments section below.


Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.