Skip to content

Instantly share code, notes, and snippets.

@wondermike-zz
Created February 26, 2016 06:10
Show Gist options
  • Save wondermike-zz/4923971d6b7af2e034c0 to your computer and use it in GitHub Desktop.
Save wondermike-zz/4923971d6b7af2e034c0 to your computer and use it in GitHub Desktop.
# mv the folder to the cluster
cluster.connection.nodes.each {|n| n.scp('/tmp/mph/csp-2.0.80-plugin-notajar') }
# remove old plugin
Provision::ThreadPool.new(cluster.connection.nodes) do |node|
node.ssh %Q{
sudo plugin -r csp
}
end
# NOTE update this plugin line but use sudo
Provision::ThreadPool.new(cluster.connection.nodes) do |node|
node.ssh %Q{
sudo plugin -i csp -u file:///tmp/csp-2.0.80-plugin-notajar
}
end
Provision::Core::ElasticsearchRequest.post(cluster, '_flush')
cluster.connection.nodes.each do |node|
Provision::Core::ShardAllocationHalter.new(cluster) do
node.ssh('sudo service elasticsearch restart')
Provision::Core::ShardRecoveryVerifier.new(cluster).verify
end
Provision::Core::ShardRecoveryVerifier.new(cluster).verify
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment