VMware vCenter Orchestrator - 5.2 User Manual

Using the vCenter Orchestrator Plug-In
for vCloud Automation Center 5.2
vCenter Orchestrator 5.2
This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
EN-001079-01
You can find the most up-to-date technical documentation on the VMware Web site at:
http://www.vmware.com/support/
The VMware Web site also provides the latest product updates.
If you have comments about this documentation, submit your feedback to:
docfeedback@vmware.com
Copyright © 2012, 2013 VMware, Inc. All rights reserved. Copyright and trademark information.
VMware, Inc.
3401 Hillview Ave. Palo Alto, CA 94304 www.vmware.com
2 VMware, Inc.

Contents

Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.2 5
Updated Information 7
Introduction to the VMware vCenter Orchestrator Plug-In for
1
vCloud Automation Center 9
Role of vCenter Orchestrator with the vCloud Automation Center Plug-In 9
Installing the vCloud Automation Center Plug-In 9
vCloud Automation Center Plug-In Functional Prerequisites 9
Install the vCloud Automation Center Plug-In 10
Configuring the vCloud Automation Center Plug-In 11
2
Configuration Workflows 11
Add a vCloud Automation Center Host 11
Using the vCloud Automation Center Plug-In 13
3
Using the vCloud Automation Center Plug-In Standard Workflows 13
Create a vCloud Automation Center Model Entity 14
Read a vCloud Automation Center Model Entity 15
Using the vCloud Automation Center Plug-In Extensibility Workflows 15
Using the vCloud Automation Center Plug-In Inventory 16
Access the vCloud Automation Center Plug-In API 16
Examples of Scripts for CRUD vCloud Automation Center Tasks 16
Index 21
VMware, Inc. 3
4 VMware, Inc.

Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.2

Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.2 provides information and instructions about configuring and using the VMware® vCenter Orchestrator plug-in for VMware vCloud Automation Center 5.2.
Intended Audience
The information in Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.2 is written for experienced users who are familiar with virtual machine technology, with Orchestrator workflow development, and with VMware vCloud Automation Center.
For more information about Orchestrator, see
http://www.vmware.com/support/pubs/orchestrator_pubs.html.
For more information about vCloud Automation Center, see
http://www.vmware.com/support/pubs/vcac-pubs.html.
VMware, Inc.
5
6 VMware, Inc.

Updated Information

This Using the vCenter Orchestrator Plug-In for vCloud Automation Center is updated with each release of the product or when necessary.
This table provides the update history of the Using the vCenter Orchestrator Plug-In for vCloud Automation Center .
Revision Description
001079-01 In “Add a vCloud Automation Center Host,” on page 11, added information about the Workstation for
NTLM and Domain for NTLM authentication text boxes.
001079 Initial release.
VMware, Inc. 7
8 VMware, Inc.
Introduction to the VMware vCenter Orchestrator Plug-In for
vCloud Automation Center 1
The vCloud Automation Center plug-in (VMware vCenter Orchestrator plug-in for vCloud Automation Center) allows interaction between vCenter Orchestrator and vCloud Automation Center.
You can use the vCloud Automation Center plug-in to provision vSphere and vCloud Director virtual machines, take post-provision actions, and run Create, Read, Update, and Delete (CRUD) operations on the vCloud Automation Center model.
This chapter includes the following topics:
“Role of vCenter Orchestrator with the vCloud Automation Center Plug-In,” on page 9
n
“Installing the vCloud Automation Center Plug-In,” on page 9
n

Role of vCenter Orchestrator with the vCloud Automation Center Plug-In

You must use the Orchestrator configuration interface to install the vCloud Automation Center plug-in. You use the Orchestrator client to run and create workflows and access the plug-in API.
The vCloud Automation Center plug-in is powered by vCenter Orchestrator. Orchestrator is a development and process-automation platform that provides a library of extensible workflows to manage the VMware vCenter infrastructure and other technologies.
Orchestrator allows integration with management and administration solutions through its open plug-in architecture.

Installing the vCloud Automation Center Plug-In

You must use the Orchestrator configuration interface to install the vCloud Automation Center plug-in.

vCloud Automation Center Plug-In Functional Prerequisites

To be able to install and use the vCloud Automation Center plug-in, your system must meet certain functional prerequisites.
vCenter Orchestrator
Verify that you have a running instance of Orchestrator. You can log in to the Orchestrator configuration interface at http://orchestrator_server:8283. Version 5.2 of the plug-in works with vCenter Orchestrator 5.1 and 5.5.
For information about setting up Orchestrator, see Installing and Configuring VMware vCenter Orchestrator.
VMware, Inc.
9
vCloud Automation Center
Verify that you have access to a vCloud Automation Center server. Version 5.2 of the plug-in works with vCloud Automation Center 4.5, 5.1, and 5.2.
For information about setting up vCloud Automation Center, see vCloud Automation Center Installation Guide.

Install the vCloud Automation Center Plug-In

To be able to use the vCloud Automation Center plug-in, you must download the .vmoapp file containing the plug-in and install it by using the Orchestrator configuration interface.
Prerequisites
Verify that you are logged in to the Orchestrator configuration interface at http://orchestrator_server:8283.
Procedure
1 On the General tab, click Install Application.
2 Upload the vCloud Automation Center plug-in.
a Click the magnifying glass icon.
b Select the .vmoapp file to install.
c Click Open.
d Click Install.
A message appears after successful installation. The vCloud Automation Center plug-in is installed without a tab in the Orchestrator configuration interface.
3 On the Startup Options tab, click Restart service to complete the plug-in installation.
10 VMware, Inc.
Configuring the
vCloud Automation Center Plug-In 2
To configure the vCloud Automation Center plug-in, you run configuration workflows in the Orchestrator client.

Configuration Workflows

You can use the workflows in the Configuration workflow category to manage vCloud Automation Center hosts.
You can access these workflows from Library > vCloud Automation Center > Configuration in the Workflows view of the Orchestrator client.
Workflow Name Description
Add a vCAC host Adds a vCloud Automation Center host to the plug-in's inventory.
Manage SSL certificates Verifies a host URL, and if required, shows a user interaction message for SSL certificates user
approval.
Remove a vCAC host Removes a vCloud Automation Center host from the plug-in's inventory.
Update a vCAC host Updates a vCloud Automation Center host in the plug-in's inventory.
Validate a vCAC host Validates the vCloud Automation Center host and the connection to it.

Add a vCloud Automation Center Host

You can run a workflow to add a vCloud Automation Center host and configure the host connection parameters.
Prerequisites
Verify that you have the permissions to perform this task.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 In the hierarchical list of workflows, select Library > vCloud Automation Center > Configuration and
navigate to the Add a vCAC host workflow.
4 Right-click the Add a vCAC host workflow and select Start workflow.
5 In the Name text box, type a unique name for the host.
6 In the Host text box, type the URL address of the host.
VMware, Inc.
11
7 Select whether to install the SSL certificates automatically without user interaction.
Option Description
Yes
No
Install the SSL certificates automatically without user interaction.
Install the SSL certificates after user confirmation.
8 (Optional) In the Connection timeout (seconds) and Operation timeout (secounds) text boxes, type the
timeout interval.
9 Click Next.
10 Select a session mode.
Option Description
Shared Session
Per User Session
You must provide credentials for the shared session.
The Orchestrator client retrieves credentials from the user who is logged in.
11 Click Next.
12 In the Workstation for NTLM text box, type the name of the Workstation machine.
13 In the Domain for NTLM authentication text box, type the NetBIOS domain name.
14 Click Submit to run the workflow.
15 Repeat steps 4-14 for each vCloud Automation Center host.
12 VMware, Inc.
Using the vCloud Automation Center
Plug-In 3
The vCloud Automation Center plug-in workflow library contains workflows that you can use to provision virtual machines and take post-provision actions.
You can use the scripting API of the plug-in to develop custom workflows. You can use custom HTTP headers, such as the vCloud Automation Center specific headers Tasks and Identity, and apply them in the CRUD, provisioning, and post-provisioning workflows.
This chapter includes the following topics:
“Using the vCloud Automation Center Plug-In Standard Workflows,” on page 13
n
“Using the vCloud Automation Center Plug-In Extensibility Workflows,” on page 15
n
“Using the vCloud Automation Center Plug-In Inventory,” on page 16
n
“Access the vCloud Automation Center Plug-In API,” on page 16
n
“Examples of Scripts for CRUD vCloud Automation Center Tasks,” on page 16
n

