Clean up permissions on demo
[groupbasedpolicy.git] / demos / gbpsfc-env / Vagrantfile
1
2 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
3 VAGRANTFILE_API_VERSION = "2"
4
5 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6   odl=ENV['ODL']
7   config.vm.provider "virtualbox" do |vb|
8     vb.memory = "512"
9   end
10   # run our bootstrapping for the system
11   config.vm.provision 'shell', path: 'bootstrap.sh', :args => odl
12
13   num_nodes = (ENV['NUM_NODES'] || 1).to_i
14
15   # ip configuration
16   ip_base = (ENV['SUBNET'] || "192.168.50.")
17   ips = num_nodes.times.collect { |n| ip_base + "#{n+70}" }
18
19   num_nodes.times do |n|
20     config.vm.define "gbpsfc#{n+1}", autostart: true do |compute|
21       vm_ip = ips[n]
22       vm_index = n+1
23       compute.vm.box = "ubuntu/trusty64"
24       compute.vm.box_version = "20151130.0.0"
25       compute.vm.hostname = "gbpsfc#{vm_index}"
26       compute.vm.network "private_network", ip: "#{vm_ip}"
27       compute.vm.provider :virtualbox do |vb|
28         vb.memory = 512
29         vb.customize ["modifyvm", :id, "--ioapic", "on"]      
30         vb.cpus = 1
31       end
32     end
33   end
34 end