Vagrantfile 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # Work around nfs mount name length in FreeBSD
  4. ENV['BERKSHELF_PATH'] = File.expand_path('~/.berks')
  5. Vagrant.configure("2") do |config|
  6. # All Vagrant configuration is done here. The most common configuration
  7. # options are documented and commented below. For a complete reference,
  8. # please see the online documentation at vagrantup.com.
  9. config.vm.hostname = "pkgng-berkshelf"
  10. # Every Vagrant virtual environment requires a box to build off of.
  11. config.vm.box = "freebsd-9.1-amd64"
  12. # The url from where the 'config.vm.box' box will be fetched if it
  13. # doesn't already exist on the user's system.
  14. config.vm.box_url = "https://dl.dropboxusercontent.com/u/25355402/freebsd-9.1-amd64.box"
  15. # Assign this VM to a host-only network IP, allowing you to access it
  16. # via the IP. Host-only networks can talk to the host machine as well as
  17. # any other machines on the same network, but cannot be accessed (through this
  18. # network interface) by any external networks.
  19. config.vm.network :private_network, ip: "33.33.33.10"
  20. # Create a public network, which generally matched to bridged network.
  21. # Bridged networks make the machine appear as another physical device on
  22. # your network.
  23. # config.vm.network :public_network
  24. # Create a forwarded port mapping which allows access to a specific port
  25. # within the machine from a port on the host machine. In the example below,
  26. # accessing "localhost:8080" will access port 80 on the guest machine.
  27. # Share an additional folder to the guest VM. The first argument is
  28. # the path on the host to the actual folder. The second argument is
  29. # the path on the guest to mount the folder. And the optional third
  30. # argument is a set of non-required options.
  31. # config.vm.synced_folder "../data", "/vagrant_data"
  32. config.vm.synced_folder ".", "/vagrant", nfs: true
  33. # Provider-specific configuration so you can fine-tune various
  34. # backing providers for Vagrant. These expose provider-specific options.
  35. # Example for VirtualBox:
  36. #
  37. # config.vm.provider :virtualbox do |vb|
  38. # # Don't boot with headless mode
  39. # vb.gui = true
  40. #
  41. # # Use VBoxManage to customize the VM. For example to change memory:
  42. # vb.customize ["modifyvm", :id, "--memory", "1024"]
  43. # end
  44. #
  45. # View the documentation for the provider you're using for more
  46. # information on available options.
  47. config.ssh.max_tries = 40
  48. config.ssh.timeout = 120
  49. # The path to the Berksfile to use with Vagrant Berkshelf
  50. # config.berkshelf.berksfile_path = "./Berksfile"
  51. # Enabling the Berkshelf plugin. To enable this globally, add this configuration
  52. # option to your ~/.vagrant.d/Vagrantfile file
  53. config.berkshelf.enabled = true
  54. # An array of symbols representing groups of cookbook described in the Vagrantfile
  55. # to exclusively install and copy to Vagrant's shelf.
  56. # config.berkshelf.only = []
  57. # An array of symbols representing groups of cookbook described in the Vagrantfile
  58. # to skip installing and copying to Vagrant's shelf.
  59. # config.berkshelf.except = []
  60. config.vm.provision :chef_solo do |chef|
  61. chef.json = {
  62. :mysql => {
  63. :server_root_password => 'rootpass',
  64. :server_debian_password => 'debpass',
  65. :server_repl_password => 'replpass'
  66. }
  67. }
  68. chef.run_list = [
  69. "recipe[pkgng::default]"
  70. ]
  71. chef.nfs = true
  72. end
  73. end