Fredrik Knalstad - 10 ways to trigger orchestrator runbooks in the it jungle

2,652 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,652
On SlideShare
0
From Embeds
0
Number of Embeds
2,154
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • OrchestratorIn System Center 2012, System Center 2012 SP1, and System Center 2012 R2, the Orchestrator component enables you to automate business processes and IT operations in your data center without scripting or programming. Orchestrator is a feature in System Center 2012. If you already have System Center 2012 installed, and you do not plan to install Windows Azure Pack, use Orchestrator.Service Management Automation (SMA)Automation in Windows Azure Pack enables you to automate processes within the Windows Azure Pack. Because Automation runs Windows PowerShell workflows, you can also use Windows PowerShell cmdlets to run other System Center 2012 components, including Orchestrator. If you are planning to use the Windows Azure Pack, use Automation, and then you can continue to leverage your System Center 2012 installation (if one exists).Orchestrator Service Management Automation (SMA) is a new component that has been added in System Center 2012 R2, and although initially it might seem to be an extension to Orchestrator--which in itself is already part of System Center--it's really a completely separate component.It's also possible for organizations leveraging Windows Azure Pack to integrate their own PowerShell workflows into SMA. PowerShell is the future direction for Microsoft, and with Orchestrator SMA, those PowerShell efforts benefit from the capabilities and scalability (such as multiple SMA runbook servers) formerly possible only with Orchestrator runbooks.Note that SMA automations are not compatible with Orchestrator, and Orchestrator runbooks will not work with SMA.Through sessions on NIC you will see examples of SMA and the usage of Windows Azure Pack and how SMA works.“Most important both IT process automation solutions has in common – start using PowerShell!!!”
  • Orchestrator Web Service runs on IIS.Orchestrator Web Service is a OrchestratorRoleTheorchestrator Web service is thecommunicationpointwithother Software products in OrhestratorThe Orchestrator web service must be installed on a server that is running Internet Information Services (IIS). The Orchestrator web service does not have to be available for runbook servers or runbooks to function. If the Orchestrator web service is not available, you cannot run the Orchestration console to start, monitor, or stop runbooks. You can install the web service on multiple IIS servers configured for load balancing to provide high availability and additional capacity.
  • Transactional communication with RESTful web services Windows Integrated and Certificate+based AuthenticationOpens Possibilities of Interaction Between Orchestrator Instances
  • Service Root URIDefinestherootoftheOdata service. This includestheprotocol to eitheruse http or https. Path to the computer hosting the service and port number.Resource PathThe resourcepathdefinestheresourcesthatyouwant to workwith. This can be a single resource as a runbook or a collectionofrunbooks or a collectionofjobs.Query Options Allowyou to furtherrefinewhich data is returned and how it is ordered.System Query Options are query string parameters a client may specify to control the amount and order of the data that an OData service returns for the resource identified by the URI. 
  • Powershell is higglyintegrated in Orchestrator. SinceOrchestrator and Powershellarebuilton.Net Framework, powershell is an exellentmethodofintegratingwithproducts and solutions.Windows PowerShell does not have the ability to use a Service Reference as does a program written using Visual Studio.Instead, you must create an http request that has the required properties and the details of the runbook you want to start. You can parse the response to the request to determine information such as its completion status and the details of the resulting job.If the runbook requires parameters, you must specify the GUID for each parameter and the value to populate it with. This information is included in a Parameters XML element that uses a CDATA to distinguish it from the XML of the request itself. You can retrieve the parameters for a runbook with and their details with a request similar to the following:http://server01.contoso.com:81/Orchestrator2012/Orchestrator.svc/Runbooks(guid'00000000-0000-0000-00000000000000000')/ParametersThe following example shows how to start a runbook using Windows PowerShell. The runbook in this example has two parameters. The values for these two parameters are stored in an array variable before being added to the XML for the request. For a runbook that does not have parameters, you can leave the Parameters element of the request empt
  • you must create an http request that has the required properties and the details of the runbook you want to start. You can parse the response to the request to determine information such as its completion status and the details of the resulting job.
  • If the runbook requires parameters, you must specify the GUID for each parameter and the value to populate it with. This information is included in a Parameters XML element that uses a CDATA to distinguish it from the XML of the request itself. You can retrieve the parameters for a runbook with and their details with a request similar to the following:
  • Automaticallyproviderunbook parametersSelect this option to automatically provide the Orchestrator runbook input parameter values( which assumes that the runbook parameter values are task sequence variables). For example, if a runbook has an input parameter named OSDComputerName, then the OSDComputerName task sequence variable value is passed to the runbook.Specifyexplicit  runbook parametersSelect this option to explicitly provide the Orchestrator runbook input parameters.You must configure the following settings for each input parameter that the Orchestrator runbook requires:
  • Unlike the setup in place for web services and stored procedures, the Orchestrator support is not tied to CustomSettings.ini.  Instead, it is designed to run at any point in the task sequence itself by adding a new “Execute Orchestrator Runbook” requests wherever you want them:If that runbook accepts input parameters, you can pass those from the task sequence either explicitly (type in the value you want, using variable substitution if necessary) or implicitly (if the runbook parameter name matches the name of a task sequence variable, the value of that variable will be passed automatically).
  • Each running runbook consumes a “slot” in the available runbook throttling limit that’s set for each Runbook Server.For every runbook that is running - every monitor runbook that is active, every runbook and all of the child runbooks that they might call – there is a PolicyModule.exe instance and that is consuming one of those slots in the throttling limit.In addition to the above, realize that you may have multiple monitor runbooks running against the same data source. For example, you may be monitoring Operations Manager for certain conditions like new alerts of a certain type or changes in status of a monitor for a set of computers.t’s highly likely that you will have multiple monitors, each polling the Operations Manager server every 5 seconds, putting additional load on the Operations Manager server because it has to do queries of its data every 5 seconds for 5 or 10 (or maybe more) different monitors. Now repeat this scenario across your other data sources, like Service Manager, Configuration Manager, Virtual Machine Manager, and so on. You begin to see how this might have a performance impact not only on Orchestrator, but on the other systems as well.
  • Each running runbook consumes a “slot” in the available runbook throttling limit that’s set for each Runbook Server.For every runbook that is running - every monitor runbook that is active, every runbook and all of the child runbooks that they might call – there is a PolicyModule.exe instance and that is consuming one of those slots in the throttling limit.In addition to the above, realize that you may have multiple monitor runbooks running against the same data source. For example, you may be monitoring Operations Manager for certain conditions like new alerts of a certain type or changes in status of a monitor for a set of computers.t’s highly likely that you will have multiple monitors, each polling the Operations Manager server every 5 seconds, putting additional load on the Operations Manager server because it has to do queries of its data every 5 seconds for 5 or 10 (or maybe more) different monitors. Now repeat this scenario across your other data sources, like Service Manager, Configuration Manager, Virtual Machine Manager, and so on. You begin to see how this might have a performance impact not only on Orchestrator, but on the other systems as well.
  • Connect to webserviceusingprogramming Language or scriptinglanguagethat is capableof sending an HTTP request and recieivingitsresponse
  • Fredrik Knalstad - 10 ways to trigger orchestrator runbooks in the it jungle

    1. 1. Fredrik Kristian Knalstad 10 ways to trigger Runbooks from the IT Jungle
    2. 2. Service Manager HP Service Manager Software Make your IT service desk enterprise strength OpenView Operations
    3. 3. INTEGRATION PACKS Third-Party 25% Microsoft 50% Community 25%
    4. 4. SMA Powershell Authoring Orchestrator Interoperability Powershell Engine Graphical Authoring UI Runbook Engine Process Automation
    5. 5. 10 Orchestrator Web Service
    6. 6. Orchestrator Web Service Web Service Triggered Result Returned to webservice Job status Returned Job Created in DB Runbook Designer Management Server Info sent back to DB Orchestrator Database Job executed Runbook Server
    7. 7. 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.
    8. 8. Odata Queries [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’
    9. 9. Demo..
    10. 10. 9 Powershell
    11. 11. 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
    12. 12. Runbook GUID Parameter GUID Parameter Value # 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-91757821f8782a8c" = " This is the value for Param2."} # Create the request object $request = [System.Net.HttpWebRequest]::Create("http://scor2012r201.knallert.local:81/Orchestrator2012/Orchestrator.svc/Jobs") Web Service URL
    13. 13. System Center Orchestrator Web Service Powershell Module Get-OrchestratorServiceUrl Get-OrchestratorCollection Get-OrchestratorJob Get-OrchestratorRunbook Get-OrchestratorRunbookInstance Get-OrchestratorRunbookInstanceParameter Stop-OrchestratorJob Start-OrchestratorRunbook OData PowerShell Explorer • Available on Codeplex
    14. 14. 8 Configuration Manager MDT Integration
    15. 15. Application Deployment • Powershell • SCOJoBRunner OS Deployment • Powershell (Task Sequence) • MDT Integration (Task Sequence) Client Management • Runbook Commander 2.0
    16. 16. Demo..
    17. 17. Remember: MDT Orchestrator Step (Task Sequence) • Network access account added to the OrchestratorUserGroup
    18. 18. 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)
    19. 19. 7 Monitor Activity
    20. 20. Integration Pack Activity Exchange Users Integration Pack Monitor Item Operations Manager Integration Pack Monitor Alert Monitor 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
    21. 21. 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.
    22. 22. 6 Service Manager Runbook Template
    23. 23. 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
    24. 24. Runbook Designer: • Create the Runbook • Make sure Runbook is [Check in]
    25. 25. Orchestrator Connector: • Orchestrator Web Service • Run As account • Select the Sync folder • URL to the Web console
    26. 26. Service Manager Runbooks: • Active / Missing • Naming Convention
    27. 27. Runbook Activity Template: • Is Ready for Automation
    28. 28. Add User to Local Administrators Service Request Template IT Administrators Approve (Review Activity) Add User to AD Group (Runbook Activity Template)
    29. 29. Demo..
    30. 30. Add User to Local Adminstrators v1
    31. 31. Add User to Local Adminstrators v2
    32. 32. 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
    33. 33. 5 EUPSCO End User Portal Orchestrator
    34. 34. 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
    35. 35. Demo..
    36. 36. 4 Custom Integrations Orchestrator Web Service
    37. 37. Custom Integrations: • • • Console Application (CMD) Formbased Application (UI) Webform / Website (.NET) • Visual Studio or Visual C# 2010 Express
    38. 38. Demo..
    39. 39. 3 Orchestrator Web Console
    40. 40. Runbook Designer Management Server Orchestrator Database Runbook Server
    41. 41. Demo..
    42. 42. TRUNCATE TABLE [Microsoft.SystemCenter.Orchestrator.Internal].AuthorizationCache
    43. 43. Orchestrator Web Console • • Delegation of access to Users and Groups (Service Desk) Offload usage of Runbook Designer
    44. 44. 2 SCOJobRunner Task Activities
    45. 45. 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
    46. 46. Default SCOJobRunner.exe -ID "Runbook ID" -webserver: "ServerName" Parameters:"Computer Name=Variable" With Input SCOJobRunner.exe -ID "79cf665b-9f4f-4273-9d4f-67aaf0da868e" webserver:"SCOR2012R201" -Parameters:"Computer Name=MGTCLIENT"
    47. 47. Service Manager
    48. 48. 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
    49. 49. Demo..
    50. 50. 1 Orchestrator Mobile Windows Phone App
    51. 51. 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).
    52. 52. 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
    53. 53. Thank you Fredrik.knalstad@crayon.com Twitter: Theknall

    ×