Created
October 11, 2012 08:47
-
-
Save ksauzz/3871061 to your computer and use it in GitHub Desktop.
Vagrantfile with chef for the latest riak recipe (riak 1.2).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# | |
# Vagrantfile with chef for the latest recipe (riak 1.2). | |
# ======================================================= | |
# | |
# see: http://basho.com/blog/technical/2011/02/04/creating-a-local-riak-cluster-with-vagrant-and-chef/ | |
# use c3d59bca22bb8b619eb914518d5a868c37f876df. https://github.com/basho/riak-chef-cookbook | |
# | |
# Setup latest riak cookbook | |
# -------------------------- | |
# cd | |
# git clone git://github.com/opscode/chef-repo.git | |
# cd chef-repo | |
# rm -rf cookbooks | |
# git clone git://github.com/opscode/cookbooks.git | |
# cd cookbooks | |
# git clone https://github.com/basho/riak-chef-cookbook riak | |
# knife cookbook upload riak | |
# | |
# Tested: | |
# vagrant 1.0.5 | |
# Chef: 10.14.4 | |
Vagrant::Config.run do |config| | |
# Use http://files.vagrantup.com/lucid64.box | |
config.vm.box = "lucid64" | |
# Let's give the box an IP that is accessible by the other nodes we | |
# will spin up. | |
config.vm.network :hostonly, "33.33.33.11" | |
# Forward the Riak HTTP and Protobufs ports so we can access them | |
# locally. | |
config.vm.forward_port(8098, 8091) | |
config.vm.forward_port(8087, 8081) | |
# The default box has a really tiny memory size, which might prevent | |
# Riak from starting. Let's give it 1GB to start. If you have less | |
# RAM, give it 512MB. | |
config.vm.customize do |vm| | |
vm.memory_size = 1024 | |
end | |
# We're using Opscode Platform, so the provisioning method is chef_server. | |
config.vm.provision :chef_solo do |chef| | |
# Using /etc/chef will allow you to run chef-client without | |
# specifying the path to the config. | |
chef.provisioning_path = "/etc/chef" | |
chef.cookbooks_path = "../cookbooks" | |
chef.add_recipe("riak") | |
# We need to set the Riak node name to use the host-only IP | |
# address we set above. | |
chef.json.merge!(:riak => {:args => {:"-name" => "[email protected]"}}) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# | |
# Vagrantfile with chef for the latest recipe (riak 1.2). | |
# ======================================================= | |
# | |
# see: http://basho.com/blog/technical/2011/02/04/creating-a-local-riak-cluster-with-vagrant-and-chef/ | |
# use c3d59bca22bb8b619eb914518d5a868c37f876df. https://github.com/basho/riak-chef-cookbook | |
# | |
# Setup latest riak cookbook | |
# -------------------------- | |
# cd | |
# git clone git://github.com/opscode/chef-repo.git | |
# cd chef-repo | |
# rm -rf cookbooks | |
# git clone git://github.com/opscode/cookbooks.git | |
# cd cookbooks | |
# git clone https://github.com/basho/riak-chef-cookbook riak | |
# knife cookbook upload riak | |
# | |
# Tested: | |
# vagrant 1.0.5 | |
# Chef: 10.14.4 | |
Vagrant::Config.run do |config| | |
# Use http://files.vagrantup.com/lucid64.box | |
config.vm.box = "lucid64" | |
# Let's give the box an IP that is accessible by the other nodes we | |
# will spin up. | |
config.vm.network :hostonly, "33.33.33.11" | |
# Forward the Riak HTTP and Protobufs ports so we can access them | |
# locally. | |
config.vm.forward_port(8098, 8091) | |
config.vm.forward_port(8087, 8081) | |
# The default box has a really tiny memory size, which might prevent | |
# Riak from starting. Let's give it 1GB to start. If you have less | |
# RAM, give it 512MB. | |
config.vm.customize do |vm| | |
vm.memory_size = 1024 | |
end | |
# We're using Opscode Platform, so the provisioning method is chef_server. | |
config.vm.provision :chef_client do |chef| | |
# Substitute "ORGNAME" at the end of the URL with your organization. | |
chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" | |
# This is the validation key you should be able to download from | |
# the Opscode Platform. Again, substitute "ORGNAME" with your | |
# organization name. | |
chef.validation_key_path = "/Users/xxxxxx/chef-repo/.chef/ORGNAME-validator.pem" | |
# Again, substitute "ORGNAME" with your organization name. | |
chef.validation_client_name = "ORGNAME-validator" | |
# Using /etc/chef will allow you to run chef-client without | |
# specifying the path to the config. | |
chef.provisioning_path = "/etc/chef" | |
# Let's set the node name for Chef so we can keep our local nodes | |
# separate from one another. | |
chef.node_name = "riak-fast-track-1" | |
# Here's where we set the role that we created earlier so the node | |
# will automatically install and start Riak. | |
chef.add_role "riak-vagrant" | |
# We need to set the Riak node name to use the host-only IP | |
# address we set above. | |
chef.json.merge!(:riak => {:args => {:"-name" => "[email protected]"}}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment