Add support for Elasticsearch 5.x

* Use log4j2.properties instead of logging.yml
* Add jvm.options
* Use bootstrap.memory_lock instead of bootstrap.mlockall
* Get rid of work directory
* Executable does not accept `-D` anymore, replace with `-E` and `-p`
* Get rid of 5.x default (file)s
This commit is contained in:
Maarten Bezemer 2016-11-03 15:24:17 +01:00
parent 56837b0627
commit 523270405e
9 changed files with 218 additions and 5 deletions

View file

@ -104,7 +104,11 @@ fi
# Define other required variables
PID_FILE="$PID_DIR/$NAME.pid"
DAEMON={{es_home}}/bin/elasticsearch
{% if es_version | version_compare('2.0', '<=') %}
DAEMON_OPTS="-d -p $PID_FILE --default.path.home=$ES_HOME --default.path.logs=$LOG_DIR --default.path.data=$DATA_DIR --default.path.conf=$CONF_DIR"
{% else %}
DAEMON_OPTS="-d -p $PID_FILE -Edefault.path.home=$ES_HOME -Edefault.path.logs=$LOG_DIR -Edefault.path.data=$DATA_DIR -Edefault.path.conf=$CONF_DIR"
{% endif %}
export ES_HEAP_SIZE
export ES_HEAP_NEWSIZE