Friday, July 11, 2014

First crack at Azure Automation

Managing resources in the cloud seems to be the new frontier for the traditional IT departments within companies.  We often talk about how we can make this easier for companies to do.

In my case, I have a small lab within Azure.  What I want to be able to do is launch all the services in my lab on demand.  After all, that is the real cost savings of moving to a platform like Azure.  Spin up the servers when needed, use them, de-allocate them at the end of the day to save money.  Small labs could be managed easily via the management console, but I needed a reason to try Azure Automation.  Note that Azure Automation, at time of writing, is in preview mode and you need to request it on your subscription.

First things first, have a read at the official docs.

Step-By-Step Azure Automation
Runbook Management

At a high level, Azure Automation is built to run powershell-workflow scripts.  Perfect fit if you don't want to run your own system center components, or other automation tools.  You get charged by the hour an automation script is running.

Azure Automation makes use of "Automation Assets" in order to run.  Basically, you can create connections and credentials and then, via powershell, use them to connect to an Azure subscription.  Assets are also used to load modules into your powershell environment in the cloud, set variables that you can use globally, and also create schedules that you can then apply to runbooks or groups of runbooks.

At the outset, it seems to have all the basics for you to create a rich set of automation tools to help you manage your Azure subscription(s).  It even provides an online editor with intellisense to help you create your scripts.

The Step-By-Step details some powershell scripts that you can use to connect to an azure subscription and stop a demo.  I implemented essentially the same thing.  You can find my code on GitHub.  I hope to add more scripts as I move along.

No comments:

Post a Comment