1 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
2 VAGRANTFILE_API_VERSION = "2"
4 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
6 config.vm.provider "virtualbox" do |vb|
9 # ubuntu/trusty64 + bootstrap.sh = tomas-c/gbpsfc-trusty64
10 # config.vm.provision 'shell', path: 'bootstrap.sh', :args => odl
11 num_nodes = (ENV['NUM_NODES'] || 1).to_i
14 ip_base = (ENV['SUBNET'] || "192.168.50.")
15 ips = num_nodes.times.collect { |n| ip_base + "#{n+70}" }
17 ip_base_sflow = "192.168.53."
18 ips_sflow = num_nodes.times.collect { |n| ip_base_sflow + "#{n+70}" }
20 num_nodes.times do |n|
21 config.vm.define "gbpsfc#{n+1}", autostart: true do |compute|
23 vm_ip_sflow = ips_sflow[n]
25 compute.vm.box = "tomas-c/gbpsfc-trusty64"
26 compute.vm.box_version = "1.0.0"
27 compute.vm.hostname = "gbpsfc#{vm_index}"
28 compute.vm.network "private_network", ip: "#{vm_ip}"
29 compute.vm.network "private_network", ip: "#{vm_ip_sflow}"
30 compute.vm.provider :virtualbox do |vb|
32 vb.customize ["modifyvm", :id, "--ioapic", "on"]