VMware vCenter Orchestrator 5.1 User guide

Type
User guide
Using the vCenter Orchestrator Plug-In
for vCloud Automation Center 5.1
vCenter Orchestrator 5.1
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-00
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
2 VMware, Inc.
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:
Copyright © 2012 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual
property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks
and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
3401 Hillview Ave.
Palo Alto, CA 94304
www.vmware.com
Contents
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1 5
1Introduction to the VMware vCenter Orchestrator Plug-In for
vCloud Automation Center 7
Role of vCenter Orchestrator with the vCloud Automation Center Plug-In 7
Installing the vCloud Automation Center Plug-In 7
vCloud Automation Center Plug-In Functional Prerequisites 7
Install the vCloud Automation Center Plug-In 8
2Using the vCloud Automation Center Plug-In 9
Configuring the vCloud Automation Center Plug-In 9
Configuration Workflows 9
Using the vCloud Automation Center Plug-In Standard Workflows 10
Using the vCloud Automation Center Plug-In Inventory 12
Access the vCloud Automation Center Plug-In API 12
Examples of Scripts for CRUD vCloud Automation Center Tasks 12
Index 17
VMware, Inc. 3
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
4 VMware, Inc.
Using the vCenter Orchestrator Plug-In for
vCloud Automation Center 5.1
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1 provides information and instructions
about configuring and using the VMware® vCenter Orchestrator plug-in for vCloud Automation Center 5.1.
Intended Audience
This book is intended for anyone who is installing and configuring the plug-in, using the API of the plug-in,
and using the workflow library. The information in Using the vCenter Orchestrator Plug-In for
vCloud Automation Center 5.1 is written for experienced users who are familiar with virtual machine technology,
with Orchestrator workflow development, and with 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
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
6 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 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:
n“Role of vCenter Orchestrator with the vCloud Automation Center Plug-In,” on page 7
n“Installing the vCloud Automation Center Plug-In,” on page 7
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.1 of the plug-in works with vCenter Orchestrator 5.1.
For information about setting up Orchestrator, see Installing and Configuring VMware vCenter Orchestrator.
VMware, Inc. 7
vCloud Automation Center
Verify that you have access to a vCloud Automation Center server. Version 5.1 of the plug-in works with
vCloud Automation Center 4.5 and 5.1.
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.
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
8 VMware, Inc.
Using the vCloud Automation Center
Plug-In 2
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:
n“Configuring the vCloud Automation Center Plug-In,” on page 9
n“Using the vCloud Automation Center Plug-In Inventory,” on page 12
n“Access the vCloud Automation Center Plug-In API,” on page 12
n“Examples of Scripts for CRUD vCloud Automation Center Tasks,” on page 12
Configuring the vCloud Automation Center Plug-In
You must use the Orchestrator client to configure the vCloud Automation Center plug-in.
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.
VMware, Inc. 9
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 address of the host.
7 (Optional) In the Connection timeout (seconds) and Operation timeout (secounds) text boxes, type the
timeout interval.
8 Click Next.
9 Select a host authentication type and click Next.
Option Description
Basic Provides basic access authentication.
Select the session mode.
nIf you select Shared Session, provide credentials for the shared session.
nIf you select Per User Session, the Orchestrator client retrieves
credentials from the user who is logged in.
NTLM Provides NT LAN Manager (NTLM) access authentication within the
Window Security Support Provider (SSPI) framework.
Select the session mode.
nIf you select Shared Session, provide credentials for the shared session.
nIf you select Per User Session, the Orchestrator client retrieves
credentials from the user who is logged in.
Provide the NTLM settings.
10 Click Submit to run the workflow.
11 Repeat steps 4-10 for each vCloud Automation Center host.
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.
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
10 VMware, Inc.
Workflow Name Description
Create a vCAC model entity Creates and persists an entity for a specified vCloud Automation Center
model.
Delete a vCAC model entity Deletes a specified vCloud Automation Center model entity.
Invoke a post-provisioning action Invokes a specified post-provisioning action on a given virtual machine.
Provision a virtual machine from a
blueprint
Provisions a virtual machine from a vCloud Automation Center blueprint.
Read a vCAC entity by custom filter 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.
Read a vCAC model entity Reads a vCloud Automation Center model entity by its ID.
Update a vCAC model entity Updates a vCloud Automation Center model entity by its ID.
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.
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.
Chapter 2 Using the vCloud Automation Center Plug-In
VMware, Inc. 11
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 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.
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
12 VMware, Inc.
Table 2-1. Input Variables
Variable Type
host vCAC:VcacHost
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:'[email protected]',
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);
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.
Chapter 2 Using the vCloud Automation Center Plug-In
VMware, Inc. 13
Table 2-2. Input Variables
Variable Type
entity vCAC: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);
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 2-3. Input Variables
Variable Type
host vCAC:VcacHost
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);
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.
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
14 VMware, Inc.
5 Invokes the action responsible for deleting the entity.
Table 2-4. Input Variables
Variable Type
entity vCAC: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);
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 2-5. Input Variables
Variable Type
host vCAC:VcacHost
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);
Chapter 2 Using the vCloud Automation Center Plug-In
VMware, Inc. 15
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
16 VMware, Inc.
Index
A
adding a vCloud Automation Center host 10
adding a vCloud Automation Center model
entity 11
API access 12
audience 5
C
configuration 9
F
functional prerequisites 7
H
host
configure 9
manage 9
I
installation 7
installation process 8
introduction, vCloud Automation Center plug-
in 7
Inventory 12
O
Orchestrator 7
R
reading a vCloud Automation Center model
entity 11
registering a vCloud Automation Center host 10
S
scriptable task elements 12
scripting 12
V
vCloud Automation Center host
adding 10
registering 10
vCloud Automation Center model entity
adding 11
reading 11
W
workflow library 9
workflows
configuration 9
CRUD 10
model entity 10
standard workflows 10
VMware, Inc. 17
Using the vCenter Orchestrator Plug-In for vCloud Automation Center 5.1
18 VMware, Inc.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18

VMware vCenter Orchestrator 5.1 User guide

Type
User guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI