.. Explore the power of vCenter Orchestrator!
Last Updated on Saturday, 20 October 2012 10:09
This article is the first in a series of tutorials for developing a basic VM self service portal. It is meant to be educational rather than exhaustive. Other articles will follow up for supporting more advanced features and a less static configuration.
Concepts covered in this article include:
Developing the provisioning Workflow
First log in with the vCO Client, then Click on the Workflows tab and add a category (right Click / "Add Category..."). The Category helps organize your custom Workflows.
You can now name it.
Now create a new Workflow (right Click / "New Workflow").
You can now name it.
While not mandatory, it is recommended to edit the version of the Workflow every time you make a change. (Click on the last Version digit).
Now drag and drop the "Workflow element" palette item on the schema.
The chooser is now expecting you to provide the name of the Workflow you want to insert in this schema. In the search box type in "Clone virtual machine, no customization". There are several clone Workflows so you want to make sure you entered enough text to filter down to one single Workflow. Click on the Workflow and then on "Select".
The boxes on the side represent your Workflow inputs, outputs and attributes. The inputs feed your Workflow with necessary or optional parameters. The inputs can either be manually entered (such as when the Workflow is started manually i.e the Workflow you are creating) or passed as parameters automatically (such as when started by another Workflow or another system. i.e the Clone VM Workflow). The outputs are the results that will be returned on completion. The attributes are your Workflow internal variables. These are not accessible outside of the Workflow as represented in the visual Binding view. As of now you do not have defined any inputs, outputs or variable.
To create an input you can drag and drop the "Clone Virtual Machine" inputs in the top left "In Parameters" box.
The vm input in this Workflow is representing the VM or template to clone from. Many library Workflows have comments indicating the usage of the parameters. To check parameter comments you can switch to the "IN" tab. Switch back to "Visual Binding" tab. Drag and drop the vm input in the top left in Parameters box. This will bring the following window. All the different fields have been pre-filled for you. Click OK.
To do so drag and drop the vmFolder input in the bottom left Attribute box. This will bring the following window.
The window gives you the option to set this attribute with a value. Click on the "Not set" link in the Value field.
Once completed the Visual Binding should look like this:
Now that the data flow is completed we need to complete the process flow. Select the link mode as follow (as an alternative you can ctrl click).
Now link the Start symbol in the schema view to the first Workflow. We will now validate the Workflow as follows
The validation will display a warning indicating we forgot to add the Workflow End symbol.
By clicking on "Create end ..." the Workflow will now validate.
As you can see below the end symbol was added and linked automatically
Click on save and close. Congratulations you have completed the workflow.
Testing the Workflow from the vCO Client
Right click on the Workflow and select "Execute workflow ..."
Select a template and name your new VM as wanted and submit.
You will now be able to see the Workflow progress. The schema will enlighten the current step with navigating within the different Workflows and with updating the Workflows attributes. Once the Workflow will have completed you will be able to check these.
On the left pane you can see the Workflow status. If something wrong happened you can view the error message at the bottom of the Variables and in the Events tab.
Starting the provisioning Workflow through a web Browser
vCO has a build in web server able to deploy web pages called "Web views". The weboperator is installed with vCO. It is a basic web based Workflow operator client. Before closing your vCO client click on the Web views tab". If the web operator web view does not shows a Started status right click and Click publish.
To access the vCO web server type in your vCO server hostname or IP address (as shown in the vCO client title bar) on the 8280 port.
This is the vCO root level page. Click on the "Webview List" link.
The next screen will list all the published Webviews. My server is running Lifecycle Manager. It may not be the case for yours. Click on weboperator.
Now log in with a user that has rights to log in vCO.
Now unfold the Workflow categories and select your Provision VM Workflow.
In the right pane click on "Execute Workflow".
Fill in the input fields (the first field support both typing in with completion and tree view using the magnifier). Click submit.
You will now see a new Workflow execution showing the Workflow is running. You can check the status with the schema tab. To update status and schema you may have to reload the page.
Congratulations you have started your Workflow through a web client !