forked from huboard/huboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
109 lines (90 loc) · 2.79 KB
/
Vagrantfile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
MEMORY=2048
CORES=2
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.omnibus.chef_version = :latest
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe 'apt'
chef.add_recipe 'git'
chef.add_recipe "build-essential"
end
config.vm.define "theworks", :primary => true do |web|
web.vm.network "private_network", ip: "192.168.50.4"
web.vm.network :forwarded_port, guest: 9292, host: 9292
web.vm.synced_folder ".", "/vagrant", type: "nfs"
web.vm.provider :virtualbox do |v|
# Use VBoxManage to customize the VM. For example to change memory:
v.customize ["modifyvm", :id, "--memory", MEMORY.to_i]
v.customize ["modifyvm", :id, "--cpus", CORES.to_i]
if CORES.to_i > 1
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
web.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "ruby_build"
chef.add_recipe "rbenv::system"
chef.add_recipe "rbenv::vagrant"
chef.add_recipe "couchdb::source"
chef.add_recipe "memcached"
chef.add_recipe "nodejs"
chef.json = {
"rbenv" => {
"rubies" => [ "2.0.0-p353" ],
"global" => "2.0.0-p353",
"gems" => {
"2.0.0-p353" => [
{ "name" => "bundler" }
]
}
}
}
end
web.vm.provision "shell" do |s|
s.path = "provisioning/couchdb.sh"
s.privileged = false
end
web.vm.provision "shell" do |s|
s.path = "provisioning/huboard.sh"
s.privileged = false
end
end
config.vm.define "couch" do |couch|
couch.vm.box = "precise32"
couch.vm.network :forwarded_port, guest: 5984, host: 5984
couch.vm.network :forwarded_port, guest: 6379, host: 6379
couch.vm.network :forwarded_port, guest: 11211, host: 11212
couch.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "couchdb::source"
chef.add_recipe "nodejs"
chef.add_recipe "memcached"
chef.add_recipe "redisio::install"
chef.add_recipe "redisio::enable"
chef.json = {
"couch_db" => {
"config" => {
"httpd" => {
"bind_address" => "0.0.0.0"
}
}
},
"redisio" => {
"default_settings" => {
"address" => "0.0.0.0"
}
}
}
end
couch.vm.provision "shell" do |s|
s.path = "provisioning/couchdb.sh"
s.privileged = false
end
end
end