Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3.  
  4. VAGRANTFILE_API_VERSION = "2"
  5.  
  6. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  7. # Use Ubuntu 14.04 Trusty Tahr 64-bit as our operating system
  8. config.vm.box = "ubuntu/trusty64"
  9.  
  10. # Configurate the virtual machine to use 2GB of RAM
  11. config.vm.provider :virtualbox do |vb|
  12. vb.customize ["modifyvm", :id, "--memory", "2048"]
  13. end
  14.  
  15. # Forward the Rails server default port to the host
  16. config.vm.network :forwarded_port, guest: 3000, host: 3000
  17.  
  18. # Use Chef Solo to provision our virtual machine
  19. config.vm.provision :chef_solo do |chef|
  20. chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
  21.  
  22. chef.add_recipe "apt"
  23. chef.add_recipe "nodejs"
  24. chef.add_recipe "ruby_build"
  25. chef.add_recipe "rbenv::user"
  26. chef.add_recipe "rbenv::vagrant"
  27. chef.add_recipe "vim"
  28. chef.add_recipe "mysql::server"
  29. chef.add_recipe "mysql::client"
  30.  
  31. # Install Ruby 2.2.1 and Bundler
  32. # Set an empty root password for MySQL to make things simple
  33. chef.json = {
  34. ruby_build: {
  35. upgrade: "sync"
  36. },
  37. rbenv: {
  38. user_installs: [{
  39. user: 'vagrant',
  40. rubies: ["2.2.1", "2.3.1"],
  41. global: "2.3.1",
  42. gems: {
  43. "2.2.1" => [
  44. { name: "bundler" },
  45. ],
  46. "2.3.1" => [
  47. { name: "bundler" },
  48. ]
  49. }
  50. }]
  51. },
  52. run_list: [
  53. "ruby_build",
  54. "rbenv::user"
  55. ],
  56. mysql: {
  57. server_root_password: ''
  58. }
  59. }
  60. end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement