Get Started with Service Management Automation: Walkthrough Guide

Service Management Automation is a feature of the management portal for administrators in Windows Azure Pack for Windows Server. You can use it to automate administrative tasks in the management portal. You automate your tasks by using runbooks, which run Windows PowerShell commands. You can also use a runbook to run another runbook within its workflow. When the secondary runbook is finished, runbook implementation returns to the calling runbook.

This step-by-step walkthrough shows you how to create and import runbooks, how to run a runbook, and how to view the jobs that track the runbook’s progress.

This document assumes that you have installed the Service Management Automation web service and one or more runbook workers. Also, you must download one or more of the runbooks that have been posted on CodePlex, which is the free open source project hosting site that Microsoft provides for this release of Windows Azure Pack. After you complete this walkthrough, you will know how to manage runbooks in Windows Azure Pack Automation.

You'll learn:

·      How to specify the web service endpoint to enable the Automation feature in Windows Azure Pack

·      How to import a runbook

·      How to edit a runbook

·      How to test and publish a runbook

·      How to add global settings for runbooks to use

·      How to run a runbook

·      How to track the progress of a runbook

Time requirements

The procedures in this document require 40 to 60 minutes for a new user to complete. These time estimates assume that the Windows Azure Pack environment is already configured. They do not include the time that is required to set up the Windows Azure Pack environment.

Walkthrough steps

·      Prerequisites

·      Step 1: Specify the web service endpoint

·      Step 2: Import a runbook

·      Step 3: Edit a runbook

·      Step 4: Run a runbook

·      Next steps

Prerequisites

The prerequisites for this walkthrough are to install the Service Management Automation web service and to have an operational version of Windows Azure Pack for Windows Server. For more information, see Installing the Service Management Automation Web Service or Deploying Windows Azure Pack for Windows Server.

Step 1: Specify the web service endpoint

The Service Management Automation web service provides a network address or endpoint that Automation uses to perform all of its functions. After you install Windows Azure Pack, specify the web service endpoint to turn on the Automation feature. When you install the web service, make sure that you keep a record of the endpoint URL.

To specify the web service endpoint

1.   In the management portal for administrators in Windows Azure Pack for Windows Server, click Automation.

2.   Click Register the Service Management Automation endpoint and supply the following information:

·      The service URL and port. They were configured when you installed the web service.

·      The user name of a user account that can access the Service Management Automation web service. Accounts with access to the Service Management Automation web service are also configured during installation.

·      The access password for the user account.

That’s it! You’re done. All Automation functionality in Windows Azure Pack for Windows Server is now available to you. It’s time to begin working with runbooks.

Step 2: Import a runbook

In this preview release, no runbooks are installed with the feature. You must have downloaded one or more runbooks from CodePlex to proceed.

To import a runbook

1.   In the management portal for administrators in Windows Azure Pack for Windows Server, click Automation.

2.   On the Automation page, click the Runbooks tab.

3.   On the Runbooks page, click Import Runbook.

4.   Click the Folder icon to browse to the file that you want to import.

5.   When the file is imported, a notification of the task’s success appears.

Now that you have imported a runbook, it is displayed in the list of runbooks on the Runbooks tab, and it is available to be selected so that you can use the Command bar commands such as Delete.

Step 3: Edit a runbook

After importing a runbook, you must publish it to make it available to run. To do that, you must first edit it, which does not require that you make any changes, so that you can test the runbook and publish it.

To edit a runbook

1.   In the management portal for administrators in Windows Azure Pack for Windows Server, click Automation.

2.   On the Automation page, click the Runbooks tab.

3.   On the Runbooks page, click the name of a runbook in the list.

4.   Click Author, and then click Draft.

5.   If the runbook was not previously in draft mode, click Edit Runbook.

6.   Do one or more of the following:

·      Click Insert to insert an activity, a setting, or another runbook.

·      Click Save to save the runbook draft in its current state.

·      Click Discard Draft to stop editing the runbook and to discard your changes.

·      Click Test to test the runbook for any execution errors. You can see the output from the runbook test in the Output Pane.

·      Click Publish to make the runbook available to run. Any scheduled or manual start of the runbook runs the published version of the runbook.

You’ve now seen how to edit a runbook and take the draft runbook through the steps to test and publish. In the previous step 6, you were invited to insert a "setting" into a runbook. A setting is a global resource that is available to be used in all runbooks. The Resources page in Automation displays the various settings that are globally available to use in or are available to be used in association with a runbook. Settings include variables, schedules, Windows PowerShell credentials, certificates, and connections. Connections are defined in integration modules.

Step 4: Run a runbook

Now that you have a published runbook available to you, you can run it.

To run a runbook

1.   In the management portal for administrators in Windows Azure Pack for Windows Server, click Automation.

2.   On the Automation page, click the Runbooks tab.

3.   On the Runbooks page, click the runbook information anywhere outside of the blue Name column to select the runbook. If it is published and available to run, click Start on the Command bar.

4.   While the runbook is running, you can click View Jobs in the runbook notification to view job output.

5.   While the runbook is running or after the runbook has completed, you can click the name of the runbook on the Runbooks tab, and then click the Jobs tab to see a list of jobs for that runbook that are arranged by time stamp. Click a time stamp in the Job Start column of the list to see details for the job.

Congratulations, you ran a runbook!

Next steps

In this tutorial, you've seen how to import, edit, and run a runbook in the Automation feature of Windows Azure Pack for Windows Server. Feel free to explore the other features in Automation such as Resources on your own. You can also read the other walkthroughs that are available at Evaluation Guide for System Center 2012 R2 and the Windows Azure Pack.