2
0

Vagrantfile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. #
  4. # Source https://github.com/alxn/vpp/blob/master/build-root/vagrant/Vagrantfile
  5. Vagrant.configure(2) do |config|
  6. config.vm.box = "bento/ubuntu-16.04"
  7. config.vm.box_version = "2.2.9"
  8. config.vm.provision 'shell', path: 'bootstrap.ubuntu.sh'
  9. # Add .gnupg dir in so folks can sign patches
  10. # Note, as gnupg puts socket files in that dir, we have
  11. # to be cautious and make sure we are dealing with a plain file
  12. homedir = File.expand_path("~/")
  13. Dir["#{homedir}/.gnupg/**/*"].each do |fname|
  14. if File.file?(fname)
  15. destname = fname.sub(Regexp.escape("#{homedir}/"),'')
  16. config.vm.provision "file", source: fname, destination: destname
  17. end
  18. end
  19. # Copy in the .gitconfig if it exists
  20. if File.file?(File.expand_path("~/.gitconfig"))
  21. config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
  22. end
  23. # vagrant-cachier caches apt/yum etc to speed subsequent
  24. # vagrant up
  25. # to enable, run
  26. # vagrant plugin install vagrant-cachier
  27. #
  28. if Vagrant.has_plugin?("vagrant-cachier")
  29. config.cache.scope = :box
  30. end
  31. # use http proxy if avaiable
  32. if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf")
  33. config.proxy.http = "$http_proxy"
  34. config.proxy.https = "$https_proxy"
  35. config.proxy.no_proxy = "localhost,127.0.0.1"
  36. end
  37. config.vm.synced_folder "../../", "/gnunet", disabled: false
  38. config.vm.provider "virtualbox" do |vb|
  39. vb.memory = "4096"
  40. end
  41. config.vm.provider "vmware_fusion" do |fusion,override|
  42. fusion.vmx["memsize"] = "4096"
  43. end
  44. config.vm.provider "vmware_workstation" do |vws,override|
  45. vws.vmx["memsize"] = "4096"
  46. vws.vmx["numvcpus"] = "4"
  47. end
  48. end