chef-provisioning-vsphere
chef-provisioning-vsphere copied to clipboard
Provide ability to assign vSphere tags when creating machines
vSphere tags allow users to associate metadata with vSphere objects including VMs. In many environments, the usage of tags is a mandatory requirement when creating VMs. Additionally, many users require a standard hostname format which precludes the ability to directly determine that a host was created by chef-provisioning-vsphere
or kitchen-vsphere
.
In the latter case, the ability to tag a VM with something like test-kitchen
would provide a very easy method to identify temporary machines. This could be used to setup jobs that periodically delete these systems to clean up orphans, prevent VM sprawl, etc.
@jrgarcia any thoughts here? Can rbvmomi
take tags?
I'm pretty sure that RbVmomi doesn't support tagging yet. Let me check on that. I know that the vSphere Automation SDK handles tagging, but it's not available as a Gem or on GitHub yet (I'm working on that as we speak). I'll look at what it would take to add tagging to RbVmomi.
What about this https://code.vmware.com/apis/70/vsphere-automation-ruby ?
@jcalonsoh That is available (I've just actually started working on that as my daily job), but as I stated above, it isn't available as a Gem or on GitHub. It's still available for use, but it is not as easily consumable as it should be.
true @jrgarcia
I am working on it though! :smile: Soon...
Any further movement on this? This is a feature we'd definitely like to see.
Thanks!
@jrgarcia poke :)
I would also like to vote this up. We're using this for kitchen cookbook testing on our VMWare lab.