Skip to content

Instantly share code, notes, and snippets.

@dreverri
Created August 4, 2011 21:21
Show Gist options
  • Save dreverri/1126316 to your computer and use it in GitHub Desktop.
Save dreverri/1126316 to your computer and use it in GitHub Desktop.
Vagrant::Config.run do |config|
(1..1).each do |index|
config.vm.define "riak#{index}".to_sym do |cfg|
ip = "33.33.33.1#{index}"
cfg.vm.box_url = "http://files.vagrantup.com/lucid32.box"
cfg.vm.box = "lucid32"
cfg.vm.network(ip)
cfg.vm.forward_port("ssh", 22, "222#{index}".to_i)
cfg.vm.customize do |vm|
vm.name = "riak#{index}"
vm.memory_size = 512
end
cfg.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.json = {
:riak => {
:erlang => {
:node_name => "riak@#{ip}"
},
:core => {
:http => [["#{ip}", 8098]]
}
}
}
chef.add_recipe("riak")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment