This package is for using with the vCenter Orchestrator plug-in for vCloud Director 1.5.
vCenter Orchestrator (vCO) provides a large library of workflows and actions out of the box. This library grows with each new plugin that gets installed. As a result, it becomes easier to build very powerful workflows with little to no knowledge of an API. This document will focus on a custom workflow built using library items and additional scripting.
The overall goal of the Custom Deploy vApp workflow is to provide a single call workflow that is capable of instantiating a vApp Template from vCloud Director (vCD) and performing a number of operations on the resulting vApp before actually deploying and powering it on. The workflow is intended to be an example and starting point for deployments that require any or all of these features. It can also be called via 3rd party connectors using the SOAP API.
These operations include:
The package and custom workflow requires a functional vCO server with the vCloud Director 1.5 plugin installed and configured. Additionally, the Active Directory plugin should be installed and configured to facilitate the Computer Account creation in AD. A functional vCD environment should be available with 1 or more vApp Templates containing at least one Windows VM. All of which should be configured as discussed throughout this document. (Note: step-by-Step installation/configuration is out of scope here)
While this workflow has been developed and tested successfully, it should always be executed and tested using the vCO Client before attempting to call via the SOAP API. This allows for determining appropriate inputs and faster troubleshooting. Once the workflow has completed successfully in the target environment, it is safe to begin integration with other systems.
Prepare for use:
if '%1%' == 'postcustomization' (net localgroup administrators @domain@\\@username@ /add)
All of my tests with this workflow were centered around deploying a Windows 2008 R2 64-bit VM to a network, adding it to a domain. Inside the "VM Customization" Scriptable task is a section of code that allows you to specify your own modifications for Linux based customization scripts if needed.
Disclaimer: These samples workflows are provided AS IS and are not considered production quality and are not officially Supported. Use at your own risk. Feel free to modify and expand and share your contributions.
Nice document..
We received a comment at vCOTeam.info asking how you would go about specifying the usename provided to this workflow as the owner of the newly deployed vApp...
The following snippet would require the (username) you wish to set as the owner. It would also require the vCloud:Organization (org) object and the vCloud:VApp (vApp) object you wish to set the new owner on.
// First we need to get the adminObject for the Organization:
var adminOrg = org.toAdminObject();
// Now we can use the getUserByName method that takes a string input
var vCloudUser = adminOrg.getUserByName(username);
// Finally, if the user was found, we set the ownership
if (vCloudUser != null){
vApp.changeOwner(vCloudUser.getReference());
}
You ROCK!!! Now I will rule the known universe with vCO!