-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile
More file actions
35 lines (29 loc) · 1.05 KB
/
Vagrantfile
File metadata and controls
35 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# Use Berkshelf for managing chef cookbook dependencies.
config.berkshelf.enabled = true
# Detect 32/64 bit OS and use appropriate box
if ['a'].pack('P').length > 4
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
else
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
end
# Setup network forwarding
config.vm.network :forwarded_port, guest: 8080, host: 8080
config.vm.network :forwarded_port, guest: 27017, host: 27017
# Sync the src folder
config.vm.synced_folder "./src", "/home/vagrant/workspace"
# Use chef to provision mongo and node
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe("git")
chef.add_recipe("nodejs::install_from_binary")
chef.add_recipe("mongodb::10gen_repo")
chef.add_recipe("mongodb")
end
# Run the additional setup steps
#config.vm.provision :shell, :path => "setup.sh"
end