Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: Vagrantfile

Issue 5735322126123008: Issue 220 - Switch to Vagrant API version 2 (Closed)
Patch Set: Created March 26, 2014, 3:19 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 VAGRANTFILE_API_VERSION = "2"
2
1 def define_standard_vm(config, host_name, ip) 3 def define_standard_vm(config, host_name, ip)
2 config.vm.define host_name do |config| 4 config.vm.define host_name do |config|
3 config.vm.box = 'precise64' 5 config.vm.box = 'precise64'
4 config.vm.box_url = 'http://files.vagrantup.com/precise64.box' 6 config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
5 config.vm.host_name = "#{host_name}.adblockplus.org" 7 config.vm.host_name = "#{host_name}.adblockplus.org"
6 config.vm.network :hostonly, ip, { nic_type: '82543GC' } 8 config.vm.network :private_network, ip: ip
7 config.vm.customize ["modifyvm", :id, "--cpus", 1] 9 config.vm.provider :virtualbox do |vb|
10 vb.customize ["modifyvm", :id, "--cpus", 1]
11 end
8 12
9 config.vm.provision :shell, :inline => ' 13 config.vm.provision :shell, :inline => '
10 if ! test -f /usr/bin/puppet; then 14 if ! test -f /usr/bin/puppet; then
11 sudo apt-get update && sudo apt-get install -y puppet 15 sudo apt-get update && sudo apt-get install -y puppet
12 fi' 16 fi'
13 17
14 manifest_files = ['vagrant.pp', 'nodes.pp'] 18 manifest_files = ['vagrant.pp', 'nodes.pp']
15 manifest_files.each do |manifest_file| 19 manifest_files.each do |manifest_file|
16 config.vm.provision :puppet do |puppet| 20 config.vm.provision :puppet do |puppet|
17 puppet.options = ['--environment=development'] 21 puppet.options = ['--environment=development']
18 puppet.manifests_path = 'manifests' 22 puppet.manifests_path = 'manifests'
19 puppet.manifest_file = manifest_file 23 puppet.manifest_file = manifest_file
20 puppet.module_path = 'modules' 24 puppet.module_path = 'modules'
21 end 25 end
22 end 26 end
23 27
24 yield(config) if block_given? 28 yield(config) if block_given?
25 end 29 end
26 end 30 end
27 31
28 Vagrant::Config.run do |config| 32 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
29 define_standard_vm config, 'server4', '10.8.0.99' 33 define_standard_vm config, 'server4', '10.8.0.99'
30 define_standard_vm config, 'server5', '10.8.0.100' 34 define_standard_vm config, 'server5', '10.8.0.100'
31 define_standard_vm config, 'server6', '10.8.0.101' 35 define_standard_vm config, 'server6', '10.8.0.101'
32 define_standard_vm config, 'server7', '10.8.0.102' 36 define_standard_vm config, 'server7', '10.8.0.102'
33 define_standard_vm config, 'server10', '10.8.0.105' do |config| 37 define_standard_vm config, 'server10', '10.8.0.105' do |config|
34 config.vm.customize ["modifyvm", :id, "--memory", 1024] 38 config.vm.provider :virtualbox do |vb|
39 vb.customize ["modifyvm", :id, "--memory", 1024]
40 end
35 end 41 end
36 define_standard_vm config, 'server11', '10.8.0.106' 42 define_standard_vm config, 'server11', '10.8.0.106'
37 define_standard_vm config, 'server12', '10.8.0.107' 43 define_standard_vm config, 'server12', '10.8.0.107'
38 define_standard_vm config, 'server15', '10.8.0.110' 44 define_standard_vm config, 'server15', '10.8.0.110'
39 define_standard_vm config, 'server19', '10.8.0.114' 45 define_standard_vm config, 'server19', '10.8.0.114'
40 define_standard_vm config, 'notification1', '10.8.0.118' 46 define_standard_vm config, 'notification1', '10.8.0.118'
41 define_standard_vm config, 'notification2', '10.8.0.119' 47 define_standard_vm config, 'notification2', '10.8.0.119'
42 define_standard_vm config, 'filter1', '10.8.0.120' 48 define_standard_vm config, 'filter1', '10.8.0.120'
43 define_standard_vm config, 'filter2', '10.8.0.121' 49 define_standard_vm config, 'filter2', '10.8.0.121'
44 define_standard_vm config, 'filter3', '10.8.0.122' 50 define_standard_vm config, 'filter3', '10.8.0.122'
(...skipping 13 matching lines...) Expand all
58 define_standard_vm config, 'filter10', '10.8.0.136' 64 define_standard_vm config, 'filter10', '10.8.0.136'
59 define_standard_vm config, 'filter11', '10.8.0.137' 65 define_standard_vm config, 'filter11', '10.8.0.137'
60 define_standard_vm config, 'filter12', '10.8.0.138' 66 define_standard_vm config, 'filter12', '10.8.0.138'
61 define_standard_vm config, 'filter13', '10.8.0.139' 67 define_standard_vm config, 'filter13', '10.8.0.139'
62 define_standard_vm config, 'filter14', '10.8.0.140' 68 define_standard_vm config, 'filter14', '10.8.0.140'
63 define_standard_vm config, 'filter15', '10.8.0.141' 69 define_standard_vm config, 'filter15', '10.8.0.141'
64 define_standard_vm config, 'filter16', '10.8.0.142' 70 define_standard_vm config, 'filter16', '10.8.0.142'
65 define_standard_vm config, 'filter17', '10.8.0.143' 71 define_standard_vm config, 'filter17', '10.8.0.143'
66 define_standard_vm config, 'filter18', '10.8.0.144' 72 define_standard_vm config, 'filter18', '10.8.0.144'
67 end 73 end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld