Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

update to es-1.1.1 #6

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
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
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
OpenShift ElasticSearch Cartridge
=================================
Downloadable ElasticSearch cartridge for OpenShift.

To create your scalable ElasticSearch app, run:

rhc app create <your app name> http://cartreflect-claytondev.rhcloud.com/github/ncdc/openshift-elasticsearch-cartridge -s

**NOTE:** your app currently must be a scalable app or this cartridge will not run.


Adding additional cluster nodes
===============================
To add more nodes to the cluster, simply add more gears:

rhc cartridge scale -a <your app name> elasticsearch <number of total gears you want>


Plugins
=======
To install ElasticSearch plugins, edit the `plugins.txt` file, commit, and push your changes.


License
=======
This project is licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
OpenShift ElasticSearch Cartridge
=================================
Downloadable ElasticSearch cartridge for OpenShift.
To create your scalable ElasticSearch app, run:
rhc app create <your app name> http://cartreflect-claytondev.rhcloud.com/github/ncdc/openshift-elasticsearch-cartridge -s
**NOTE:** your app currently must be a scalable app or this cartridge will not run.
Adding additional cluster nodes
===============================
To add more nodes to the cluster, simply add more gears:
rhc cartridge scale -a <your app name> elasticsearch <number of total gears you want>
Plugins
=======
To install ElasticSearch plugins, edit the `plugins.txt` file, commit, and push your changes.
License
=======
This project is licensed under the [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).
2 changes: 1 addition & 1 deletion bin/control
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function start() {

export PUBLISH_HOST=$(python -c "import socket; print socket.gethostbyname('$OPENSHIFT_GEAR_DNS')")

$OPENSHIFT_ELASTICSEARCH_DIR/usr/bin/elasticsearch -p $PID_FILE
$OPENSHIFT_ELASTICSEARCH_DIR/usr/bin/elasticsearch -d -p $PID_FILE
}

function stop() {
Expand Down
2 changes: 1 addition & 1 deletion env/ELASTICSEARCH_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.90.11
1.1.1
4 changes: 2 additions & 2 deletions metadata/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: elasticsearch
Cartridge-Short-Name: ELASTICSEARCH
Display-Name: ElasticSearch 0.90.11
Display-Name: ElasticSearch 1.1.1
Description: "ElasticSearch"
Version: 1.0.0
License: Apache
Expand All @@ -14,7 +14,7 @@ Categories:

Provides:
- elasticsearch
- elasticsearch-0.90.11
- elasticsearch-1.1.1

Publishes:
publish-unicast-host:
Expand Down
64 changes: 45 additions & 19 deletions usr/bin/elasticsearch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# OPTIONS:
# -f: start in the foreground
# -d: daemonize, start in the background
# -p <filename>: log the pid to a file (useful to kill it later)

# CONTROLLING STARTUP:
Expand Down Expand Up @@ -46,6 +46,20 @@
# Be aware that you will be entirely responsible for populating the needed
# environment variables.


# Maven will replace the project.name with elasticsearch below. If that
# hasn't been done, we assume that this is not a packaged version and the
# user has forgotten to run Maven to create a package.
IS_PACKAGED_VERSION='elasticsearch'
if [ "$IS_PACKAGED_VERSION" != "elasticsearch" ]; then
cat >&2 << EOF
Error: You must build the project with Maven or download a pre-built package
before you can run Elasticsearch. See 'Building from Source' in README.textile
or visit http://www.elasticsearch.org/download to get a pre-built package.
EOF
exit 1
fi

CDPATH=""
SCRIPT="$0"

Expand Down Expand Up @@ -89,7 +103,7 @@ fi
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA=$(which java)
JAVA=`which java`
fi

if [ ! -x "$JAVA" ]; then
Expand All @@ -113,7 +127,7 @@ esac
launch_service()
{
pidpath=$1
foreground=$2
daemonized=$2
props=$3
es_parms="-Delasticsearch"

Expand All @@ -123,27 +137,39 @@ launch_service()
es_parms="$es_parms -Des.pidfile=$pidpath"
fi

if [ "${ELASTICSEARCH_VERSION%%.*}" == '1' ]; then
class_name=org.elasticsearch.bootstrap.Elasticsearch
else
class_name=org.elasticsearch.bootstrap.ElasticSearch
fi

# The es-foreground option will tell ElasticSearch not to close stdout/stderr, but it's up to us not to background.
if [ "x$foreground" != "x" ]; then
# The es-foreground option will tell Elasticsearch not to close stdout/stderr, but it's up to us not to daemonize.
if [ "x$daemonized" = "x" ]; then
es_parms="$es_parms -Des.foreground=yes"
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props $class_name
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
org.elasticsearch.bootstrap.Elasticsearch
# exec without running it in the background, makes it replace this shell, we'll never get here...
# no need to return something
else
# Startup ElasticSearch, background it, and write the pid.
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props $class_name <&- &
# Startup Elasticsearch, background it, and write the pid.
exec "$JAVA" $JAVA_OPTS $ES_JAVA_OPTS $es_parms -Des.path.home="$ES_HOME" -cp "$ES_CLASSPATH" $props \
org.elasticsearch.bootstrap.Elasticsearch <&- &
return $?
fi
}

# Parse any long getopt options and put them into properties before calling getopt below
# Be dash compatible to make sure running under ubuntu works
ARGV=""
while [ $# -gt 0 ]
do
case $1 in
--*=*) properties="$properties -Des.${1#--}"
shift 1
;;
--*) properties="$properties -Des.${1#--}=$2"
shift 2
;;
*) ARGV="$ARGV $1" ; shift
esac
done