Using the vCloud Automation Center Plug-In Standard Workflows

You can use the vCloud Automation Center workflows to provision virtual machines and to run basic or CRUD operations.
You can access these workflows from Library > vCloud Automation Center in the Workflows view of the Orchestrator client.
Workflow Name Description
Create a vCAC model entity
Delete a vCAC model entity
Invoke a post­provisioning action
Provision a virtual machine from a blueprint
Read a vCAC entity by custom filter
Read a vCAC model entity
Update a vCAC model entity
Creates and persists an entity for a specified vCloud Automation Center model.
Deletes a specified vCloud Automation Center model entity.
Invokes a specified post-provisioning action on a given virtual machine.
Provisions a virtual machine from a vCloud Automation Center blueprint.
Reads a list of vCloud Automation Center entities by using a custom filter. If you do not specify a filter, all entities are returned as a result.
Reads a vCloud Automation Center model entity by its ID.
Updates a vCloud Automation Center model entity by its ID.
VMware, Inc. 13
Workflow Name Description
Await virtual machine state change
Awaits a state change for a set of virtual machines. If all virtual machines get into the success state, a trigger is called and the workflow ends successfully. If one or more of the specified virtual machines get into fail state, or they do not exist, the workflow fails. A virtual machine can be set to one of the following states:
n
Requested
n
AwaitingApproval
n
RegisterMachine
n
BuildingMachine
n
AddingDisks
n
MachineProvisioned
n
MachineActivated
n
InstallTools (VMware only)
n
On
n
Off
n
TurningOn
n
TurningOff
n
ShuttingDown
n
Suspending
n
Resetting
n
Rebooting
n
Expired
n
DeactivateMachine
n
UnprovisionMachine
n
Disposing
n
Finalized
Read a vCAC entity by system query
Reads a list of vCloud Automation Center entities by using OData system filters. The system filters apply to the OData URI convention. For information about OData URI conventions, see http://www.odata.org/documentation/odata-v2-documentation/uri-conventions/.

Create a vCloud Automation Center Model Entity

You can run a workflow to create simple and complex vCloud Automation Center entities, such as a vCloud Automation Center Blueprint reference to a ProvisioningGroup.
Prerequisites
Verify that you have the permissions to perform this task.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 In the hierarchical list of workflows, select Library > vCloud Automation Center and navigate to the
Create a vCAC model entity workflow.
4 Right-click the Create a vCAC model entity workflow and select Start workflow.
5 Select a vCloud Automation Center host.
6 In the Model name text box, type the name of the model.
7 In the Entity set name text box, type the name of the entity set.
The Simple properties, Links to complex properties, and HTTP headers properties are set by using scripting or REST API.
8 Click Submit to run the workflow.
14 VMware, Inc.
Chapter 3 Using the vCloud Automation Center Plug-In

Read a vCloud Automation Center Model Entity

You can run a workflow to read the vCloud Automation Center model entity.
Prerequisites
Verify that you have the permissions to perform this task.
Procedure
1 From the drop-down menu in the Orchestrator client, select Run or Design.
2 Click the Workflows view.
3 In the hierarchical list of workflows, select Library > vCloud Automation Center and navigate to the
Read a vCAC model entity workflow.
4 Right-click the Read a vCAC model entity workflow and select Start workflow.
5 Select a vCloud Automation Center host.
6 In the Model name text box, type the model name.
7 In the Entity set name text box, type the entity set name.
The HTTP headers property is set by using scripting or REST API.
8 Click Submit to run the workflow.

Using the vCloud Automation Center Plug-In Extensibility Workflows

