vRA7 to vRO Extensibility Magic Secrets Revealed Part 3

Let’s tie it all together now and test this integration. In Part 1 you learned about vRA 7 to vRO architecture and how we pass data. In Part 2 we created a workflow in vRO that will recieve custom properties from vRA into attributes in vRO to tell vRO workflows how and what you want to automate. In this guide we will finish off the integration in vRA by creating the needed custom properties in our blueprint as well as configuring an event broker subscription.

Pre-Reqs

Part 1 and Part II must be complete

Let’s create the custom properties on the blueprint first

  1. Login to the vRA portal as a cloud admin and click the design tab
  2. Click Blueprints
  3. Highlight a blueprint you want to modify
  4. Click edit

Add the custom properties

  1. Click the machine object
  2. Click the properties tab
  3. Click Custom Properties
  4. Add the following property
  5. Add the myscript property
  6. Click Finish
Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.MachineProvisioned     *

myscript      echo "Hello World, my ip address is $1" > /helloworld.log

 

Now let’s add the event subscription to call that vRO workflow we created earlier

  1. Click the administration Tab
  2. Click Events
  3. Click Subscriptions
  4. Click + New

Create the subscription

  1. Select Machine Provisioned
  2. Click Next

Create the following conditions

  1. Select Run based on conditions
  2. Select All of the following
  3. Select Data>LifecycleState>Lifecycle State Name   Equals VMPSMasterWorkflow32.MachineProvisioned
  4. Select Data>LifecycleState>State phase   Equals    POST
  5. Select Data>Blueprint name    equals  CentOS7_Test
  6. Click Next

Select the vRO workflow we created earlier

  1. Browse to the workflow and select it
  2. Click Next

Enter the blocking information

  1. Select blocking
  2. Enter a timeout
  3. Click Finish

Publish the subscription

Fire off a new request

Monitor the status of the workflow in the vRO client

  1. Click to highlight the running workflow
  2. Click the logs tab to view the logs

Check the results in the new VM we provisioned

  1. Click the items view tab
  2. Expand out the new deployment
  3. Get the ip address

Open an SSH or RDP session to the new VM

  1. Open an ssh session to the IP address
  2. Login with root or root level user and password
  3. cd /
  4. ls
  5. cat helloworld.log

Enjoy! Post any questions below or hit me up on Twitter @vmtocloud

Remember sharing is caring!

4 Replies to “vRA7 to vRO Extensibility Magic Secrets Revealed Part 3”

  1. Pingback: vRA7 to vRO Extensibility Magic Secrets Revealed Part 2 – VMtoCloud.com

  2. Hi Ryan,

    great and very usefull demo and explanations, just wondering how you get the helloworld.log working with the
    mynewscript = myscript + ” ” + ipaddress in vRO
    because if the script you passed in myscript custom property in vRA is equal to
    echo “Hello World, my ip address is $1” > /helloworld.log, then the mynewscript is equal to
    echo “Hello World, my ip address is $1” > /helloworld.log 192.168.110.200
    in your example, so it doesnt work…well
    or I missed something like the $1 usage ???

    • Hi,

      I am using $1 as a variable in the script, so when it executes the ip address 192.168.200 is the argument for that variable. So the result in the log should read Hello World, my ip address is 192.168.200 This is just an example of how to pass values around in vRO.

  3. I used the above workflow but replace last action item of the Workflow with Copy file from vco to VM Workflow, its been failing with error unable to read property sdk connection; can you let me know how can I overcome this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.