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?
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.
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.
Starting to understand all the things that could be done and it seems really nice