Vagrantfile revision bee3dc86
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4Vagrant.configure(2) do |config|
5
6  # Pick the right distro and bootstrap, default is ubuntu1404
7  config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
8  vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2)
9  vmram=(ENV['VPP_VAGRANT_VMRAM'] || 4096)
10
11  # Define some physical ports for your VMs to be used by DPDK
12  config.vm.network "private_network", type: "dhcp"
13
14  config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh")
15  config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh")
16
17
18  # vagrant-cachier caches apt/yum etc to speed subsequent
19  # vagrant up
20  # to enable, run
21  # vagrant plugin install vagrant-cachier
22  #
23  if Vagrant.has_plugin?("vagrant-cachier")
24    config.cache.scope = :box
25  end
26
27  # use http proxy if avaiable
28  if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf")
29   config.proxy.http     = ENV['http_proxy']
30   config.proxy.https    = ENV['https_proxy']
31   config.proxy.no_proxy = "localhost,127.0.0.1"
32  end
33
34  config.vm.provider "virtualbox" do |vb|
35      vb.customize ["modifyvm", :id, "--ioapic", "on"]
36      vb.memory = "#{vmram}"
37      vb.cpus = "#{vmcpu}"
38  end
39  config.vm.provider "vmware_fusion" do |fusion,override|
40    fusion.vmx["memsize"] = "#{vmram}"
41    fusion.vmx["numvcpus"] = "#{vmcpu}"
42  end
43  config.vm.provider "libvirt" do |lv|
44    lv.memory = "#{vmram}"
45    lv.cpus = "#{vmcpu}"
46  end
47  config.vm.provider "vmware_workstation" do |vws,override|
48    vws.vmx["memsize"] = "#{vmram}"
49    vws.vmx["numvcpus"] = "#{vmcpu}"
50  end
51end
52