diff --git a/Vagrantfile b/Vagrantfile index 6fe482d..0f20e19 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,7 +10,6 @@ require 'yaml' conf = YAML.load(File.open('config.yaml')) def configure_vm(name, vm, conf) - vm.box = name vm.hostname = conf["#{name}_hostname"] or name # we do an L2 bridge directly onto the physical network, which means @@ -66,18 +65,23 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| configure_vm("compute1", compute1.vm, conf) end end - # The url from where the 'config.vm.box' box will be fetched if it - # doesn't already exist on the user's system. + + # You can either name a Vagrant box you have locally added and use + # that as a starting point, or give a url from where the 'config.vm.box' + # box will be fetched. # # We start with the Ubuntu 12.04 upstream image, which will work. However - # building from this ever time is slow. So the recommended model is build + # building from this every time is slow. So the recommended model is build # the manager once, and recapture that. You do have to nuke a bunch of # network config information to make that capture work (documentation TBD). - - config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box' - # this lets you use a locally accessible version faster - if conf['box_url'] - config.vm.box_url = conf['box_url'] + if conf['box_name'] + config.vm.box = conf['box_name'] + else + config.vm.box_url = 'https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box' + # this lets you use a locally accessible version faster + if conf['box_url'] + config.vm.box_url = conf['box_url'] + end end # Create a forwarded port mapping which allows access to a specific port diff --git a/config.yaml.sample b/config.yaml.sample index a1309be..5a8a5e9 100644 --- a/config.yaml.sample +++ b/config.yaml.sample @@ -8,8 +8,15 @@ stack_sshkey: > setup_mode: devstack # what interface on the host should be used for a bridge # will often be eth0, but vagrant needs to know for sure +# This needs to be the full string descriptor of the interface. +# On some systems this can be something annoying like +# 'en1: Wi-Fi (Airport)'. Vagrant will not use this setting +# unless you get it exactly right. bridge_int: eth1 -# A non upstream url for the base box, used to speed things up +# A non upstream for the base box, used to speed things up. +# Choose one of box_name (for a locally added box) or box_url +# for the url of a nearby box. +#box_name: 'my.favorite' #box_url: http://gallifrey/vagrant/devstack-2014-02-19.box # Local devstack options