frapposelli / vagrant-vcloud

Vagrant provider for VMware vCloud Director®
MIT License
67 stars 38 forks source link

Using catalogue_item_name and different boxes #107

Closed enxebre closed 9 years ago

enxebre commented 9 years ago

Hi, thanks for working on this plugin.

When trying to upload boxes I am having the 1% issue.

How ever for our approach we dont need to upload boxes so creating empty boxes with same name than the templates that already are in vcloud makes the trick.

I am passing here the "cfg.catalog_item_name" to the "cnx.get_catalog_item_by_name" function instead of the box, because they don't need to be necessary the same, and one "catalog_item" can have several boxes so in "build_app.rb" I am allowing to retrieve the a given box for a given node.

So from the vagrant file you can make use of different boxes for a given catalog item.

config.vm.provider :vcloud do |vcloud|
    vcloud.catalog_name = 'my-catalogue'
    vcloud.catalog_item_name = 'my-exsitent-item-catalogue'
    ....
end

nodes = [
  { :hostname => 'web-vm',
    :box => 'base-image-os-1'
  },
  {
    :hostname => 'db-vm',
    :box => 'base-image-os-2'
  }
]

Hope this make sense and help.

see https://github.com/frapposelli/vagrant-vcloud/pull/106 Thanks!

frapposelli commented 9 years ago

Tracking as #106