diff --git a/plugins/elasticsearch/Gemfile b/plugins/elasticsearch/Gemfile index 8e147aa..6b6aa79 100644 --- a/plugins/elasticsearch/Gemfile +++ b/plugins/elasticsearch/Gemfile @@ -1,2 +1,4 @@ +source 'https://rubygems.org' + gem 'elasticsearch-model' -gem 'elasticsearch-rails' +gem 'elasticsearch-rails' diff --git a/plugins/elasticsearch/README.md b/plugins/elasticsearch/README.md index 245a38f..24cb9d5 100644 --- a/plugins/elasticsearch/README.md +++ b/plugins/elasticsearch/README.md @@ -10,20 +10,27 @@ Download: https://www.elastic.co/downloads/past-releases/elasticsearch-1-7-5 INSTALL ======= -Install dependencies +Install elasticsearch and openjdk-7-jdk. -Install elasticsearch package and start service. -By default, the service runs on port 9200 + $ cd plugins/elasticsearch + $ rake install -Install gems listed in plugin Gemfile. If this step fail, just copy the gems to core Gemfile -and run the command 'bundle install' +After install start the service, by default, the service runs on port 9200. + +Install gems listed in plugin Gemfile. + + $ cd plugins/elasticsearch + $ bundle install + +If this step fail, just copy the gems to core Gemfile and run the command +'bundle install'. Enable plugin ------------- Execute the command to enable Elasticsearch Plugin at your noosfero: -./script/noosfero-plugins enable elasticsearch + $ ./script/noosfero-plugins enable elasticsearch Active plugin ------------- diff --git a/plugins/elasticsearch/Rakefile b/plugins/elasticsearch/Rakefile new file mode 100644 index 0000000..b904a66 --- /dev/null +++ b/plugins/elasticsearch/Rakefile @@ -0,0 +1,18 @@ +#!/usr/bin/env rake + +require 'open-uri' + +desc "download elasticsearch" +task :download do + unless File.exists? '/tmp/elasticsearch.deb' + puts "downloading elasticsearch Debian package..." + download = open('https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.5.deb') + IO.copy_stream(download, '/tmp/elasticsearch.deb') + end +end + +desc "install elasticsearch" +task :install => :download do + sh 'sudo apt-get install openjdk-7-jdk' + sh 'sudo dpkg -i /tmp/elasticsearch.deb || sudo apt-get install -f' +end -- libgit2 0.21.2