Skip to content

Instantly share code, notes, and snippets.

@suzuki
Created November 20, 2014 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuki/5c9d9acfd4b5512fa831 to your computer and use it in GitHub Desktop.
Save suzuki/5c9d9acfd4b5512fa831 to your computer and use it in GitHub Desktop.
ELasticsearch recipe
apt_repository 'elasticsearch-stable' do
uri 'http://packages.elasticsearch.org/elasticsearch/1.4/debian'
distribution 'stable'
components ['main']
key 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch'
not_if do
File.exists?('/etc/apt/source.list/d/elasticsearch.list')
end
end
%w{openjdk-7-jdk elasticsearch}.each do |pkg|
package pkg do
action :install
end
end
template '/etc/elasticsearch/elasticsearch.yml' do
owner 'root'
group 'root'
mode 0644
notifies :reload, 'service[elasticsearch]'
end
service 'elasticsearch' do
action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment