Add VB dev Vagrantfile for 1.1

This commit is contained in:
Fabio Rehm 2013-03-09 16:12:55 -03:00
parent d6457aeb74
commit 42a448666a
2 changed files with 42 additions and 0 deletions

View file

@ -147,6 +147,14 @@ cp Vagrantfile.vb.1.0 Vagrantfile
vagrant up
```
### Using VirtualBox and Vagrant 1.1 for development
```
cd development
cp Vagrantfile.vb.1.1 Vagrantfile
vagrant up
```
## Protips

View file

@ -0,0 +1,34 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
def local_cache(box_name)
cache_dir = File.join(File.expand_path(Vagrant::Environment::DEFAULT_HOME),
'cache',
'apt',
box_name)
partial_dir = File.join(cache_dir, 'partial')
FileUtils.mkdir_p(partial_dir) unless File.exists? partial_dir
cache_dir
end
Vagrant::Config.run do |config|
config.vm.box = "quantal64"
config.vm.box_url = "https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box"
config.vm.share_folder "vagrant-root", "/vagrant", "../"
cache_dir = local_cache(config.vm.box)
config.vm.share_folder "vagrant-cache", "/var/cache/apt/archives", cache_dir
if defined? VagrantVbguest::Config
config.vbguest.auto_update = false
config.vbguest.no_remote = true
end
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "."
puppet.manifest_file = "site.pp"
# Pass DEBUG=1 to vagrant commands if you want to make some debugging noise
puppet.options << [ "--verbose", "--debug" ] if ENV["DEBUG"] == '1'
end
end