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.
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:
Usage: azbb [options]
-V, --version output the version number
-s, --subscription-id <subscription-id> Azure subscription id
-l, --location <location> Azure region in which to create the resource group
-g, --resource-group <resource-group> name of the resource group
-p, --parameters-file <parameters-file> path to a parameters file
--deploy deploy resources, if --deploy is not used, azbb just creates the output files
-c, --cloud, <cloud> registered Azure cloud to use (use az cloud list to see all cloud names)
-o, --output-file <output-file> output file name prefix
-f, --output-format <output-format> output format: json, files
-d, --defaults-directory <defaults-directory> directory containing customized default values
-t, --template-base-uri <template-base-uri> base uri for building block templates
-k, --sas-token <sas-token> sas token to pass to access template-base-uri
-b, --building-blocks <building-blocks> additional building blocks to add to the pipeline
-h, --help output usage info
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.