---
title: "Azure Automation: Leveraging Runbooks - Ippon Technologies USA Blog"
description: Effectively leverage Azure Automation by dynamically deploying child runbooks.  Implement versioning in your automation to keep a complete working history.
image: https://blog.ippon.tech/hubfs/Imported_Blog_Media/Azure-Automation--Leveraging-Runbooks-Blog--1--3.png
---

[Skip to main content](https://blog.ippon.tech/azure-automation#main)

[![IpponLogoKleinBlue](https://blog.ippon.tech/hs-fs/hubfs/IpponLogoKleinBlue.png?width=219&height=64&name=IpponLogoKleinBlue.png) ![IpponLogoKleinBlue](https://blog.ippon.tech/hs-fs/hubfs/IpponLogoKleinBlue.png?width=219&height=64&name=IpponLogoKleinBlue.png) ![IpponLogoKleinBlue](https://blog.ippon.tech/hs-fs/hubfs/IpponLogoKleinBlue.png?width=168&height=49&name=IpponLogoKleinBlue.png) ![IpponLogoKleinBlue](https://blog.ippon.tech/hs-fs/hubfs/IpponLogoKleinBlue.png?width=168&height=49&name=IpponLogoKleinBlue.png)](https://ipponusa.com/)

- [Home](https://ipponusa.com)
- [Show submenu for About About](https://ipponusa.com/about-us) 
    - [Who We Are](https://ipponusa.com/who-we-are)
    - [Careers](https://ipponusa.com/careers)
    - [Show submenu for Our Partners Our Partners](https://ipponusa.com/our-partners/) 
          - [AWS](https://ipponusa.com/our-partners/aws/)
          - [Snowflake](https://ipponusa.com/our-partners/snowflake/)
          - [Databricks](https://ipponusa.com/our-partners/databricks/)
          - [Microsoft](https://ipponusa.com/our-partners/microsoft/)
- [Show submenu for Services Services](https://ipponusa.com/services) 
    - [Snowflake](https://ipponusa.com/service/snowflake-concierge/)
    - [Artificial Intelligence](https://ipponusa.com/service/artificial-intelligence/)
    - [Data & Analytics](https://ipponusa.com/service/data-analytics/)
    - [Cloud Strategy](https://ipponusa.com/service/cloud-strategy/)
    - [Platform Modernization](https://ipponusa.com/service/platform-moderization/)
    - [Product Innovation](https://ipponusa.com/service/product-innovation/)
    - [Operating Model](https://ipponusa.com/service/operating-model/)
- [Blogs](https://blog.ippon.tech/)
- [Success Stories](https://ipponusa.com/success-stories/)
- [Show submenu for Resources Resources](https://ipponusa.com/resources/) 
    - [eBooks](https://ipponusa.com/ebooks/)
    - [The Data Pour](https://info.ippon.tech/the-data-pour)
    - [Videos & Webinars](https://info.ippon.tech/videos-and-webinars)
    - [Media Center](https://ipponusa.com/media-center/)

Search

Open main navigation

Close main navigation

- [Home](https://ipponusa.com)
- Show submenu for About About 
  
    - About
    - [About](https://ipponusa.com/about-us)
    - [Who We Are](https://ipponusa.com/who-we-are)
    - [Careers](https://ipponusa.com/careers)
    - Show submenu for Our Partners Our Partners 
      
          - Our Partners
          - [Our Partners](https://ipponusa.com/our-partners/)
          - [AWS](https://ipponusa.com/our-partners/aws/)
          - [Snowflake](https://ipponusa.com/our-partners/snowflake/)
          - [Databricks](https://ipponusa.com/our-partners/databricks/)
          - [Microsoft](https://ipponusa.com/our-partners/microsoft/)
- Show submenu for Services Services 
  
    - Services
    - [Services](https://ipponusa.com/services)
    - [Snowflake](https://ipponusa.com/service/snowflake-concierge/)
    - [Artificial Intelligence](https://ipponusa.com/service/artificial-intelligence/)
    - [Data & Analytics](https://ipponusa.com/service/data-analytics/)
    - [Cloud Strategy](https://ipponusa.com/service/cloud-strategy/)
    - [Platform Modernization](https://ipponusa.com/service/platform-moderization/)
    - [Product Innovation](https://ipponusa.com/service/product-innovation/)
    - [Operating Model](https://ipponusa.com/service/operating-model/)
- [Blogs](https://blog.ippon.tech/)
- [Success Stories](https://ipponusa.com/success-stories/)
- Show submenu for Resources Resources 
  
    - Resources
    - [Resources](https://ipponusa.com/resources/)
    - [eBooks](https://ipponusa.com/ebooks/)
    - [The Data Pour](https://info.ippon.tech/the-data-pour)
    - [Videos & Webinars](https://info.ippon.tech/videos-and-webinars)
    - [Media Center](https://ipponusa.com/media-center/)
- Search
- [Contact Us](https://ipponusa.com/contact/)

[Contact Us](https://ipponusa.com/contact/)

# Azure Automation: Leveraging Runbooks - Ippon Technologies USA Blog

![Jake Henningsgaard](https://app.hubspot.com/settings/avatar/d41d8cd98f00b204e9800998ecf8427e)

 by [Jake Henningsgaard](https://blog.ippon.tech/author/jake-henningsgaard)

August 7, 2017

![Azure Automation: Leveraging Runbooks](https://blog.ippon.tech/hubfs/Imported_Blog_Media/Azure-Automation--Leveraging-Runbooks-Blog--1--3.png)

[Azure](https://blog.ippon.tech/tag/azure/)

<https://blog.ippon.tech/author/jhenningsgaard/>  Aug 07, 2017

<iframe id="{&quot;xdOrigin&quot;:&quot;https://blog.ippon.tech&quot;,&quot;xdChannel&quot;:&quot;5e5836b2-40c8-40cb-90e7-de390c67f5b4&quot;,&quot;framework&quot;:&quot;@linkedin/xdoor-sdk&quot;,&quot;version&quot;:&quot;0.1.176&quot;,&quot;debug&quot;:false}" class="IN-widget IN-widget--iframe" style="vertical-align: bottom; margin: 0px auto; display: block;" title="LinkedIn Embedded Content" xml="lang" src="https://www.linkedin.com/cws/member/public_profile?public_profile_url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fjacobhenningsgaard&amp;format=inline&amp;related=false&amp;width=286&amp;xdOrigin=https%3A%2F%2Fblog.ippon.tech&amp;xdChannel=5e5836b2-40c8-40cb-90e7-de390c67f5b4&amp;xd_origin_host=https%3A%2F%2Fblog.ippon.tech" name="{&quot;xdOrigin&quot;:&quot;https://blog.ippon.tech&quot;,&quot;xdChannel&quot;:&quot;5e5836b2-40c8-40cb-90e7-de390c67f5b4&quot;,&quot;framework&quot;:&quot;@linkedin/xdoor-sdk&quot;,&quot;version&quot;:&quot;0.1.176&quot;,&quot;debug&quot;:false}" width="1" height="1" frameborder="0" scrolling="no"></iframe>

I've had the opportunity to build a platform to ingest 3rd party data from multiple sources from scratch. The platform is designed and built entirely on Azure Cloud using a number of resources available within Azure. As is the case with many Agile projects, my team designed the platform to consists of three identical environments: DEVELOPMENT (DEV), UAT, and PRODUCTION (PROD).

The replication of environments along with the need to maintain strict configurations for all components across the platform encouraged us to automate as much of the platform deployment as possible. This would reduce the complexity and amount of time taken to deploy a new environment, as well as track the configuration changes to the platform.

## Runbooks

Runbooks are script-like files that are based on Windows PowerShell. Runbooks are used to deploy, provision, and manage the various resources available in Azure (e.g. create resource groups, provision HDInsight cluster, or provision a VM). They are created and managed within an Azure Automation account ([Creating a Runbook](https://docs.microsoft.com/en-us/azure/automation/automation-creating-importing-runbook?ref=blog.ippon.tech)). Runbooks can be run manually or automatically by attaching a schedule.

There are two main components of Azure Automation runbooks that we found to be useful:

1. Deploying child runbooks from a master runbook
2. Versioning the runbooks with Git

## Structure the Runbooks for Multiple Environments

As mentioned previously, the platform consisted of three identical environments: DEV, TEST, and PROD. Therefore, we adopted some best practices.

1. Group your resources in a resource group based on lifecycle.
2. Create map variables for naming resources based on their environment.  
   a. Example: `$admin_rg = @{dev = "admin-dev-rg"; uat = "admin-uat-rg"; prod = "admin-prod-rg"}`
3. Define the order in which the runbooks should be executed  
   a. The `admin_rg` runbook is intended for resources that will exist 24/7, such as resource groups or virtual networks (VNet).

## Calling Child Runbooks

In order to reduce the complexity, time, and potential human error, the entire platform can be deployed from a single runbook. As shown in the animation below, the `master` runbook is used to deploy both the `create_rg` and `storage` runbooks. However, notice that the `master` runbook will wait until `create_rg` has finished before calling the `storage` runbook.

![](https://blog.ippon.tech/hubfs/Imported_Blog_Media/runbooks-2.gif)

When writing your "master" runbook you must first define your parameters. In this case I defined a set of parameters for each child runbook that I was calling:

```
    $adminParams = @{"environment" = $environment}
    $storageParams = @{"environment" = $environment; "storageName" = "enginesa01"}
```

Each child runbook has a different set of input parameters that it expects (seen above). After defining your child runbook parameters you can call the child runbook:

```
Start-AzureRmAutomationRunbook -AutomationAccountName "automationBlog" `
     -ResourceGroupName "automationBlog" `
     -Parameters $adminParams `
     -Name "create_rg" `
     -wait

Start-AzureRmAutomationRunbook -AutomationAccountName "automationBlog" `
     -ResourceGroupName "automationBlog" `
     -Parameters $storageParams `
     -Name "storage"
     -wait
```

The `storage` runbook depends on a successful completion of the `create_rg` runbook before it can be started. The `-wait` option on the `Start-AzureRmAutomationRunbook` cmdlet will force the `master` runbook to wait for the child runbook to finish before moving on.

## Implement Versioning

One challenge that we also encountered in Azure Automation was a good solution for versioning the runbooks. If you intend to use Github, you're in luck. [Azure Automation integrates well with Github](https://docs.microsoft.com/en-us/azure/automation/automation-source-control-integration?ref=blog.ippon.tech). In our case, however, we were using VSTS so things were a little more complicated. Luckily, Microsoft provides some documentation on how to [integrate Azure Automation with VSTS](https://docs.microsoft.com/en-us/azure/automation/automation-scenario-source-control-integration-with-vsts?ref=blog.ippon.tech).

I won't go into detail on how to version your runbooks in VSTS since Microsoft already does a pretty good job on this. However, I would like to highlight a few aspects regarding this solution. Firstly, the development workflow is a bit obscure (I wasn't able to use Powershell ISE). The workflow I find works best is:

1. **Make your changes/updates** to the runbooks in the Azure portal  
   a. This allows you to test the runbooks as you develop.  
   b. Be prepared for a slow feedback loop.
2. Identify good **incremental stopping points**, and SAVE your runbook.
3. **Copy** the entire runbook content. I recommend against manually adding your changes to the repository file, as you're more likely to introduce human error.
4. **Paste** the runbook content to your repository file (e.g. `create-rg.ps1`).
5. **Commit** the changes to the repository file.
6. **Push** your changes to the remote repository.  
   a. This will **automatically kick off the webhook** to publish those changes to the Azure Automation account.  
   b. This can take a few minutes.

I've put together some sample runbooks that demonstrate the techniques described above. Feel free to check them out [here](https://gist.github.com/jhennin/47d8e98e985137e36bbd94b8a8de4a4f?ref=blog.ippon.tech).

If you have any questions or comments about what you've read, we'd love to hear from you! Please send your inquiries to [contact@ippon.tech](mailto:contact@ippon.tech).

## Related Articles

##### [![Rehosting Made Easy with AWS MGN](https://blog.ippon.tech/hs-fs/hubfs/Blockchain-Dec-01-2024-06-59-49-3912-PM.png?width=520&height=294&name=Blockchain-Dec-01-2024-06-59-49-3912-PM.png) Azure • March 20, 2026 Rehosting Made Easy with AWS MGN 12 min read](https://blog.ippon.tech/exploring-rehosting-with-aws-mgn)

##### [![Azure from an AWS World](https://blog.ippon.tech/hs-fs/hubfs/Imported_Blog_Media/Azure-from-an-AWS-World-3.png?width=520&height=294&name=Azure-from-an-AWS-World-3.png) Azure • December 18, 2022 Azure from an AWS World 4 min read](https://blog.ippon.tech/azure-from-an-aws-world)

##### [![Copy Data Using Azure Data Factory to Avoid Server-Side Timeouts](https://blog.ippon.tech/hs-fs/hubfs/Imported_Blog_Media/adf-timeouts-cover-3.png?width=520&height=294&name=adf-timeouts-cover-3.png) Big Data • January 7, 2022 Copy Data Using Azure Data Factory to Avoid Server-Side Timeouts 6 min read](https://blog.ippon.tech/avoid-sql-timeouts-from-adf)

### Comments

### Subscribe to Our Blog!

Stay informed with the latest insights and updates by signing up for our weekly blog newsletter – delivered straight to your inbox!

[Back to blog homepage »](https://blog.ippon.tech/)

![IpponLogoKleinBlue](https://blog.ippon.tech/hs-fs/hubfs/IpponLogoKleinBlue.png?width=247&height=73&name=IpponLogoKleinBlue.png "IpponLogoKleinBlue")

Ippon is a consulting and expertise firm, who is convinced that technology is a source of progress for society. We help our clients leverage their digital assets to design an appropriate strategy and deploy their transformation roadmap at scale.

#### Navigation

- [Home](https://ipponusa.com/)
- [About](https://ipponusa.com/about-us/)
- [Services](https://ipponusa.com/services/)
- [Blogs](https://blog.ippon.tech/?__hstc=223043268.1036d82247623b329dfefe4e92697801.1714729179243.1714729179243.1714729179243.1&__hssc=223043268.2.1714729179244&__hsfp=803678701)
- [eBooks](https://ipponusa.com/ebooks/)
- [The Data Pour](https://info.ippon.tech/the-data-pour?__hstc=223043268.1036d82247623b329dfefe4e92697801.1714729179243.1714729179243.1714729179243.1&__hssc=223043268.2.1714729179244&__hsfp=803678701)

[Contact Us](https://ipponusa.com/contact/)

[Join Us](https://ipponusa.com/careers/)

#### Services

- [Data & Analytics](https://ipponusa.com/service/data-analytics/)
- [Cloud Strategy](https://ipponusa.com/service/cloud-strategy/)
- [Artificial Intelligence](https://ipponusa.com/service/artificial-intelligence/)
- [Operating Model](https://ipponusa.com/service/operating-model/)
- [Platform Modernization](https://ipponusa.com/service/platform-moderization/)
- [Product Innovation](https://ipponusa.com/service/product-innovation/)

#### Ippon International

- [France](https://fr.ippon.tech/?__hstc=223043268.1036d82247623b329dfefe4e92697801.1714729179243.1714729179243.1714729179243.1&__hssc=223043268.2.1714729179244&__hsfp=803678701)
- [Australia](https://au.ippon.tech/?__hstc=223043268.1036d82247623b329dfefe4e92697801.1714729179243.1714729179243.1714729179243.1&__hssc=223043268.2.1714729179244&__hsfp=803678701)

- #### Contact
- Ippon Technologies  
  [3431 West Leigh Street Richmond, VA 23230, USA](https://maps.app.goo.gl/RySm6SAwZnsxeiLz9)
- [(844) 477- 6687](tel:8444776687)
- [Sales@ipponusa.com](mailto:Sales@ipponusa.com)

<https://www.facebook.com/IpponUSA/> <https://www.youtube.com/c/ipponusa> <https://www.linkedin.com/company/ippon-technology>

©Copyright 2024 Ippon USA. All Rights Reserved.   |   [Terms and Conditions](https://ipponusa.com/privacy-policy/)   |   [Privacy Policy](https://ipponusa.com/privacy-policy/)   |   [Website by Skol Marketing](https://skolmarketing.com/)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Jake Henningsgaard",
    "url" : "https://blog.ippon.tech/author/jake-henningsgaard"
  },
  "dateModified" : "2024-01-29T17:53:42.889Z",
  "datePublished" : "2017-08-07T14:52:00.000Z",
  "headline" : "Azure Automation: Leveraging Runbooks - Ippon Technologies USA Blog",
  "image" : [ "https://blog.ippon.tech/hubfs/Imported_Blog_Media/Azure-Automation--Leveraging-Runbooks-Blog--1--3.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.ippon.tech/azure-automation",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.ippon.tech/hubfs/logo_SVG.svg"
    },
    "name" : "Ippon Technologies"
  }
}
```