2013-03-06 21:08:21 +04:00
|
|
|
def Kernel.is_windows?
|
|
|
|
processor, platform, *rest = RUBY_PLATFORM.split("-")
|
|
|
|
platform == 'mingw32'
|
|
|
|
end
|
|
|
|
|
|
|
|
Vagrant::Config.run do |config|
|
|
|
|
config.vm.box = "precise32"
|
|
|
|
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
|
2014-01-07 19:24:35 +04:00
|
|
|
config.vm.customize ["modifyvm", :id, "--memory", "1024"]
|
2013-03-06 21:08:21 +04:00
|
|
|
config.vm.network :hostonly, "192.168.33.10"
|
|
|
|
|
|
|
|
# enable this to see the GUI if vagrant cannot connect
|
|
|
|
#config.vm.boot_mode = :gui
|
|
|
|
|
|
|
|
config.vm.provision :puppet do |puppet|
|
|
|
|
puppet.manifests_path = "puppet/manifests"
|
|
|
|
puppet.manifest_file = "vagrant.pp"
|
|
|
|
# enable this to see verbose and debug puppet output
|
|
|
|
#puppet.options = "--verbose --debug"
|
|
|
|
end
|
|
|
|
|
|
|
|
# Try to use NFS only on platforms other than Windows
|
|
|
|
nfs = !Kernel.is_windows?
|
|
|
|
config.vm.share_folder("treeherder", "/home/vagrant/treeherder-service", "./", :nfs => nfs)
|
2014-02-20 17:50:43 +04:00
|
|
|
#config.vm.share_folder("treeherder-ui", "/home/vagrant/treeherder-ui", "../treeherder-ui/", :nfs => nfs)
|
2013-03-06 21:19:12 +04:00
|
|
|
end
|