Created
February 20, 2014 21:37
-
-
Save eknuth/9123743 to your computer and use it in GitHub Desktop.
installing elasticsearch with chef
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
# chef stuff to install elastic search | |
# based on https://www.digitalocean.com/community/articles/how-to-install-elasticsearch-on-an-ubuntu-vps | |
# install oracle java (with help from http://jamie.mccrindle.org/2013/07/installing-oracle-java-7-using-chef.html) | |
execute "add oracle java repo" do | |
command '/usr/bin/add-apt-repository -y ppa:webupd8team/java && /usr/bin/apt-get update' | |
not_if "test -x /etc/apt/sources.list.d/webupd8team-java-precise.list" | |
end | |
execute "accept-license" do | |
command "echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections" | |
end | |
package "oracle-java7-installer" | |
package "oracle-java7-set-default" | |
# install elasticsearch from deb | |
remote_file "/tmp/elasticsearch-0.90.7.deb" do | |
source "https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.deb" | |
mode 0644 | |
checksum "a3ec3c05ffabf8048642aa431b675f3c132b4fae755e1b7aee0cb9fe3f2a37ba" # PUT THE SHA256 CHECKSUM HERE | |
end | |
dpkg_package "elastic search" do | |
source "/tmp/elasticsearch-0.90.7.deb" | |
action :install | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment