forked from ctrabold/chef-redis
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
38 lines (29 loc) · 877 Bytes
/
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
require 'rubygems'
def setup_vm(shard_name, shard, port)
shard.vm.host_name = shard_name
shard.vm.box = "precise32"
shard.vm.box_url = 'http://files.vagrantup.com/precise32.box'
shard.vm.forward_port(6379, port)
shard.vm.provision :chef_solo do |chef|
chef.cookbooks_path = ['cookbooks']
chef.json.merge! :tz => 'America/NewYork'
chef.add_recipe 'redis::source'
chef.json = {
'redis' => {
'source' => {
'version' => '2.6.7',
},
'password' => 'foobared',
'bind' => "0.0.0.0"
}
}
end
end
Vagrant::Config.run do |config|
config.vm.define :shard do |shard|
setup_vm("shardA", shard, 6379)
end
config.vm.define :shard2 do |shard|
setup_vm("shardB", shard, 6380)
end
end