Commit f8e1f072631cd022c96fb1b7516d78c7af455286
Committed by
Macartur Sousa
1 parent
98a2275a
Exists in
elasticsearch_sort
Rakefile to download and install elasticsearch
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,17 @@ |
1 | +#!/usr/bin/env rake | |
2 | + | |
3 | +require 'open-uri' | |
4 | + | |
5 | +desc "download elasticsearch" | |
6 | +task :download do | |
7 | + unless File.exists? '/tmp/elasticsearch.deb' | |
8 | + puts "downloading elasticsearch Debian package..." | |
9 | + download = open('https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.deb') | |
10 | + IO.copy_stream(download, '/tmp/elasticsearch.deb') | |
11 | + end | |
12 | +end | |
13 | + | |
14 | +desc "install elasticsearch" | |
15 | +task :install => :download do | |
16 | + sh 'sudo dpkg -i /tmp/elasticsearch.deb || sudo apt-get install -f' | |
17 | +end | ... | ... |