With a focus on Cloud Management in my daily job, orchestration in cloud infrastructures shouldn’t be an underexposed subject. Orchestration has everything to do with automating repetitive tasks normally performed by a system administrator. Orchestration is not about writing scripts, but more about creating workflows using existing elements. VMware offers vCenter Orchestrator (vCO) as their orchestration tool and is included in every vCenter Server installation.
In this post I will link to some articles on how to configure vCO and I will show you how to create a basic workflow in this article. To make things a little interesting I’ve created a “real life” workflow which will create vCloud Director organization. The workflow will link an “Organization vDC” to this new organization. The workflow will also create an administrative user.
vCenter Orchestrator Videos
To get things up and running I first watched the free e-learning movies about vCenter Orchestrator available on vmwarelearning.com. The instructor in this videos is Brian Watrous; he will help you to get some basic understanding on vCenter Orchestrator.
On top on this I also had a very good conversation with Arnim van Lieshout, who works for VMware PSO in Northern EMEA and is focussing on vCenter Orchestration in his daily role. Arnim gave some good tips on how to develop a vCO workflow.
The actual creation of the workflow discussed in this post, costed me a little more than one hour, which is not too much. If you want to achieve the same result (so creating an organization, link the organization vDC and link a user) using some kind scripting (e.g. PowerCLI) it will definitely cost your more time…unless your name is PowerCLI Man, Alan Renouf or Luc Dekens.
Of course you have to have knowledge of vSphere and vCloud Director in this case, some programming/scripting knowledge will give you a big advantage. Also some insight in the object model used in vSphere and vCloud Director will help you in developing workflows.
Before I will introduce the actual workflow, I will first give some tips on configuring vCO. If you have vCO up and running, just skip to the “Connect to vCO using the vCO client” part.
Configure vCenter Orchestrator
Although vCenter Orchestrator (vCO) is installed by default when installing vCenter Server, you have to go through some final configuration steps before you can use vCO. If you install Orchestrator together with vCenter Server, the Orchestrator server is preconfigured to use the vCenter Server datasource and no additional configuration of the database is required. However, if you need to use a separate database, you can configure Orchestrator to use a dedicated database by using the Orchestrator configuration interface.
Note: You can also download the vCO Appliance which is available here, if you don’t want to use the vCO instance included with vCenter Server.
First, start the vCenter Orchestrator Configuration service on the vCenter Server. Now logon to the vCO configuration interface on https://vcenterhost:8283/ and logon using vmware/vmware. Just follow the procedure as described in the vSphere online documentation. The procedure is pretty straight forward and should not be too difficult.
Because we also want to access vCloud Director from vCO, we have to load the vCD plugin into vCO. First download the plugin from the VMware website, next upload it to vCO. After a succesful upload the vCD plugin will be displayed in vCO. The next step is to configure the vCD plugin:
Fill out the hostname for vCD and the organization you want to connect to. Important: Specify the “System” organization for vCloud administrator level access. I selected the option “shared session” and specified a vCO service account in vCD. This account was used to connect to vCD from vCO. After applying the settings, vCO will test the connection to vCD. If everything works as expected, you can continue to the next step.
Connect to vCO using the vCO Client
After configuring the plugin you can directly Access vCD objects through the vCO Client. Open http://vcenterhostname:8282/ to download the vCO client. It’s java application that can run on Windows, Linux and Apple.
Download en install the client and connect to your vCO server. After logging in you will find all the default workflows in the workflows tab. If you’ve setup the connection with vCD correctly, vCloud Director workflows will show up in this list.
For the custom workflow I’m building I will use three standard vCD workflow items:
- Add an organization – Will create a new vCD organization
- Add a vDC – Will create a Organization vDC and link it to the newly created organization and already existing Provider vDC
- Add a user – Will create a default administrative user.
Create the vCO workflow
First create a new workflow in vCO. Think about a descriptive name for the workflow. Click the pencil icon to edit the workflow.
Now drop the standard workflows on the canvas, so your workflow will look like this:
The basic workflow is now available but will not work unless you specify the required parameters. In this example I will use the “visual binding” option to setup the necessary parameters for the workflow. It’s important to know that there are three types of parameters in a workflow:
- IN parameters: These parameters are input values for the workflow (by a user or another process which starts the workflow).
- OUT parameters: These are parameters returned by the workflow on exit.
- ATTRIBUTE: A value that only exists within the workflow and can be used to set predefined values or can be used to pass a value from one element to another.
In this case we will use IN parameters and some ATTRIBUTES.
To be continued…
Part 2 of this article will be published next week. You can leave you e-mail address in subscribe form at the top right of this website.
hey…i want to know how to connect vCenter server from vCO?
please provide suggest.
There’s a workflow in vCO to connect orchestrator to vCenter Server.
Is it possible to do actions with VCO like power off/on vApp’s if you don’t have vCloud, but only vCenter?
Yes, you can do that…no problem.
Would it require something like this to do it?
I installed the VCD plugin on my VCO, but since I don’t have vCloud there are no usable classes…
I can’t think of any other way to create, delete and restore vApp’s from templates any other way except by calling the methods direct in that API, then create Actions from that point.
Does that sound correct?