Top Banner
Fredrik Kristian Knalstad 10 ways to trigger Runbooks from the IT Jungle
61

10 ways to trigger runbooks from Orchestrator

Dec 07, 2014

Download

Technology

10 ways to trigger runbooks from Orchestrator from NIC2014.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 10 ways to trigger runbooks from Orchestrator

Fredrik Kristian Knalstad10 ways to trigger Runbooks from the IT Jungle

Page 4: 10 ways to trigger runbooks from Orchestrator

Powershell Authoring

Graphical Authoring

Powershell Engine

UI Runbook Engine

Process Automation

Interoperability

SMA Orchestrator

Page 5: 10 ways to trigger runbooks from Orchestrator

10Orchestrator Web Service

Page 6: 10 ways to trigger runbooks from Orchestrator

RunbookServer

Management Server

OrchestratorDatabase

RunbookDesigner

Orchestrator Web Service

Web Service Triggered

Job Created in DBJob executed

Info sent back to DB

Result Returned to webservice

Job status Returned

Page 7: 10 ways to trigger runbooks from Orchestrator

Http://Servername/Orchestrator/Orchestrator2012.svc

• Orchestrator Web Service• REST based API • Exposes Orchestrator Resources and relationship through Open Data Protecol (Odata)• Interact with the web service through URL syntax• Return data is listed in XML• Access the web service through programming language like C# and Powershell to automate

Orchestrator functionality• Windows Integrated and Certificate based authentication

• Orchestrator web service is the only supported method of automating Orchestrator or accessing information.

Page 8: 10 ways to trigger runbooks from Orchestrator

[Service Root URI]/[Resource Path]?[Query Options]

http://SCOR2012R201:81/Orchestrator2012/Orchestrator.svc

http://SCOR2012R201:81/Orchestrator2012/Orchestrator.svc /Runbooks

http://SCOR2012R201:81/Orchestrator2012/Orchestrator.svc /Runbooks?$filter=Name eq ‘Client Diagnostics’

Odata Queries

Page 9: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 10: 10 ways to trigger runbooks from Orchestrator

9Powershell

Page 11: 10 ways to trigger runbooks from Orchestrator

Powershell:

• Integrated in Orchestrator• Excellent method of integrating with products and solutions• Must create an http request that has the required properties • Specify the GUID for each parameter and the value to populate it with

Page 12: 10 ways to trigger runbooks from Orchestrator
Page 13: 10 ways to trigger runbooks from Orchestrator

# Details of the runbook we are going to run$rbid = "ba5346ed-af8e-48bf-966b-85e3e461763f" $rbParameters = @{"863b70e9-f12e-43ef-ba1b-1094b3ea63f7" = "This is the value for Param1.";"ce36281b-b1d0-41cf-9175-7821f8782a8c" = " This is the value for Param2."}

# Create the request object$request = [System.Net.HttpWebRequest]::Create("http://scor2012r201.knallert.local:81/Orchestrator2012/Orchestrator.svc/Jobs")

Runbook GUID Parameter GUID

Web Service URL

Parameter Value

Page 14: 10 ways to trigger runbooks from Orchestrator

System Center Orchestrator Web Service Powershell ModuleGet-OrchestratorServiceUrl

Get-OrchestratorCollectionGet-OrchestratorJobGet-OrchestratorRunbookGet-OrchestratorRunbookInstanceGet-OrchestratorRunbookInstanceParameterStop-OrchestratorJobStart-OrchestratorRunbook

OData PowerShell Explorer

• Available on Codeplex

Page 15: 10 ways to trigger runbooks from Orchestrator
Page 16: 10 ways to trigger runbooks from Orchestrator

8Configuration Manager

MDT Integration

Page 17: 10 ways to trigger runbooks from Orchestrator

Application Deployment• Powershell• SCOJoBRunner

OS Deployment• Powershell (Task Sequence)• MDT Integration (Task Sequence)

Client Management• Runbook Commander 2.0

Page 18: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 19: 10 ways to trigger runbooks from Orchestrator

Remember:

MDT Orchestrator Step (Task Sequence)• Network access account added to the OrchestratorUserGroup

Page 20: 10 ways to trigger runbooks from Orchestrator

Where can I use this:

•Moving a computer to a new OU. (Active Directory)•Adding Computers to Groups (Active Directory)•Generating or retrieving a computer name. (Local Computer / Active Directory)•E-mailing when a deployment fails (SMTP)•Creating a trouble ticket/Incident when a deployment fails(Service Manager)

Page 21: 10 ways to trigger runbooks from Orchestrator

7Monitor Activity

Page 22: 10 ways to trigger runbooks from Orchestrator

Integration Pack Activity

Exchange Users Integration Pack Monitor Item

Operations Manager Integration Pack Monitor AlertMonitor State

Service Manager Integration Pack Monitor Object

Virtual Machine Manager Integration Pack Monitor VMM Job

Standard Activites Monitor Service

Monitor Event Log

Get Service Status

Monitor Process

Get Process Status

Monitor Computer/IP

Get Computer/IP Status

Page 23: 10 ways to trigger runbooks from Orchestrator
Page 24: 10 ways to trigger runbooks from Orchestrator

Remember:

Runbook Server• Default 50 slots per Runbook server• Policy module.exe instance run for every starting runbook.• Large environments its better that remote integration is triggered.• Performance impact not only on Orchestrator, but on the other systems as

well.

Page 25: 10 ways to trigger runbooks from Orchestrator

6Service Manager

Runbook Template

Page 26: 10 ways to trigger runbooks from Orchestrator

Runbook Template

• Automating processes and enforcing best practices for incident, change, and service-life-cycle management

• Reducing unanticipated errors and service delivery time by automating tasks across responsibility groups within your IT organization

• Integrating System Center with non-Microsoft tools to enable interoperability across the datacenter

• Orchestrating tasks across systems for consistent, documented, and compliant activity

Page 27: 10 ways to trigger runbooks from Orchestrator

Runbook Designer:• Create the Runbook• Make sure Runbook is [Check in]

Page 28: 10 ways to trigger runbooks from Orchestrator

Orchestrator Connector:• Orchestrator Web Service• Run As account• Select the Sync folder• URL to the Web console

Page 29: 10 ways to trigger runbooks from Orchestrator

Service Manager Runbooks:• Active / Missing• Naming Convention

Page 30: 10 ways to trigger runbooks from Orchestrator

Runbook Activity Template:• Is Ready for Automation

Page 31: 10 ways to trigger runbooks from Orchestrator

Serv

ice R

equest Te

mpla

te

IT Administrators Approve(Review Activity)

Add User to AD Group(Runbook Activity Template)

Add User to Local Administrators

Page 32: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 33: 10 ways to trigger runbooks from Orchestrator

Add User to Local Adminstrators v1

Page 34: 10 ways to trigger runbooks from Orchestrator

Add User to Local Adminstrators v2

Page 35: 10 ways to trigger runbooks from Orchestrator

Remember:

Orchestrator Connector• Connector account added to the OrchestratorUserGroup

Orchestrator• Runbook needs to be checked in or it will be listed as «Missing» in Service

Manager

Page 36: 10 ways to trigger runbooks from Orchestrator

5EUPSCO

End User Portal Orchestrator

Page 37: 10 ways to trigger runbooks from Orchestrator

End User Portal for System Center Orchestrator• No Cost• Service Request• Order on Behalf• Activity Delegation (Approval)• Active Directory LDAP Sync• Custom services based on your Runbooks

Page 38: 10 ways to trigger runbooks from Orchestrator
Page 39: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 40: 10 ways to trigger runbooks from Orchestrator

4Custom Integrations

Orchestrator Web Service

Page 41: 10 ways to trigger runbooks from Orchestrator

Custom Integrations:

• Console Application (CMD)• Formbased Application (UI)• Webform / Website (.NET)

• Visual Studio or Visual C# 2010 Express

Page 42: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 43: 10 ways to trigger runbooks from Orchestrator

3Orchestrator Web Console

Page 44: 10 ways to trigger runbooks from Orchestrator

RunbookServer

Management Server

OrchestratorDatabase

RunbookDesigner

Page 45: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 46: 10 ways to trigger runbooks from Orchestrator
Page 47: 10 ways to trigger runbooks from Orchestrator

TRUNCATE TABLE [Microsoft.SystemCenter.Orchestrator.Internal].AuthorizationCache

Page 48: 10 ways to trigger runbooks from Orchestrator

Orchestrator Web Console

• Delegation of access to Users and Groups (Service Desk)• Offload usage of Runbook Designer

Page 49: 10 ways to trigger runbooks from Orchestrator

2SCOJobRunner

Task Activities

Page 50: 10 ways to trigger runbooks from Orchestrator

SCOJobRunner.exe Type Example:

-ID Runbook ID 79cf665b-9f4f-4273-9d4f-67aaf0da868e

-Webserver Computername SCOR2012R201

-Port Orchestrator Webservice Port 81

-Parameters: Input Parameters in Runbook "Computer Name=%Input%"

-RunbookServer Runbook Server to execute the job

SCOR2012R201

Page 51: 10 ways to trigger runbooks from Orchestrator

DefaultSCOJobRunner.exe -ID "Runbook ID" -webserver: "ServerName" -Parameters:"Computer Name=Variable"

With InputSCOJobRunner.exe -ID "79cf665b-9f4f-4273-9d4f-67aaf0da868e" -webserver:"SCOR2012R201" -Parameters:"Computer Name=MGTCLIENT"

Page 52: 10 ways to trigger runbooks from Orchestrator
Page 53: 10 ways to trigger runbooks from Orchestrator

Service Manager

Page 54: 10 ways to trigger runbooks from Orchestrator

Where can I use the SCOJobRunner?

• Service Manager – Console Task• Operation Manager – Console Task• Configuration Manager – Application Model [Deployment]• VMM Workflow – Build Server• Task Scheduler

Page 55: 10 ways to trigger runbooks from Orchestrator

Demo..

Page 56: 10 ways to trigger runbooks from Orchestrator

1Orchestrator Mobile

Windows Phone App

Page 57: 10 ways to trigger runbooks from Orchestrator
Page 58: 10 ways to trigger runbooks from Orchestrator
Page 59: 10 ways to trigger runbooks from Orchestrator

Remember:

• Phone has to have http(s) connectivity to Orchestrator Web Service• Orchestrator Web Service must be configured to allow Basic

authentication • If https is used then server certificate must be valid

• In order to enable Orchestrator Mobile to connect to Orchestrator Web Service from the internet, you have to publish it over a reverse proxy (like Microsoft Forefront TMG).

Page 60: 10 ways to trigger runbooks from Orchestrator

Summary

• Orchestrator Web Service• Powershell• Configuration Manager / MDT• Monitor Activity• Service Manager Runbook Template• End User Portal Orchestrator• Custom Integrations• Orchestrator Web Console• SCOJobRunner• Windows Phone App

Page 61: 10 ways to trigger runbooks from Orchestrator

Thank [email protected]

Twitter: Theknall