fduranti
Hot Shot
Hot Shot

Access to Deployment/Virtual Machine Custom property

Jump to solution

I'm trying to create some resource action to give the user of vra something useful (like doing puppet run on the client, deploying/undeploying applications and so on).

I'm using vra 7.3 with integrated vco.

I've created a workflow that get a VC:Virtualmachine as input.

It's possible to access from this workflow some of the custom properties defined in the deployment or in the Virtual machine itself?

0 Kudos
1 Solution

Accepted Solutions
SeanKohler
Expert
Expert

Yes.  But there is a lot here.  I guess to get you started, just look into the VRO action

com.vmware.library.vcac/getPropertiesFromVirtualMachine

From there you pull the properties (after supplying vCAC:VCACHost and vCAC:VirtualMachine -- the latter you can typecast from your VC:VirtualMachine) and then you need to enumerate the property key that is holding your puppet role name. This is good for learning, but in reality you can get a jump start on this by leveraging the subscription-based event driven models to get payload property data right in your workflow when the machine is provisioned.  You can also use this if you have an Enterprise Puppet deployment.  Integrate Puppet with vRA 7.3 to manage application delivery | Puppet

Here is an example of one way to get a vCAC:VirtualMachine from VC:VirtualMachine

var vCACVms = Server.findAllForType("VCAC:VirtualMachine", "VirtualMachineName eq '" + vcVM.name + "'");

if (vCACVms.length > 0 ){

    var vcacVMObj = vCACVms[0];

}

You can also look into SovLabs capabilities.  This is good if you want a huge jumpstart in capability with strong technical support.

Puppet Open Source with Foreman vRA Module – SovLabs

Puppet Enterprise vRA Module – SovLabs

View solution in original post

0 Kudos
2 Replies
SeanKohler
Expert
Expert

Yes.  But there is a lot here.  I guess to get you started, just look into the VRO action

com.vmware.library.vcac/getPropertiesFromVirtualMachine

From there you pull the properties (after supplying vCAC:VCACHost and vCAC:VirtualMachine -- the latter you can typecast from your VC:VirtualMachine) and then you need to enumerate the property key that is holding your puppet role name. This is good for learning, but in reality you can get a jump start on this by leveraging the subscription-based event driven models to get payload property data right in your workflow when the machine is provisioned.  You can also use this if you have an Enterprise Puppet deployment.  Integrate Puppet with vRA 7.3 to manage application delivery | Puppet

Here is an example of one way to get a vCAC:VirtualMachine from VC:VirtualMachine

var vCACVms = Server.findAllForType("VCAC:VirtualMachine", "VirtualMachineName eq '" + vcVM.name + "'");

if (vCACVms.length > 0 ){

    var vcacVMObj = vCACVms[0];

}

You can also look into SovLabs capabilities.  This is good if you want a huge jumpstart in capability with strong technical support.

Puppet Open Source with Foreman vRA Module – SovLabs

Puppet Enterprise vRA Module – SovLabs

View solution in original post

0 Kudos
fduranti
Hot Shot
Hot Shot

Starting to understand all the things that could be done and it seems really nice Smiley Happy

0 Kudos