Created
November 20, 2014 13:36
-
-
Save suzuki/ec60192529bd89c297bd to your computer and use it in GitHub Desktop.
Vagrantfile for Elasticsearch
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define :es1 do |es| | |
es.vm.box = "chef/debian-7.4" | |
es.vm.network "private_network", ip: "192.168.33.10" | |
es.vm.provision "chef_solo" do |chef| | |
set_es_chef(chef) | |
chef.json = { | |
elasticsearch: { | |
cluster_name: 'starfighters', | |
node_name: 'Y-wing' | |
} | |
} | |
end | |
end | |
config.vm.define :es2 do |es| | |
es.vm.box = "chef/debian-7.4" | |
es.vm.network "private_network", ip: "192.168.33.11" | |
es.vm.provision "chef_solo" do |chef| | |
set_es_chef(chef) | |
chef.json = { | |
elasticsearch: { | |
cluster_name: 'starfighters', | |
node_name: 'A-wing' | |
} | |
} | |
end | |
end | |
config.omnibus.chef_version = :latest | |
end | |
def set_es_chef(chef) | |
chef.cookbooks_path = ['chef/cookbooks', 'chef/site-cookbooks'] | |
# recipe from chef/cookbook | |
chef.add_recipe 'apt' | |
# recipe from chef/site-cookbooks | |
chef.add_recipe 'zsh' | |
chef.add_recipe 'suzuki' | |
chef.add_recipe 'elasticsearch' | |
chef | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment