Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions layer-custom/metadata.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name "layer-custom"
description "ElasticSearch Custom scripts from http://blogs.aws.amazon.com/application-management/post/Tx3MEVKS0A4G7R5/Deploying-Elasticsearch-with-OpsWorks"
maintainer "amazonwebservices"
license "Apache 2.0"
version "1.0.0"
10 changes: 10 additions & 0 deletions layer-custom/recipes/esplugins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@
not_if { File.exist?("#{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/plugins/head") }
end

script "install_plugin_es_hq" do
interpreter "bash"
user "root"
cwd "#{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/bin/"
code <<-EOH
plugin -install royrusso/elasticsearch-HQ
EOH
not_if { File.exist?("#{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/plugins/HQ") }
end

#notifies :restart, 'service[elasticsearch]' unless node.elasticsearch[:skip_restart]