Everything you need to know about the intricacies of the vRO workflow

In this vRealize deployment tutorial, we take a close look at the components that make up and the complexities within vRealize Orchestrator workflows.

In part one of our tutorial on improving the functionality of vRealize, we learned the benefits of and how to configure...

vRealize Orchestrator and how to create a vRO workflow. Here in part two, we will go into further detail on understanding and working with rudimentary workflows. Before we do, we need to know some of the important components that make up the vRealize Orchestrator system.

Workflows

A workflow is the business logic that dictates what happens as data flows down the decision tree defined prior to execution. You can think of it as the "what/if" of a standard workflow diagram.

The workflow is also the outer wrapper that contains all the elements required to successfully execute the workflow. The scripting language that underlies vRealize Orchestrator (vRO) is JavaScript. Note that each instance of a workflow has its own unique ID, commonly referred to as a "workflow token." This token allows check-pointing to occur so that when scripts fail, they do so in a predictable way that can be tracked and remedied as required. Although we won't be discussing workflow tokens again in this tutorial, it's important to be aware of their existence.

Actions

As the name implies, actions do things. They are essentially scripts and chunks of code that can be called upon to perform an action with inputs as required. For example, "getAllWindowsVMs" is a JavaScript routine that will return a list of all Windows virtual machines (VMs) when given the correct input (e.g., a vCenter to interrogate.)

Packages

Packages are exportable collections of elements. They can include workflows, action configurations, Web views and plug-ins. You can export your workflows and dependencies as one easy-to-manage package, such as a zip file. These can be given away, exported or sold.

Policies and templates

Templates and policies are used to allow external events to trigger an action. For example, an incoming request from an external application can trigger a workflow and execute the actions and logic within that workflow.

All these workflow items can be found on the tabs on the left of your screen, as seen in Figure A.

vRO workflow items
Figure A. A list of vRO workflow items can be found on the left-hand side of the screen.

Now that we've established the basics, let's look at building a very simple script to create a VM within vRO. The client URL takes the form of the following URL:

http://vra_fqdn:8281/vro

It is considered bad form to edit any of the original vRO workflows; you should duplicate them into a separate folder to work on them. This makes it easier to go back and get another copy of the original if needed. I am going to create a new folder (named "Stuarts Workflows") and copy the required workflow into my personal folder.

Go to "Library" on the left-hand side of the screen and make sure the workflows tab is selected. Right-click "Add folder" and give the folder an appropriate name. Once you've created the folder, navigate to vCenter>Virtual Machine Management>Basic>Create custom virtual machine and right-click and select "Duplicate Workflow." Give the workflow a new, specific name. On the workflow folder, click on the hyperlink, enter your folder name into the search box and then click "Submit."

New workflow name
Figure B. Give the workflow a new, specific name.

Once the workflow is copied into your new folder, right-click and select "Edit."

On the screen that pops up, you will see a lot of options with several tabs of windows. It is generally good practice to enter detailed descriptions, as they will be used to prompt users for relevant information. The next page holds the outputs. In our case, the output is the newly created VM.

The only other item of note on this screen is the version. Do not mistake this for a versioning control system. Each time it is modified and saved, the count can be increased. Also note that there is no undo feature. It's a bit of an oversight, but a couple ways around this are to make frequent backups by using the copy workflow feature or to not save and lose the other edits you made since last save.

To start, select the input tab from the top. As the name suggests, the input tab contains all the required information to build a new VM. Notice how all the entries in the name field have no spaces -- input names cannot have spaces in their names. The type is which variable is required, followed by the description, which is the third column. The schema tab is where we define all the vRO workflow logic. In our case, it is extremely simple as there are no loops or decision branches/logic.

At present, the only other tab you should be aware of is the Events tab. As the name suggests, it contains information and events that occurred with the workflow.

Creating the VM

With the schema window open, click the play (Run) button. It may take a few moments to prepare the vRO workflow to run, but eventually a window will pop up. Click the hyperlink in the window to set the host, and then use the search box to locate hostname by entering the first few letters, which will present you all the matching hosts.

Select an appropriate host and press "OK" followed by "next" on the dialog box. Now all we need to do is give the VM a name and set some parameters for a custom VM. Click "Not Set" and enter appropriate values. Don't forget to select the radio buttons for disk and network -- after all, a VM without any disks isn't of much use. Follow through selecting entries or drop down values.

Executing the vRO workflow

Once you have filled all of the mandatory fields, click "Submit." Notice that you can see the flow move from one module to the next. Once it gets to the green target board, the workflow has been completed successfully and the VM will now exist in the VC. If any part of the workflow turns red, an error has occurred.

Executing the workflow
Figure C. Executing the workflow.

You can copy other workflows and experiment with them. One example would be to copy and test a cloning workflow to see how it works. At this point, we've only just begun to scratch the surface of the workflow's capability. In our next installment, we will look at chaining together multiple workflows to do something more useful.

Next Steps

Why IT professionals should stop worrying and embrace VMware automation

Put your vRealize Suite knowledge to the test with this helpful quiz

Avoid the usual risks of VMware virtual machine backup

This was last published in November 2015

Dig Deeper on VMware how-tos

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What are some of the benefits of the vRO workflow's capabilities?
Cancel

-ADS BY GOOGLE

SearchServerVirtualization

SearchVirtualDesktop

SearchDataCenter

SearchCloudComputing

Close