# -*- 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| # 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 |vagrant| vagrant.vm.hostname = 'dev-ubuntu12' vagrant.vm.box = 'precise64' vagrant.vm.box_url = 'http://files.vagrantup.com/precise64.box' vagrant.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 vagrant.vm.synced_folder '.', '/home/vagrant/p4ws', mount_options: ['dmode=775,fmode=664'] vagrant.vm.provision 'salt' do |salt| salt.minion_config = './salt/minion-dev' salt.run_highstate = true end end # Creates a salt master that we can use to test out different test and build # scenarios locally before we set up the "CD" system. config.vm.define 'master' do |vagrant| vagrant.vm.hostname = 'master' vagrant.vm.box = 'precise64' vagrant.vm.box_url = 'http://files.vagrantup.com/precise64.box' vagrant.vm.network :private_network, ip: '172.16.100.5' vagrant.vm.synced_folder '.', '/home/vagrant/p4ws' # The salt master actually needs some RAM in order to transfer large files. vagrant.vm.provider 'virtualbox' do |vb| vb.memory = 2048 end vagrant.vm.provision 'salt' do |salt| salt.install_master = true salt.run_highstate = false salt.master_config = './salt/master' salt.minion_config = './salt/minion-buildmaster' end end # The build environment expects to be managed by the 'master' VM already # configured. config.vm.define 'build-ubuntu12' do |vagrant| vagrant.vm.hostname = 'build-ubuntu12' vagrant.vm.box = 'precise64' vagrant.vm.box_url = 'http://files.vagrantup.com/precise64.box' vagrant.vm.network :private_network, ip: '172.16.100.10' # We need a bit more gas to build all of the required native extensions vagrant.vm.provider 'virtualbox' do |vb| vb.memory = 8056 vb.cpus = 2 end vagrant.vm.provision 'salt' do |salt| salt.run_highstate = false salt.minion_config = './salt/minion-build' end end # The test environment expects to be managed via the 'master' environment # already running. config.vm.define 'test-ubuntu12' do |vagrant| vagrant.vm.hostname = 'test-ubuntu12' vagrant.vm.box = 'precise64' vagrant.vm.box_url = 'http://files.vagrantup.com/precise64.box' vagrant.vm.network :private_network, ip: '172.16.100.11' # We have real problems provisioning a machine with only 1GB RAM. vagrant.vm.provider 'virtualbox' do |vb| vb.memory = 2048 end vagrant.vm.provision 'salt' do |salt| salt.run_highstate = false salt.minion_config = './salt/minion-test' end end # This environment should install all packages from pkg-ondemand, thus, # emulating a 'production' install. config.vm.define 'eval-ubuntu12' do |vagrant| end end