Thursday, September 18, 2014

Get started with Windows Azure Automation

Sign up for the Azure Automation Preview

To start using Automation, you’ll need an active Azure subscription with the Microsoft Azure Automation preview feature enabled.
  • On the Preview Features page, click try it now.
    Enable Preview

Download a sample runbook from the Script Center

  1. Go to Script Center, and then click Hello World for Azure Automation.
  2. Click the file name, Write-HelloWorld.ps1, next to Download, and then save the file to your computer.

Import, run, and view the sample runbook in Azure Automation

  1. Log in to the Azure Management Portal.
  2. In the Management Portal, click Create an Automation Account.
    Create Account
  3. On the Add a New Automation Account page, enter a name for the account, and then click the check mark.
    Add New Account
  4. On the Automation page, click the new account you just created.
    New Account
  5. Click RUNBOOKS.
    Runbooks Tab
  6. Click IMPORT.
    Import
  7. Browse to the Write-HelloWorld.ps1 script you downloaded, and then click the check mark.
    Browse
  8. Click Write-HelloWorld.
    Imported Runbook
  9. Click AUTHOR, and then click DRAFT. For this runbook, you don’t need to make any modifications.
    You can now see the contents of Write-HelloWorld.ps1. You can modify the contents of a runbook in Draft mode.
    Author Draft
  10. Click PUBLISH to promote the runbook so it's ready for production use.
    Publish
  11. When you are prompted to save and publish the runbook, click Yes.
    Save and Pub prompt
  12. Click PUBLISHED, and then click START.
    Published
  13. On the Specify the runbook parameter values page, type a Name that will be used as an input parameter for the Write-HelloWorld.ps1 script, and then click the check mark.
    Runbook Parameters
  14. Click JOBS to check the status of the runbook job you just started, and then click the timestamp in the JOB START column to view the job summary.
    Runbook Status
  15. On the SUMMARY page you can see the summary, input parameters, and output of the job.
    Runbook Summary

Managing Azure Services from a Runbook

The example above shows a simple runbook that does not manage Azure services. The Azure cmdlets require authentication to Azure. You can follow the instructions at Azure Automation: Authenticating to Azure using Azure Active Directory in order to configure your Azure subscription for management through Azure Automation.

0 comments: