# -*- mode: ruby -*- # vi: set ft=ruby : # This is a set of different vagrant setups that are primarily useful for package # building and testing. The techniques here were borrowed from the Git Fusion # team. Vagrant.configure(2) do |config| # Rebuilds the entire build environment as needed. config.vm.define 'build-ubuntu12' do |docker| docker.vm.box = 'precise64' docker.vm.box_url = 'http://files.vagrantup.com/precise64.box' docker.vm.network :private_network, ip: '172.16.100.10' # We need a bit more gas to build all of the required native extensions docker.vm.provider 'virtualbox' do |vb| vb.memory = 8056 vb.cpus = 2 end # Note: installers will fail if you mount files with the 664 mode docker.vm.synced_folder '.', '/home/vagrant/p4ws' docker.vm.provision 'salt' do |salt| salt.minion_config = './salt/minion/build/minion' salt.run_highstate = true end # This is effectively the build process docker.vm.provision 'shell', inline:<<-END.gsub(/^[ ]{6}/, '') cd /home/vagrant/p4ws rake build END end # Our development environment starts up all services within the VM, with # each service referencing the locally mounted source. # # You can edit and restart services to see updates, or, start them locally # and change your network references around. config.vm.define 'dev-ubuntu12' do |docker| docker.vm.box = 'precise64' docker.vm.box_url = 'http://files.vagrantup.com/precise64.box' docker.vm.network :private_network, ip: '172.16.100.20' # Note that shared folders will not work with Virtual Box Guest Additions 4.3.10 until this workaround is performed inside the guest: # https://www.virtualbox.org/ticket/12879#comment:2 # sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions docker.vm.synced_folder '.', '/home/vagrant/p4ws', mount_options: ['dmode=775,fmode=664'] # TODO investigate just using the Salt provisioner. docker.vm.provision 'shell', path: 'config/bootstrap-salt-minion.sh' end # TODO unlike these other environments, this should mimic a 'real user' # config.vm.define 'prod-ubuntu12' do |docker| end end