vCenter Orchestrator APIs

9,787 views

Published on

Sia Y. PM for vCenter Orchestrator provides overview of product and examples of using the APIs.

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

No Downloads
Views
Total views
9,787
On SlideShare
0
From Embeds
0
Number of Embeds
86
Actions
Shares
0
Downloads
224
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide
  • VMware recognizes the critical role our partners play in analyzing, recommending and delivering customer solutions.Last year, based on feedback we received from customers, partners and our own sales teams, we re-structured our overall partner program, now called VMware Partner Network. We did this to ensure we not only provided customers with world-class solutions, but that we provided partners with one of the best partner programs in the industry. We believe the tools, education and incentives available to you will help you increase your profitability as you solve your customers’ business challenges through VMware virtualization solutions.The VMware Partner Network provides programs to support many different partner business models. This presentation will be focused on Solution Providers. If you’re interested in learning more about the other partner types, please go to vmware.com/partners for more information.
  • VIVEK TO COVER
  • vCenter Orchestrator APIs

    1. 1. Integrating with vCenter Orchestrator<br />TEXMGT0900<br />SiaYiu, VMware, Inc.<br />
    2. 2. This session may contain product features that are currently under development.<br />This session/overview of the new technology represents no commitment from VMware to deliver these features in any generally available product.<br />Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.<br />Technical feasibility and market demand will affect final delivery.<br />Pricing and packaging for any new technologies or features discussed or presented have not been determined.<br />Disclaimer<br />“These features are representative of feature areas under development. Feature commitments are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind. Technical feasibility and market demand will affect final delivery.”<br />
    3. 3. Follow Us <br />Facebook Search for VMware Partner Network<br />TwitterSearch for VMware_Partners<br />http://blogs.vmware.com/powerofpartnership/ <br />Linkedin Search for VMware Partner Network<br />t<br />Join the conversationGet the latest scoopBe a part of the network<br />Subscribe to RSS<br />Follow this event LIVE!<br />#VMwarePEX2010<br />Help us help you! Please fill out the survey at the end of the course.<br />
    4. 4. Agenda<br />What is Orchestration? <br />Product overview<br />Web Service API<br />Plug-in API <br />Q&A <br />
    5. 5. How’s vCO distributed?<br /><ul><li>Every vSphere customer has vCO</li></ul>Installed by default with every VC<br />Services disabled<br />Require configuration<br /><ul><li>vCO comes in two “flavors”</li></ul>vSphere Essential and Foundation<br />vCO set in player mode: workflow execution only<br />No workflow creation capability<br />Import of new workflows is allowed<br />vSphere Standard<br />vCO set in server mode: workflow creation and execution<br />
    6. 6. What is Orchestration?<br />
    7. 7. Defining Automation and Orchestration<br /><ul><li>Automation</li></ul>A way to perform frequently repeated process without manual intervention.<br />Basic building block: a shell script, a Perl script, a PowerShell script <br />Example: given a list of hostnames, add ESX to VC. <br />Orchestration<br />A way to manage multiple automated processes across and among heterogeneous systems.<br />Example - Add ESX hosts from a list to VC, update CMDB with successfully added ESX hosts, then send email notification.<br />
    8. 8. What is Orchestration?<br />
    9. 9. What is Orchestration?<br />Talk to all sorts of devices<br />
    10. 10. What is Orchestration?<br />P<br />P<br />P<br />P<br />Talk to all sorts of devices<br />Configure for devices<br />P<br />P<br />
    11. 11. What is Orchestration?<br />Watch DVD<br />TV: turn on<br />Amp: turn on<br />DVD: turn on<br />TV: AUX input<br />Talk to all sorts of devices<br />Configure for devices<br />Program Activities<br />Amp: DVD input<br />
    12. 12. What is Orchestration?<br />Talk to all sorts of devices<br />Configure for devices<br />Program Activities<br />Use<br />
    13. 13. What is Orchestration?<br />The developer: “Talk to all sorts of devices”<br /><ul><li>Creating plug-ins and other means of integration
    14. 14. Creating the library of “pre-canned” actions and workflows</li></ul>The IT Admin: “Configure for devices”<br /><ul><li>Setting up the orchestrator for his environment </li></ul>Everyone: “Program Activities”<br /><ul><li>Creating new processes
    15. 15. Customizing existing ones </li></ul>The User “Use”<br /><ul><li>Run processes</li></li></ul><li>Another Analogy: The Orchestra Director<br /><ul><li>Orchestrator: Director
    16. 16. Partition: Workflows
    17. 17. Musicians: connected products & solutions</li></li></ul><li>Rules of Engagement<br />Bad<br /><ul><li>High CPU / memory
    18. 18. High throughput (network / data)
    19. 19. Real time
    20. 20. Good
    21. 21. Sequencing
    22. 22. Talking to multiple product / solutions
    23. 23. “Human” time scale
    24. 24. Customization</li></li></ul><li>What do Orchestrator Workflows Look Like?<br />If a datastore on a host is more than 95% utilized, <br />open a change control ticket then perform s-vMotion and send email notification<br />
    25. 25. Integrating with vCO: It’s About Choices<br /><ul><li>Things to consider:</li></ul>More key features and functionality from VMware solutions will be available as workflow building blocks in vCO.<br />For workflow oriented tasks, instead of performing integration with VC and each individual VMware solutions, integrate with vCO.<br />Benefit: one integration to VMware<br />Would mean integration using web service<br />
    26. 26. Two Ways to Integrate with Orchestrator<br /><ul><li>Use Orchestrator as a gateway for integration with vSphere </li></ul>Workflows are vCenter-upgrade resistant<br />Shorten learning curve in vSpehere API – workflows are written in Javascript<br />Write workflows and call them using web service <br /><ul><li>Provide customers an easy to way to integrate your management features with vCenter Server functionality• </li></ul>Allow customers to merge automation of vSphere with your product. <br />Make your product features available as workflow components in vCO<br />Provide VMware engineers easy access to your management functionality <br />Deliverable: a plugin with a set of sample workflows<br />
    27. 27. Product Overview<br />
    28. 28. Architecture – vCO Server: Execution Platform<br /><ul><li>Persistence
    29. 29. Centralization
    30. 30. Check-pointing
    31. 31. Version control
    32. 32. Scripting engine
    33. 33. Workflow engine
    34. 34. Policy engine
    35. 35. Security</li></ul>Access control (LDAP, rights)<br />PKI<br />SSL certificates<br />Directory<br />Services<br />Workflow<br />Trigger Rules<br />Scripting<br />vCO<br />Database<br />
    36. 36. vCOServer: Client Interface<br />Browser<br />Access<br />Client Application<br />Access<br />Directory<br />Services<br />Web Service<br />Access<br />vCO<br />Database<br />
    37. 37. vCOServer: Plugins for TechnologyInterfaces<br /><ul><li>VMware VIM 3.5
    38. 38. VMware vCenter (4)
    39. 39. Microsoft (WMI & AD)
    40. 40. XML
    41. 41. SSH
    42. 42. Database SDK
    43. 43. SNMP
    44. 44. Mail
    45. 45. Net</li></ul>Browser<br />Access<br />Client Application<br />Access<br />Directory<br />Services<br />Web Service<br />Access<br />vCO<br />Database<br />
    46. 46. vCOServer: Library of Workflows<br />Browser<br />Access<br />Client Application<br />Access<br />Directory<br />Services<br />Web Service<br />Access<br />Workflow Library<br />vCO<br />Database<br />
    47. 47. vCOServer: Provision for 3rd Party Extensions<br />Browser<br />Access<br />Client Application<br />Access<br />Web Service<br />Access<br />3rd party custom<br />3rd party Webview<br />3rd party Workflow<br />Workflow Library<br />3rd party<br />Plug-in<br />
    48. 48. WebService API<br />Remote workflow execution, status, cancelation <br />Plugin API <br />Written in Java <br />surface up external system functionality for use in workflows <br /><ul><li>Workflow - Javascript “API”</li></ul>Workflow authoring<br />Integration Points<br />Browser<br />Access<br />Client Application<br />Access<br />Directory<br />Services<br />Web Service<br />Access<br />1<br />Workflow Library<br />3<br />2<br />VCO<br />Database<br />
    49. 49. Web Service API<br />
    50. 50. Authoring in Orchestrator has Several Benefits<br />
    51. 51. Authoring Using the Integrated Workflow Environment<br />Drag and drop interface to workflow building<br />400 Out-of-box workflows & building blocks<br />All VI and ESX functions available in API, CLI, and VC UI.<br />SSH<br />WMI<br />SMTP<br />SNMP<br />Databases<br />Service desk and change control systems<br />Ability to export and share workflows<br />Schedule workflows<br />
    52. 52. Web Service API<br />
    53. 53. Web Service API - Introduction<br />Defined by a WSDL file.<br />Downloadable from:<br /><ul><li>http://<Orchestrator_server>:8280/vmware-vmo-webcontrol/webservice?WSDL</li></ul>Accessible at:<br /><ul><li>http://<Orchestrator_server>:8280/vmware-vmo-webcontrol/webservice</li></ul>Compile the WSDL with your favorite framework.<br />Supported:<br /><ul><li>Java (Axis)
    54. 54. .Net</li></ul>Will generate about 13 classes<br />
    55. 55. Web Service API – Main Objects<br />VSOWebControl:<br /><ul><li>The WSDL control port through which you access Orchestrator operations. </li></ul>Main operations:<br /><ul><li>executeWorkflow(…): WorkflowToken
    56. 56. getWorkflowForId(…): Workflow
    57. 57. find(…): FinderResult</li></li></ul><li>Web Service API – Main Objects<br />Other important Objects:<br /><ul><li>Workflow: An Orchestrator workflow.
    58. 58. WorkflowToken: An instance of a workflow (running, waiting, canceled, completed, or failed).
    59. 59. WorkflowParameter: An input, output or attribute description of a workflow. (name, type)
    60. 60. WorkflowTokenAttribute: An input, output of a workflow instance (WorkflowToken). (name, type, value)
    61. 61. FinderResult: Generic inventory object (type, id, properties)</li></li></ul><li>Web Service API – Typical Flow<br />Instantiate a VSOWebControl<br />Find Workflow<br />Find Input parameters<br />Start workflow (returns Token)<br />Check Token (wait completion)<br />Get results (outputs)<br />
    62. 62. Examples - Java<br />Run a workflow with no inputs<br />private static final String username = “xxx”;<br />private static final String password = “yyy”;<br />private static final String workflowID =<br /> "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";<br />private static final String endpoint =<br /> “http://vco:8280/vmware-vmo-webcontrol/webservice”;<br />// vCO Web Service control<br />VSOWebControl vco = new VSOWebControlProxy(endpoint);<br />// Start workflow<br />WorkflowToken token = vco.executeWorkflow(workflowID, username, password, null);<br />// Wait for completion<br />while (token.getGlobalState().equals("running")) {<br /> Thread.sleep(100);<br /> token = vco.getWorkflowTokenForId(token.getId(), username, password);<br />}<br />// Status is in getGlobalState()<br />// Output parameters<br />WorkflowTokenAttribute[] attributes =<br /> vco.getWorkflowTokenResult(token.getId(), username, password);<br />
    63. 63. Examples - Java<br />Run a workflow with a String as input<br />private static final String username = “xxx”;<br />private static final String password = “yyy”;<br />private static final String workflowID =<br /> "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";<br />private static final String endpoint =<br /> “http://vco:8280/vmware-vmo-webcontrol/webservice”;<br />// vCO Web Service control<br />VSOWebControlvco = new VSOWebControlProxy(endpoint);<br />// Input parameters<br />WorkflowTokenAttribute[] inputParameters = new WorkflowTokenAttribute[1];<br />inputParameters[0] = new WorkflowTokenAttribute();<br />inputParameters[0].setName(“text”);<br />inputParameters[0].setType(“String”);<br />inputParameters[0].setValue(”Hello World!");<br />// Start workflow<br />WorkflowToken token =<br />vco.executeWorkflow(workflowID, username, password, inputParameters);<br />// Wait for completion<br />…<br />
    64. 64. Examples - Java<br />Run a workflow with a String as input – get types from workflow<br />private static final String username = “xxx”;<br />private static final String password = “yyy”;<br />private static final String workflowID =<br /> "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";<br />private static final String endpoint =<br /> “http://vco:8280/vmware-vmo-webcontrol/webservice”;<br />// vCO Web Service control<br />VSOWebControlvco = new VSOWebControlProxy(endpoint);<br />// Workflow<br />Workflow wf = vco.getWorkflowForId(workflowID, username, password);<br />// Input parameters descriptions<br />WorkflowParameter[] params = wf.getInParameters();<br />// Input parameters<br />WorkflowTokenAttribute[] inputParameters = new WorkflowTokenAttribute[1];<br />inputParameters[0] = new WorkflowTokenAttribute();<br />inputParameters[0].setName(params[0].getName());<br />inputParameters[0].setType(params[0].getType());<br />inputParameters[0].setValue(”Hello World!");<br />// Start workflow<br />WorkflowToken token =<br />vco.executeWorkflow(workflowID, username, password, inputParameters);<br />// Wait for completion<br />…<br />
    65. 65. Web Service API: Conclusion<br />Allows to run workflows<br />Allows to find inventory objects used as input to workflows<br />Standard WSDL 1.1 definition<br />Supports Java and .Net bindings<br />Java bindings provided as part of the samples documentation pack<br />
    66. 66. Plug-in API<br />
    67. 67. Overview<br /><ul><li>Exposes an external product API to the Orchestrator
    68. 68. Example: Take the solar system and turn it into a plugin so we can orchestrate various objects in the solar system
    69. 69. Extends the scripting engine with new prototypes: moon, planet, star
    70. 70. Extend the inventory with new objects: Mars
    71. 71. Provide a library of workflows and other objects to use against the exposed API: add planet, destroy planet
    72. 72. Define triggers: wait for flare event and run the “destroy planet” workflow</li></li></ul><li>What Can You do in a Plugin?<br />Expose external system functionality<br />Extend vCO inventory with external objects<br />Define triggers<br />Import workflows at plugin installation<br />Define user configuration<br />
    73. 73. Structure<br />Artifact is a zipped folder with “.dar” extension<br /><ul><li>Example: vmware-vmosdk-solarsystem.dar</li></ul>Located in the “plugin” folder:<br /><ul><li>$INSTALL_DIR/app-server/server/vmo/plugins</li></ul>Internal structure:<br />
    74. 74. Hitchhiker’s Guide to the Solar System <br />Creating plugins in a few steps<br />Create the vso.xml<br />Create the lpluginAdaptor<br />Create the IpluginFactory<br />Map scripting objects to your Java classes<br />Optionally create the configuration adaptors for use configuration such as the name of vSphere server- (IConfigurationAdapter & WebConfigurationAdaptor)<br />Optionally create trigger events <br />Create the plug-in package file (*.dar)<br />Load the plugin<br />Write workflows that demonstrate the functionality of your plugin and provide users with building blocks to their custom workflows<br />Re-package the plugin with the workflow<br />
    75. 75. Structure – VSO.XML File<br />The VSO.XML file<br /><ul><li>Describes the plugin structure to the vCO server
    76. 76. Conforms to schema:</li></ul>http://www.vmware.com/support/orchestrator/plugin-4-0.xsd<br /><ul><li>Content:</li></li></ul><li>Structure – VSO.XML File<br />Plug-in name, version and description<br />Library of workflows<br />Inventory<br />Scripting extensions<br />
    77. 77. Structure – VSO.XML File<br />Java vCO plugin API<br />Mapping between scripting object prototypes and Java classes<br />
    78. 78. Plug-in API - Adaptor<br />Main Interface:<br /><ul><li>Create the plugin factory, loading and unloading of the plugin.
    79. 79. Set name
    80. 80. Interface for events (both Policy and Triggers)</li></ul>Plug-in developer can:<br /><ul><li>Implement Interface directly
    81. 81. Use or subclass one of the existing implementations:
    82. 82. DatabasePluginAdaptor</li></li></ul><li>Policy and Trigger Events<br />Policies react on events<br />Plugins can declare new events<br /><ul><li>Event types:
    83. 83. Trigger (single event)
    84. 84. Gauge (change of value event)</li></ul>Workflow can wait for Triggers<br />Plugins can declare new triggers<br /><ul><li>Policy-Event-Triggers and Workflows-Triggers are different implementations, will merge in a future implementation</li></li></ul><li>Plug-in API - Factory<br />A factory object is instantiated for each user session.<br />Define methods to find objects exposed by the plugin<br /><ul><li>Used in Inventory
    85. 85. Used in pickers and choosers</li></li></ul><li>Configuration<br /><configuration<br />adaptor-class="com.vmware.orchestrator.api.sample.solarsystem.config.SolarSystemConfigurationAdaptor"<br />validation="enabled"<br />/><br />The “adaptor-calls” attribute of the configuration tag in vso.xml points to the proper implementation of IConfigurationAdaptor<br />Implementation provides control over loading, validating and saving the plugin configuration.<br /><ul><li>A helper class SDKHelper provides methods to load and save configuration files from standard locations</li></ul>If the plugin requires a configuration UI, getWebAppContext should return the war name<br />The war is loaded by the Configure web server and gives a UI access to the ConfigureAdapter<br />
    86. 86. Conclusion<br />Not covered in this presentation:<br /><ul><li>Database plugin adapters (see documentation)</li></ul>Explained how plugins extend Orchestrator capabilities<br />Described the main APIs<br /><ul><li>vso.xml file and schema
    87. 87. IPluginAdaptor & IPluginFactory
    88. 88. IConfigurationAdapter & WebConfigurationAdaptor</li></ul>Demonstrated a sample implementation<br />
    89. 89. Links and Further References<br />Orchestrator communities:<br />Web service & plugin API<br /><ul><li>http://communities.vmware.com/community/developer/forums/orchestrator
    90. 90. Workflows
    91. 91. http://communities.vmware.com/community/vmtn/mgmt/orchestrator</li></ul>vCenter Orchestrator:<br /><ul><li>http://www.vmware.com/products/vcenter-orchestrator/</li></ul>vCO Documentation:<br /><ul><li>http://www.vmware.com/support/pubs/orchestrator_pubs.html
    92. 92. vCenter Orchestrator Developer's Guide
    93. 93. Web service
    94. 94. Developing plugins
    95. 95. Solaris plugin source: VMware vCenter Orchestrator Example Applications</li></li></ul><li>Thank you<br />
    96. 96. Ready. Set. Go! Take Action<br />GO! Get Educated<br />Visit Partner University for information on partner programs and resources<br />Access to VMware Partner Exchange presentations<br />GO! Get Competent<br />Enroll in training and certification that counts toward earning competencies<br />GO! Register Your Deals to Earn More Margin<br />Visit Partner Central to learn about VMware’s registration programs<br />
    97. 97. Any Questions?<br />

    ×