The workflows in the Extensibility package let you customize vCloud Automation Center with the abilty to call vCenter Orchestrator workflows either as part of the provisioning process, or by custom operation menus.
You can access these workflows from Library > vCloud Automation Center > Extensibility in the Workflows view of the Orchestrator client.
Workflow Name Description
Install vCO customization Installs an Orchestrator customization including customized state
change workflow stubs and Orchestrator menu operation workflows.
Uninstall vCO customization Uninstalls an Orchestrator customization including customized state
change workflow stubs and Orchestrator menu operation workflows.
Register a vCAC Virtual Machine Registers a virtual machine in vCloud Automation Center by assigning
the necessary properties and links.
Register a vCenter Virtual Machine Creates a vCloud Automation Center virtual machine and sets it
manageable by assigning necessary properties and links.
Unregister Virtual Machine Removes a virtual machine from the vCloud Automation Center
inventory.
Assign a menu operation to a blueprint and its virtual machines
Assign a menu operation to virtual machines Updates a vCloud Automation Center model entity by its ID.
Assign a state change workflow to a blueprint and its virtual machines
Customize a menu operation Updates a vCloud Automation Center operation menu.
Adds or updates a menu operation on virtual machines.
Adds or updates a state change workflow on several blueprints and their virtual machines.
VMware, Inc. 15
Workflow Name Description
Remove a menu operation from a blueprint and its virtual machines
Remove a state change workflow from a blueprint and its virtual machines
Removes a menu operation from a blueprint and its virtual machines.
Removes a state change workflow from a blueprint and its virtual machines.

Using the vCloud Automation Center Plug-In Inventory

You can use the Inventory view to run workflows on vCloud Automation Center objects.
You can enable the Use contextual menu in inventory option to display the workflows that are available for an inventory object. After the option is enabled, when you right-click an object in the Orchestrator inventory, all available workflows for the object are displayed.

Access the vCloud Automation Center Plug-In API

Orchestrator provides an API Explorer to allow you to search the vCloud Automation Center plug-in API and see the documentation for JavaScript objects that you can use in scripted elements.
Procedure
1 Log in to the Orchestrator client as an administrator.
2 Select Tools > API Explorer.
3 To expand the hierarchical list of vCloud Automation Center plug-in API objects, double-click the
vCAC module in the left pane.
What to do next
You can copy code from API elements and paste it into scripting boxes. For more information about API scripting, see Developing with VMware vCenter Orchestrator.

Examples of Scripts for CRUD vCloud Automation Center Tasks

You can cut, paste, and edit the JavaScript examples to write scripts for CRUD vCloud Automation Center tasks.
For more information about scripting, see Developing with VMware vCenter Orchestrator.
Example: Create a vCloud Automation Center model entity
This example script performs the following actions.
1 Defines the model name and the entity set name.
2 Defines the properties of the host prefix.
3 Saves the host prefix entity.
4 Defines the properties of the provisioning group.
5 Defines the provisioning group as a link.
6 Saves the provisioning group entity, by linking it with the host name prefix.
16 VMware, Inc.
Chapter 3 Using the vCloud Automation Center Plug-In
Table 31. Input Variables
Variable Type
host
var modelName = 'ManagementModelEntities.svc'; var entitySetName = 'HostNamePrefixes'; var links = null; var headers = null; //Create properties for prefix entity var prefixInputProperties = { MachinePrefix:'test-prefix', NextMachineNo:1, MachineNumberLength:3 }; //Save the prefix var prefixEntity = vCACEntityManager .createModelEntity(host.id, modelName, entitySetName, prefixInputProperties, links, headers); entitySetName = 'ProvisioningGroups'; //Create properties for the provisioning group entity inputProperties = { GroupName:'TestGroupName', GroupDescription:'This group was generated with a vCO workflow', AdministratorEmail:'test@test.com', AdContainer:'AD', IsTestGroup:false, Flags:2, GroupType:1}; //Add a reference to the newly created prefix entity links = { HostNamePrefix:prefixEntity }; //Save the provisioning group var entity = vCACEntityManager createModelEntity(host.id, modelName, entitySetName, inputProperties, links, headers);
vCAC:VcacHost
Example: Update a vCloud Automation Center model entity
This example script performs the following actions.
1 Gets the host id from the provided entity.
2 Gets the model name from the provided entity.
3 Gets the entity set name from the provided entity.
4 Gets the entity id from the provided entity.
5 Defines a set of properties that will be updated.
6 Invokes the action responsible for updating the entity.
VMware, Inc. 17
Table 32. Input Variables
Variable Type
entity
updatedDescription String
var hostId = entity.hostId; var modelName = entity.modelName; var entitySetName = entity.entitySetName; var entityIdString = entity.keyString; var links = null; var headers = null; var updateProperties = new Properties(); updateProperties.put("UserNameDescription", updatedDescription); //Update the user description System.getModule("com.vmware.library.vcac") .updateVCACEntity(hostId, modelName, entitySetName, entityIdString, updateProperties, links, headers);
vCAC:Entity
Example: Read a vCloud Automation Center model entity
This example script performs the following actions.
1 Defines the model name and the entity set name.
2 Defines the blueprint ID with a property object.
3 Reads the entity.
Table 33. Input Variables
Variable Type
host
blueprintID String
var modelName = 'ManagementModelEntities.svc'; var entitySetName = 'VirtualMachineTemplates'; var links = null; var headers = null; //Create properties for the prefix entity var blueprintId = { VirtualMachineTemplateID:blueprintId, }; //Read the blueprint var entity = vCACEntityManager .readModelEntity(host.id, modelName, entitySetName, blueprintId, headers);
vCAC:VcacHost
Example: Delete a vCloud Automation Center model entity
This example script performs the following actions.
1 Gets the host ID from the provided entity.
2 Gets the model name from the provided entity.
3 Gets the entity set name from the provided entity.
4 Gets the entity id from the provided entity.
18 VMware, Inc.
Chapter 3 Using the vCloud Automation Center Plug-In
5 Invokes the action responsible for deleting the entity.
Table 34. Input Variables
Variable Type
entity
var hostId = entity.hostId; var modelName = entity.modelName; var entitySetName = entity.entitySetName; var entityKeyString = entity.keyString; var headers = null; //Delete the entity System.getModule("com.vmware.library.vcac") .deleteVCACEntity(hostId, modelName, entitySetName, entityKeyString, headers);
vCAC:Entity
Example: Read a vCloud Automation Center entity by custom filter
This example script performs the following actions.
1 Defines the model name and the entity set name.
2 Defines the properties by which the entities are filtered.
3 Reads a list of entities.
Table 35. Input Variables
Variable Type
host
templateName String
var modelName = 'ManagementModelEntities.svc'; var entitySetName = 'VirtualMachineTemplates'; var headers = null; //Create properties for prefix entity var properties = { VirtualMachineTemplateName:templateName, }; //Read a list of entities var entities = vCACEntityManager .readModelEntitiesByCustomFilter(host.id, modelName, entitySetName, properties, headers);
vCAC:VcacHost
Example: Read a vCloud Automation Center entity by system query
This example script performs the following actions.
1 Defines the model name and the entity set name.
2 Defines the system queries by which the entities are filtered and selects the top ten results of all virtual
machines, filtered by the machine state and component flag.
3 Reads a list of entities.
VMware, Inc. 19
Table 36. Input Variables
Variable Type
host
var modelName = 'ManagementModelEntities.svc'; var entitySetName = 'VirtualMachines'; var filter = "VirtualMachineState eq 'Off' and IsComponent eq true"; var orderBy = 'VirtualMachineName asc'; var top = 10; { var skip = 0;, var headers = null; var select = null; var entities = vCACEntityManager readModelEntitiesBySystemQuery(host.id, modelName, entitySetName, filter, orderBy, select, top, skip, headers);
vCAC:VcacHost
20 VMware, Inc.

Index

A
adding a vCloud Automation Center host 11 adding a vCloud Automation Center model
entity 14 API access 16 audience 5
C
configuration 11
F
functional prerequisites 9
H
host
configure 11 manage 11
I
installation 9 installation process 10 introduction, vCloud Automation Center plug-
in 9 Inventory 16
V
vCloud Automation Center host
adding 11 registering 11
vCloud Automation Center model entity
adding 14 reading 15
W
workflow library 13 workflows
configuration 11 CRUD 13 extensibility workflows 15 model entity 13 standard workflows 13
O
Orchestrator 9
R
reading a vCloud Automation Center model
entity 15 registering a vCloud Automation Center host 11
S
scriptable task elements 16 scripting 16
U
updated information 7
VMware, Inc. 21
22 VMware, Inc.
Loading...