core.rb 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. def provision_bootstrap(config)
  2. # TODO this will break if the environment contains the ' delimiter,
  3. # so at some point we need to escape the ' character here and unescape
  4. # it in bootstrap.sh
  5. config.vm.provision "shell" do |sh|
  6. sh.path = "bootstrap.sh"
  7. sh.privileged = false
  8. end
  9. end
  10. def provider_virtualbox(config, ip_address='172.16.0.16')
  11. config.vm.network "private_network", ip: ip_address
  12. config.vm.provider :virtualbox do |vb, override|
  13. override.vm.hostname = "TFB-all"
  14. override.vm.box = "ubuntu/trusty64"
  15. if ENV.fetch('TFB_SHOW_VM', false)
  16. vb.gui = true
  17. end
  18. # Improve Windows VirtualBox DNS resolution speed
  19. # Addresses mitchellh/vagrant#1807 and TechEmpower/FrameworkBenchmarks#1288
  20. vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  21. vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
  22. vb.memory = ENV.fetch('TFB_VB_MEM', 3022)
  23. vb.cpus = ENV.fetch('TFB_VB_CPU', 2)
  24. # The VirtualBox file system for shared folders (vboxfs)
  25. # does not support posix's chown/chmod - these can only
  26. # be set at mount time, and they are uniform for the entire
  27. # shared directory. To mitigate the effects, we set the
  28. # folders and files to 777 permissions.
  29. # With 777 and owner vagrant *most* of the software works ok.
  30. # Occasional issues are still possible.
  31. #
  32. # See mitchellh/vagrant#4997
  33. # See http://superuser.com/a/640028/136050
  34. override.vm.synced_folder "../../toolset", "/home/vagrant/FrameworkBenchmarks/toolset"
  35. override.vm.synced_folder "../../frameworks", "/home/vagrant/FrameworkBenchmarks/frameworks"
  36. override.vm.network :forwarded_port, guest: 8080, host: 28080
  37. end
  38. end