Christian Reddington

Ideas and Technology :: This blog represents my own views

My Common ARM Templates

February 19, 2017 in #Azure #ARM #GitHub | | | Share on Google+

The past few weeks have been kind of busy, though it's now time to get back to the blogging!

An area that I keep discussing with customers is Infrastructure as Code and DevOps. Visual Studio Team Services provides an excellent set of tools for tracking your work, and building/releasing that development effort. You are not limited to Microsoft platforms (e.g. Azure / Windows), but can also consider Linux, Chef and other clouds! It's an open platform, with many partners already contributing to the Visual Studio Marketplace, allowing users to extend the base functionality of their Visual Studio Team Services account.

It is important to be able to repetitively, consistently and quickly re-deploy your environment, from an agility perspective. With that in mind, I began considering my Azure environment. My current usage is ad-hoc and based upon the engagements that I am working with customers. However, there is one consistent set of resources - I like to have a few Virtual Machines (combination of Windows and Linux) ready for my dev/test purposes.

From this point, I thought about setting up my own DevTest Labs environment. Rather than setting it up through the Azure portal, I would set out creating this through an Azure Resource Manager (ARM) template, and deploy using Visual Studio Team Services.

Task completed. But where should I host it, I asked! The number of people contributing to open source and giving back to the community inspires me. I figured it would make sense to host the template on GitHub, at my repository located here (or at least, gave me a good reason to clean up all my unused forked repositories!).

The template fulfils my needs, by setting up a lab with:

  • 1 Windows VM
  • 1 Linux (Ubuntu) VM
  • 1 Jenkins VM (To demonstrate the power of VSTs in orchestrating multiple platforms... More on this in a late blog post!)
  • Policy to shut down all VMs at 17:30

While fairly rudimentary, I have parametrized the approach such that it should be useful to others. I'm considering refining the template, so that components can be deployed into the Dev/Test Lab as required, rather than the current approach taking a count of VMs as a parameter. If you have any suggestions, I would love for you to contribute and discuss further!

When deploying infrastructure in Azure, my aim henceforth is to continue writing ARM templates and publish to GitHub, rather than building it manually through the portal. Please keep me true to my word!

How often are you deploying your environments using ARM Templates? What are some of the pleasant surprises, or challenges that you have found? Let me know on Twitter, @reddobowen.

PS - I will be writing another blog post on the VSTS Build/Release process for publishing the DevTest Lab ARM Template into my Azure environment. Stay tuned!

UPDATE 26-Feb: You can now find the blog post on releasing ARM Templates from GitHub here

February 19, 2017 in #Azure #ARM #GitHub | | | Share on Google+