vRealize Orchestrator (vRO) can be a beast. In both in capability and the difficulty in getting exactly the data you want. For a project I’m working on, I wanted to get a list of VMs including tier names, and the deployment name that was deployed from vRealize Automation (vRA). One of the requirement is that I can get this after the entire blueprint has deployed and all at once. Then I want to process this VM list and deployment data, more on that in a future post.
To begin, vRA needs to notify vRO when it has finished deploying a deployment. This happens via the Event Broker. If you have not heard of this Event Broker yet, check here for an in-depth article (with examples). As the event, I chose the Catalog item request completed event. This fires when the deployment is finished.
I’m going to assume you have some knowledge of vRA and vRO going forward (otherwise you probably won’t be here).
Multi-Machine Blueprint
Inside vRA I have a multi-machine blueprint with a simple 3 tier structure: a web server, application, and database tier:
Don’t think I have to add much here. 🙂
vRO Workflow
Inside vRO, you need to have a workflow that is attached to the event in the Event Broker. This workflow will have an incoming parameter called payload, which will contain the information about the deployment that was just completed. The workflow is pretty simple, it’s just a single scriptable task that takes in the payload parameter and does things with it. The exciting bit it the script inside the scriptable task.
Scriptable Task Script
So this is the juicy bit. Below you can find the script I used in the scriptable task in the vRO workflow. I’m a big believer in commenting your code properly, so the code and commentary should speak for itself:
Leave a Reply