kitchen-azurerm 0.8.0 released
Test Kitchen driver for Azure Resource Manager improvements now available thanks to community contributions!
It’s not usually worth a blog post but since taking some holiday in December 2016 and starting in a new position at Chef in January, I haven’t had as much time to dedicate to fixes as I’d have normally liked. Luckily, the community came through with contributions in that time and I want to call out three different pull requests by three different contributors that have just gone into the latest release:
Resource Tagging of created VMs
Working with dynamic inventories for Ansible etc is made easier by using VM tags, these changes allow you define tags…github.com
It is now possible to add Resource Tags to each created VM when it is created in Azure. This can be helpful for a variety of reasons, not least because the tags are searchable. To use it, simply add your tags like the example below:
- name: ubuntu-14.04
Thanks “liamkirwan” for this contribution!
Enhanced networking support for ExpressRoute and VPN users
While using this driver I ran into the scenario that I would like to provision my VM using Kitchen in an existing VNET…github.com
Early releases of the kitchen-azurerm driver only had support for creating VMs with Public IP addresses attached to their NIC. Later this was changed so you could specify a vnet and subnet, like this:
- name: ubuntu-1404
However, sometimes it turns out you need both! So this pull request (thanks to “vlesierse”) added support for a new public_ip parameter that can be set to true if you want the machine to both be connected the specified subnet and have a public IP address assigned for testing:
- name: ubuntu-1404
Use built-in Windows provisioning mechanism for configuring WinRM
Rather than using a custom script extension this injects the winrm setup script into the VM through the ARM template…github.com
For the Windows side of converging on Test Kitchen to work, the VM must be configured correctly for WinRM. This generally involves opening up a listener and configuring the firewall appropriately. The first version of the driver used an Azure Custom Script Extension to add the WinRM configuration after the VM was built. The limitations of this were that it was slow to configure, and there were reports that in a hybrid networking setup, the Custom Script Extension did not work behind a proxy. So thanks to “hbuckle” the driver now injects the configuration required into the unattend.xml — which is the configuration file used to provision the Windows VM before it even boots for the first time!
Updating the Kitchen driver locally
To update to the latest kitchen-azurerm, simply:
> chef gem update kitchen-azurerm
All-in-all, three great contributions from the community that go to enhance support for the Microsoft Azure platform for all users of Test Kitchen!