Git Product home page Git Product logo

automation-packs's Introduction

Automation Packs

Automation Packs include an Azure Resource Manager template that deploys Automation resources to Azure. The template can include any Automation resource needed for an Automation solution. Automation resources include:

  • Runbooks
  • DSC Configurations
  • DSC Configuration Compilation Jobs
  • Runbook jobs
  • Integration Modules
  • Schedules
  • Credentials
  • Certificates
  • Variables
  • Connections

##Rules for contributing to the Automation repository

  1. Each Automation pack is contained in its own folder.

  2. The parent deployment template must be named azuredeploy.json. You can also have child templates which do not need to follow a naming convention.

  3. Include a Readme.md file that explains: 4. How the template works and what the Automation pack automates 5. What resources are deployed 6. Includes the "Deploy to Azure" link 7. Any known limitations

  4. Any Automation assets used in your runbooks or DSC configurations should be included in the deployment template.

  5. Any runbooks, modules, or DSC Configurations in your ARM template should use the following conventions:

  6.  1. A **variable** containing the **URL** for the resource content
     2. A **variable** containing the **Name** of the resource
    
  7. Any Automation assets in your template should follow the the following conventions:

  8.  1. **Parameter(s)** for the asset value(s) are in the deployment template to allow end users input their own values
     2.  A **variable** for each asset name 	
    
  9. Template parameters should:

    1. Follow camelCasing
    2. Contain allowedValues wherever it makes sense
    3. Have the description specified using the metadata property. An example is included below:
"automationAccountName": {
      "type": "string",
      "metadata": {
          "description": "The name of the Automation Account"
      }
}

##Recommendations for writing your Automation Pack

Runbooks in Automation Packs

You can store runbooks referenced in Automation Packs in two different ways:

  1. In an external location of your choice. Preferred locations are the PowerShell Gallery or Script Center
  2. In a Runbook subfolder within the Automation Pack.

Best practices for runbooks:

  1. Follow practices outlined here.
  2. Always include a header with the following when publishing to PowerShell Gallery:
	<#PSScriptInfo
    
	    .Version 1.0
	    .Author elcooper
	    .CompanyName Microsoft Corporation
	    .Copyright (c) 2015 Microsoft Corporation. All rights reserved.
	    .Tags Tag1 Tag2
	    .LicenseUri https://contoso.com/License
	    .ProjectUri https://contoso.com/
	    .IconUri https://contoso.com/MyScriptIcon
	    .ExternalModuleDependencies bar
	    .RequiredScripts foo 
	    
	    .ReleaseNotes 
	         contoso script now supports following features
	         Feature 1
	         Feature 2
	         Feature 3
	         
	#>

PowerShell Modules in Automation Packs

You can store modules used in your runbook in two different ways:

  1. Create a Module subfolder and place all your modules in the folder.
  2. Place your modules on the PowerShell GitHub repository and publish your module to PowerShell Gallery.

To deploy a module, you must also have a zipped module folder formatted for Azure Automation. This is used in the Azure Resource Manager deployment template. For more on creating modules for Azure Automation see Authoring Integration Modules.

Follow the PowerShell best practices for publishing a module to the PowerShell gallery outlined in this blog.

Other notes on authoring Automation Packs

If you have a pack that contains many Automation resources, you can write one parent template that refers to the base templates: 000-base-templates. This allows you to reuse the core Automation resource templates without having to write your own.

automation-packs's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dylanhughes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.