• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
vCenter Orchestrator APIs
 

vCenter Orchestrator APIs

on

  • 8,672 views

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

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

Statistics

Views

Total Views
8,672
Views on SlideShare
8,590
Embed Views
82

Actions

Likes
2
Downloads
145
Comments
0

2 Embeds 82

http://communities.vmware.com 44
http://www.slideshare.net 38

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 vCenter Orchestrator APIs Presentation Transcript

  • Integrating with vCenter Orchestrator
    TEXMGT0900
    SiaYiu, VMware, Inc.
  • This session may contain product features that are currently under development.
    This session/overview of the new technology represents no commitment from VMware to deliver these features in any generally available product.
    Features 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.
    Pricing and packaging for any new technologies or features discussed or presented have not been determined.
    Disclaimer
    “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.”
  • Follow Us
    Facebook Search for VMware Partner Network
    TwitterSearch for VMware_Partners
    http://blogs.vmware.com/powerofpartnership/
    Linkedin Search for VMware Partner Network
    t
    Join the conversationGet the latest scoopBe a part of the network
    Subscribe to RSS
    Follow this event LIVE!
    #VMwarePEX2010
    Help us help you! Please fill out the survey at the end of the course.
  • Agenda
    What is Orchestration?
    Product overview
    Web Service API
    Plug-in API
    Q&A
  • How’s vCO distributed?
    • Every vSphere customer has vCO
    Installed by default with every VC
    Services disabled
    Require configuration
    • vCO comes in two “flavors”
    vSphere Essential and Foundation
    vCO set in player mode: workflow execution only
    No workflow creation capability
    Import of new workflows is allowed
    vSphere Standard
    vCO set in server mode: workflow creation and execution
  • What is Orchestration?
  • Defining Automation and Orchestration
    • Automation
    A way to perform frequently repeated process without manual intervention.
    Basic building block: a shell script, a Perl script, a PowerShell script
    Example: given a list of hostnames, add ESX to VC.
    Orchestration
    A way to manage multiple automated processes across and among heterogeneous systems.
    Example - Add ESX hosts from a list to VC, update CMDB with successfully added ESX hosts, then send email notification.
  • What is Orchestration?
  • What is Orchestration?
    Talk to all sorts of devices
  • What is Orchestration?
    P
    P
    P
    P
    Talk to all sorts of devices
    Configure for devices
    P
    P
  • What is Orchestration?
    Watch DVD
    TV: turn on
    Amp: turn on
    DVD: turn on
    TV: AUX input
    Talk to all sorts of devices
    Configure for devices
    Program Activities
    Amp: DVD input
  • What is Orchestration?
    Talk to all sorts of devices
    Configure for devices
    Program Activities
    Use
  • What is Orchestration?
    The developer: “Talk to all sorts of devices”
    • Creating plug-ins and other means of integration
    • Creating the library of “pre-canned” actions and workflows
    The IT Admin: “Configure for devices”
    • Setting up the orchestrator for his environment
    Everyone: “Program Activities”
    • Creating new processes
    • Customizing existing ones
    The User “Use”
    • Run processes
  • Another Analogy: The Orchestra Director
    • Orchestrator: Director
    • Partition: Workflows
    • Musicians: connected products & solutions
  • Rules of Engagement
    Bad
    • High CPU / memory
    • High throughput (network / data)
    • Real time
    • Good
    • Sequencing
    • Talking to multiple product / solutions
    • “Human” time scale
    • Customization
  • What do Orchestrator Workflows Look Like?
    If a datastore on a host is more than 95% utilized,
    open a change control ticket then perform s-vMotion and send email notification
  • Integrating with vCO: It’s About Choices
    • Things to consider:
    More key features and functionality from VMware solutions will be available as workflow building blocks in vCO.
    For workflow oriented tasks, instead of performing integration with VC and each individual VMware solutions, integrate with vCO.
    Benefit: one integration to VMware
    Would mean integration using web service
  • Two Ways to Integrate with Orchestrator
    • Use Orchestrator as a gateway for integration with vSphere
    Workflows are vCenter-upgrade resistant
    Shorten learning curve in vSpehere API – workflows are written in Javascript
    Write workflows and call them using web service
    • Provide customers an easy to way to integrate your management features with vCenter Server functionality•
    Allow customers to merge automation of vSphere with your product.
    Make your product features available as workflow components in vCO
    Provide VMware engineers easy access to your management functionality
    Deliverable: a plugin with a set of sample workflows
  • Product Overview
  • Architecture – vCO Server: Execution Platform
    • Persistence
    • Centralization
    • Check-pointing
    • Version control
    • Scripting engine
    • Workflow engine
    • Policy engine
    • Security
    Access control (LDAP, rights)
    PKI
    SSL certificates
    Directory
    Services
    Workflow
    Trigger Rules
    Scripting
    vCO
    Database
  • vCOServer: Client Interface
    Browser
    Access
    Client Application
    Access
    Directory
    Services
    Web Service
    Access
    vCO
    Database
  • vCOServer: Plugins for TechnologyInterfaces
    • VMware VIM 3.5
    • VMware vCenter (4)
    • Microsoft (WMI & AD)
    • XML
    • SSH
    • Database SDK
    • SNMP
    • Mail
    • Net
    Browser
    Access
    Client Application
    Access
    Directory
    Services
    Web Service
    Access
    vCO
    Database
  • vCOServer: Library of Workflows
    Browser
    Access
    Client Application
    Access
    Directory
    Services
    Web Service
    Access
    Workflow Library
    vCO
    Database
  • vCOServer: Provision for 3rd Party Extensions
    Browser
    Access
    Client Application
    Access
    Web Service
    Access
    3rd party custom
    3rd party Webview
    3rd party Workflow
    Workflow Library
    3rd party
    Plug-in
  • WebService API
    Remote workflow execution, status, cancelation
    Plugin API
    Written in Java
    surface up external system functionality for use in workflows
    • Workflow - Javascript “API”
    Workflow authoring
    Integration Points
    Browser
    Access
    Client Application
    Access
    Directory
    Services
    Web Service
    Access
    1
    Workflow Library
    3
    2
    VCO
    Database
  • Web Service API
  • Authoring in Orchestrator has Several Benefits
  • Authoring Using the Integrated Workflow Environment
    Drag and drop interface to workflow building
    400 Out-of-box workflows & building blocks
    All VI and ESX functions available in API, CLI, and VC UI.
    SSH
    WMI
    SMTP
    SNMP
    Databases
    Service desk and change control systems
    Ability to export and share workflows
    Schedule workflows
  • Web Service API
  • Web Service API - Introduction
    Defined by a WSDL file.
    Downloadable from:
    • http://<Orchestrator_server>:8280/vmware-vmo-webcontrol/webservice?WSDL
    Accessible at:
    • http://<Orchestrator_server>:8280/vmware-vmo-webcontrol/webservice
    Compile the WSDL with your favorite framework.
    Supported:
    • Java (Axis)
    • .Net
    Will generate about 13 classes
  • Web Service API – Main Objects
    VSOWebControl:
    • The WSDL control port through which you access Orchestrator operations.
    Main operations:
    • executeWorkflow(…): WorkflowToken
    • getWorkflowForId(…): Workflow
    • find(…): FinderResult
  • Web Service API – Main Objects
    Other important Objects:
    • Workflow: An Orchestrator workflow.
    • WorkflowToken: An instance of a workflow (running, waiting, canceled, completed, or failed).
    • WorkflowParameter: An input, output or attribute description of a workflow. (name, type)
    • WorkflowTokenAttribute: An input, output of a workflow instance (WorkflowToken). (name, type, value)
    • FinderResult: Generic inventory object (type, id, properties)
  • Web Service API – Typical Flow
    Instantiate a VSOWebControl
    Find Workflow
    Find Input parameters
    Start workflow (returns Token)
    Check Token (wait completion)
    Get results (outputs)
  • Examples - Java
    Run a workflow with no inputs
    private static final String username = “xxx”;
    private static final String password = “yyy”;
    private static final String workflowID =
    "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";
    private static final String endpoint =
    “http://vco:8280/vmware-vmo-webcontrol/webservice”;
    // vCO Web Service control
    VSOWebControl vco = new VSOWebControlProxy(endpoint);
    // Start workflow
    WorkflowToken token = vco.executeWorkflow(workflowID, username, password, null);
    // Wait for completion
    while (token.getGlobalState().equals("running")) {
    Thread.sleep(100);
    token = vco.getWorkflowTokenForId(token.getId(), username, password);
    }
    // Status is in getGlobalState()
    // Output parameters
    WorkflowTokenAttribute[] attributes =
    vco.getWorkflowTokenResult(token.getId(), username, password);
  • Examples - Java
    Run a workflow with a String as input
    private static final String username = “xxx”;
    private static final String password = “yyy”;
    private static final String workflowID =
    "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";
    private static final String endpoint =
    “http://vco:8280/vmware-vmo-webcontrol/webservice”;
    // vCO Web Service control
    VSOWebControlvco = new VSOWebControlProxy(endpoint);
    // Input parameters
    WorkflowTokenAttribute[] inputParameters = new WorkflowTokenAttribute[1];
    inputParameters[0] = new WorkflowTokenAttribute();
    inputParameters[0].setName(“text”);
    inputParameters[0].setType(“String”);
    inputParameters[0].setValue(”Hello World!");
    // Start workflow
    WorkflowToken token =
    vco.executeWorkflow(workflowID, username, password, inputParameters);
    // Wait for completion

  • Examples - Java
    Run a workflow with a String as input – get types from workflow
    private static final String username = “xxx”;
    private static final String password = “yyy”;
    private static final String workflowID =
    "9C808080808080808080808080808080D18080800124022711707067fa027b2e8";
    private static final String endpoint =
    “http://vco:8280/vmware-vmo-webcontrol/webservice”;
    // vCO Web Service control
    VSOWebControlvco = new VSOWebControlProxy(endpoint);
    // Workflow
    Workflow wf = vco.getWorkflowForId(workflowID, username, password);
    // Input parameters descriptions
    WorkflowParameter[] params = wf.getInParameters();
    // Input parameters
    WorkflowTokenAttribute[] inputParameters = new WorkflowTokenAttribute[1];
    inputParameters[0] = new WorkflowTokenAttribute();
    inputParameters[0].setName(params[0].getName());
    inputParameters[0].setType(params[0].getType());
    inputParameters[0].setValue(”Hello World!");
    // Start workflow
    WorkflowToken token =
    vco.executeWorkflow(workflowID, username, password, inputParameters);
    // Wait for completion

  • Web Service API: Conclusion
    Allows to run workflows
    Allows to find inventory objects used as input to workflows
    Standard WSDL 1.1 definition
    Supports Java and .Net bindings
    Java bindings provided as part of the samples documentation pack
  • Plug-in API
  • Overview
    • Exposes an external product API to the Orchestrator
    • Example: Take the solar system and turn it into a plugin so we can orchestrate various objects in the solar system
    • Extends the scripting engine with new prototypes: moon, planet, star
    • Extend the inventory with new objects: Mars
    • Provide a library of workflows and other objects to use against the exposed API: add planet, destroy planet
    • Define triggers: wait for flare event and run the “destroy planet” workflow
  • What Can You do in a Plugin?
    Expose external system functionality
    Extend vCO inventory with external objects
    Define triggers
    Import workflows at plugin installation
    Define user configuration
  • Structure
    Artifact is a zipped folder with “.dar” extension
    • Example: vmware-vmosdk-solarsystem.dar
    Located in the “plugin” folder:
    • $INSTALL_DIR/app-server/server/vmo/plugins
    Internal structure:
  • Hitchhiker’s Guide to the Solar System
    Creating plugins in a few steps
    Create the vso.xml
    Create the lpluginAdaptor
    Create the IpluginFactory
    Map scripting objects to your Java classes
    Optionally create the configuration adaptors for use configuration such as the name of vSphere server- (IConfigurationAdapter & WebConfigurationAdaptor)
    Optionally create trigger events
    Create the plug-in package file (*.dar)
    Load the plugin
    Write workflows that demonstrate the functionality of your plugin and provide users with building blocks to their custom workflows
    Re-package the plugin with the workflow
  • Structure – VSO.XML File
    The VSO.XML file
    • Describes the plugin structure to the vCO server
    • Conforms to schema:
    http://www.vmware.com/support/orchestrator/plugin-4-0.xsd
    • Content:
  • Structure – VSO.XML File
    Plug-in name, version and description
    Library of workflows
    Inventory
    Scripting extensions
  • Structure – VSO.XML File
    Java vCO plugin API
    Mapping between scripting object prototypes and Java classes
  • Plug-in API - Adaptor
    Main Interface:
    • Create the plugin factory, loading and unloading of the plugin.
    • Set name
    • Interface for events (both Policy and Triggers)
    Plug-in developer can:
    • Implement Interface directly
    • Use or subclass one of the existing implementations:
    • DatabasePluginAdaptor
  • Policy and Trigger Events
    Policies react on events
    Plugins can declare new events
    • Event types:
    • Trigger (single event)
    • Gauge (change of value event)
    Workflow can wait for Triggers
    Plugins can declare new triggers
    • Policy-Event-Triggers and Workflows-Triggers are different implementations, will merge in a future implementation
  • Plug-in API - Factory
    A factory object is instantiated for each user session.
    Define methods to find objects exposed by the plugin
    • Used in Inventory
    • Used in pickers and choosers
  • Configuration
    <configuration
    adaptor-class="com.vmware.orchestrator.api.sample.solarsystem.config.SolarSystemConfigurationAdaptor"
    validation="enabled"
    />
    The “adaptor-calls” attribute of the configuration tag in vso.xml points to the proper implementation of IConfigurationAdaptor
    Implementation provides control over loading, validating and saving the plugin configuration.
    • A helper class SDKHelper provides methods to load and save configuration files from standard locations
    If the plugin requires a configuration UI, getWebAppContext should return the war name
    The war is loaded by the Configure web server and gives a UI access to the ConfigureAdapter
  • Conclusion
    Not covered in this presentation:
    • Database plugin adapters (see documentation)
    Explained how plugins extend Orchestrator capabilities
    Described the main APIs
    • vso.xml file and schema
    • IPluginAdaptor & IPluginFactory
    • IConfigurationAdapter & WebConfigurationAdaptor
    Demonstrated a sample implementation
  • Links and Further References
    Orchestrator communities:
    Web service & plugin API
    • http://communities.vmware.com/community/developer/forums/orchestrator
    • Workflows
    • http://communities.vmware.com/community/vmtn/mgmt/orchestrator
    vCenter Orchestrator:
    • http://www.vmware.com/products/vcenter-orchestrator/
    vCO Documentation:
    • http://www.vmware.com/support/pubs/orchestrator_pubs.html
    • vCenter Orchestrator Developer's Guide
    • Web service
    • Developing plugins
    • Solaris plugin source: VMware vCenter Orchestrator Example Applications
  • Thank you
  • Ready. Set. Go! Take Action
    GO! Get Educated
    Visit Partner University for information on partner programs and resources
    Access to VMware Partner Exchange presentations
    GO! Get Competent
    Enroll in training and certification that counts toward earning competencies
    GO! Register Your Deals to Earn More Margin
    Visit Partner Central to learn about VMware’s registration programs
  • Any Questions?