# Parse any command line options.
args=`getopt vfhp:D:X: "$@"`
args=`getopt vdhp:D:X: $ARGV`
eval set -- "$args"

while true; do
Expand All @@ -157,12 +183,12 @@ while true; do
pidfile="$2"
shift 2
;;
-f)
foreground="yes"
-d)
daemonized="yes"
shift
;;
-h)
echo "Usage: $0 [-f] [-h] [-p pidfile]"
echo "Usage: $0 [-d] [-h] [-p pidfile]"
exit 0
;;
-D)
Expand All @@ -185,6 +211,6 @@ while true; do
done

# Start up the service
launch_service "$pidfile" "$foreground" "$properties"
launch_service "$pidfile" "$daemonized" "$properties"

exit $?
2 changes: 1 addition & 1 deletion usr/bin/elasticsearch.in.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

ES_CLASSPATH=$ES_CLASSPATH:$ES_HOME/lib/elasticsearch-*.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*
ES_CLASSPATH=$ES_CLASSPATH:$ES_HOME/lib/elasticsearch-1.1.1.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*

if [ "x$ES_MIN_MEM" = "x" ]; then
ES_MIN_MEM=256m
Expand Down
1 change: 0 additions & 1 deletion usr/bin/plugin
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ while [ $# -gt 0 ]; do
done

exec $JAVA $JAVA_OPTS -Xmx64m -Xms16m -Delasticsearch -Des.path.home="$ES_HOME" $properties -cp "$ES_HOME/lib/*" org.elasticsearch.plugins.PluginManager $args

Binary file not shown.
Binary file removed usr/lib/jts-1.12.jar
Binary file not shown.
Binary file added usr/lib/jts-1.13.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed usr/lib/lucene-memory-4.6.1.jar
Binary file not shown.
Binary file added usr/lib/lucene-memory-4.7.2.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed usr/lib/lucene-suggest-4.6.1.jar
Binary file not shown.
Binary file added usr/lib/lucene-suggest-4.7.2.jar
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-amd64-freebsd-6.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-amd64-solaris.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-sparc-solaris.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-sparc64-solaris.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-universal-macosx.dylib
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-universal64-macosx.dylib
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-x86-freebsd-5.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-x86-freebsd-6.so
Binary file not shown.
Binary file added usr/lib/sigar/libsigar-x86-solaris.so
Binary file not shown.
Binary file added usr/lib/sigar/sigar-amd64-winnt.dll
Binary file not shown.
Binary file added usr/lib/sigar/sigar-x86-winnt.dll
Binary file not shown.
Binary file added usr/lib/sigar/sigar-x86-winnt.lib
Binary file not shown.
Binary file removed usr/lib/spatial4j-0.3.jar
Binary file not shown.
Binary file added usr/lib/spatial4j-0.4.1.jar
Binary file not shown.