Created
November 20, 2014 13:30
-
-
Save suzuki/5c9d9acfd4b5512fa831 to your computer and use it in GitHub Desktop.
ELasticsearch recipe
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
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