[es] Adding node type and min master variables

For #24
This commit is contained in:
Geoff Bourne
2016-07-10 16:32:55 -05:00
parent b9dcdee34b
commit 281c044999
2 changed files with 84 additions and 0 deletions
+24
View File
@@ -45,6 +45,30 @@ if [ -n "$PUBLISH_AS" ]; then
OPTS="$OPTS -Des.transport.publish_port=$(echo $PUBLISH_AS | awk -F: '{if ($2) print $2; else print 9300}')"
fi
if [ -n "$TYPE" ]; then
case $TYPE in
MASTER)
OPTS="$OPTS --node.master=true --node.data=false"
;;
GATEWAY)
OPTS="$OPTS --node.master=false --node.data=false"
;;
DATA|NON_MASTER)
OPTS="$OPTS --node.master=false --node.data=true"
;;
*)
echo "Unknown node type. Please use MASTER|GATEWAY|DATA|NON_MASTER"
exit 1
esac
fi
if [ -n "$MIN_MASTERS" ]; then
OPTS="$OPTS --discovery.zen.minimum_master_nodes=$MIN_MASTERS"
fi
OPTS="$OPTS --path.plugins=/conf/plugins"
if [ -n "$PLUGINS" ]; then