diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index 7533980d..358910d2 100755 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer "itzg" RUN apk -U add bash -ENV ES_VERSION=5.4.2 +ENV ES_VERSION=5.4.3 ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ES_VERSION.tar.gz /tmp/es.tgz RUN cd /usr/share && \ diff --git a/elasticsearch/README.md b/elasticsearch/README.md index 31c0c3b3..e6710371 100755 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -181,8 +181,9 @@ To simplify all that, this image provides a `TYPE` variable to let you amongst t * `MASTER` : master-eligible, but holds no data. It is good to have three or more of these in a large cluster * `DATA` (or `NON_MASTER`) : holds data and serves search/index requests. Scale these out for elastic-y goodness. +* `NON_DATA` : performs all duties except holding data * `GATEWAY` (or `COORDINATING`) : only operates as a client node or a "smart router". These are the ones whose HTTP port 9200 will need to be exposed -* `INGEST` : operates only as an ingest node and is not master or data eligble +* `INGEST` : operates only as an ingest node and is not master or data eligible A [Docker Compose](https://docs.docker.com/compose/overview/) file will serve as a good example of these three node types: diff --git a/elasticsearch/docker-compose-3x1GB.yml b/elasticsearch/docker-compose-3x1GB.yml new file mode 100644 index 00000000..38cbedae --- /dev/null +++ b/elasticsearch/docker-compose-3x1GB.yml @@ -0,0 +1,34 @@ +# This composition is known to work on a Swarm cluster consisting of +# 3 VM nodes with 1GB allocated to each. +version: '3' + +services: + master: + image: itzg/elasticsearch + environment: + UNICAST_HOSTS: master + MIN_MASTERS: 1 + ES_JAVA_OPTS: -Xms756m -Xmx756m + ports: + - "9200:9200" + - "9300:9300" + deploy: + replicas: 1 + update_config: + parallelism: 1 + data: + image: itzg/elasticsearch + deploy: + mode: global + update_config: + parallelism: 1 + environment: + TYPE: DATA + UNICAST_HOSTS: master + ES_JAVA_OPTS: -Xms512m -Xmx512m + kibana: + image: kibana + ports: + - "5601:5601" + environment: + ELASTICSEARCH_URL: http://master:9200 diff --git a/elasticsearch/start b/elasticsearch/start index 94a98efe..55131b56 100755 --- a/elasticsearch/start +++ b/elasticsearch/start @@ -99,10 +99,18 @@ setup_personality() { OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=true" ;; - DATA|NON_MASTER) + DATA) OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=false" ;; + NON_MASTER) + OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=true" + ;; + + NON_DATA) + OPTS="$OPTS -E node.master=true -E node.data=false -E node.ingest=true" + ;; + *) echo "Unknown node type. Please use MASTER|GATEWAY|DATA|NON_MASTER" exit 1