VMware Cloud Community
wwstreet
Enthusiast
Enthusiast

Stuck calling a vRO 7 Workflow from vRA 7

I have a small powershell script that assigns webtags to servers.  My goal is to utilize this script to gather build information and pass that information back to vRO and automagically have my web tags assigned as people request servers from the catalog.

The PS script works fine.  Its been tested and runs with no issue.

I have a vRO workflow calling my PS script and when manually ran, works normally.

I have created a XaaS BP that references my vRO workflow.  I added this XaaS BP to my W2K8 BP and when requested, I see the XaaS section appear and I can fill it out. I can verify my variables being passed back to vRO with a single exception.  The name of the VM that is bring built. I am using Sid's custom naming script to set my VM name.  How can I pull the name of the VM being built directly into the XaaS BP?

2016-07-21_12-46-17.jpg

Also, how do I tell the XaaS script to only run after my VM is created?  Right now it runs immediately and obviously fails because the VM hasn't been built.

Thanks!

0 Kudos
10 Replies
kallischlauch
Enthusiast
Enthusiast

Hey,

no need to use XaaS and add that to the blueprint.

The way you should proceed is to use the event broker. The event broker will call your workflow in pretty much any lifecycle stage. and for each stage there's PRE and POST (POST-building machine, PRE-Activated, POST-Disposing) ...

The event broker is also nice enough to send the VM info as properties to your workflow

So essentially the event broker will call your workflow (for tagging maybe use POST-Provisioning phase) it will pass your VM info. Your workflow can then extract the info and tag the machine. Done. No need to do anything in blueprint

Here's a great article that introduces the event broker

https://virtualviking.net/2016/01/07/exploring-the-vrealize-automate-7-0-event-broker-service/

Kalli

0 Kudos
wwstreet
Enthusiast
Enthusiast

Thanks Kalli.  I tried the broker service but I keep getting a 503 Service Not Available error.  I use an external vRO server but vRA keeps looking internally for some strange reason.  VMW has not been able to figure out why.  I was hoping to find a way around it since its already been 30 days.

0 Kudos
kallischlauch
Enthusiast
Enthusiast

mad ... especially when it works with XaaS


maybe you can redirect https://vraLoadbalancer/vco to your external orchestrator 😄

Good luck! I know you're looking for workarounds but if you can't sort the eventbroker problem I think you'll be creating workarounds all day.

actually ... If its only the event broker, you can also use the old-style method (vra 6.2) of invoking using workflow stubs?

0 Kudos
wwstreet
Enthusiast
Enthusiast

" If its only the event broker, you can also use the old-style method (vra 6.2) of invoking using workflow stubs?"  - How so?

0 Kudos
rmav01
Enthusiast
Enthusiast

Can you share the conditions to trigger your workflow via the Event Broker? What I would personally do is setup a very basic vRO workflow that passes in the Properties object you gather from vRA and then log the contents. That way you can check when the workflow triggers and what values you have to work with. You might need something like a Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.SomeStatus custom property bound somewhere in the blueprint with the value * to find the values you want. Then you can sift through that and bind the values to your workflow appropriately.

0 Kudos
wwstreet
Enthusiast
Enthusiast

I am simply checking for the life cycle state to equal BasicVmWorkflow.BuildComplete.  This should call my workflow and apply the web tags from vRA.

EB Conditions.jpg

However, I am using an external vRO.  This was the advice from VMW because of my enterprise configuration.  When looking at the event log, I get this (below) which is looking for the locally configured vRO.  VMW is currently looking at the logs to see if they can figure out the reason.  My vRO endpoint reflects my external vRO and the configuration tests successfully.  Just kind of odd.

vRP Error.jpg

0 Kudos
rmav01
Enthusiast
Enthusiast

Is the external vRO configured at the Administration >> vRO Configuration >> Server Configuration level, or is it set to "Use the default Orchestrator server that was configured by the system administrator."?

In our environment we have an external vRO as well, but are not using it as an endpoint. I would assume the event broker would use the instance set at the server configuration level. Probably something you've already checked, just brainstorming here. Smiley Happy

0 Kudos
wwstreet
Enthusiast
Enthusiast

It is set to the external vRO appliance.

0 Kudos
MikeNox
Enthusiast
Enthusiast

Have you tried "Design->XaaS Blueprints", edit the blueprint Apply tages and hit reload.

XaaS.jpg

0 Kudos
wwstreet
Enthusiast
Enthusiast

Yes

0 Kudos