Skip to content

Instantly share code, notes, and snippets.

@suzuki

suzuki/Vagrantfile

Created Nov 20, 2014
Embed
What would you like to do?
Vagrantfile for Elasticsearch
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
You can’t perform that action at this time.