From 55801ac11c7771c638b8895644e22489e1c4ff3d Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 3 Mar 2017 23:35:12 -0600 Subject: [PATCH] [es] Add ingest node support For #131 --- elasticsearch/README.md | 3 ++- elasticsearch/docker-compose.yml | 7 +++++++ elasticsearch/start | 12 ++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/elasticsearch/README.md b/elasticsearch/README.md index b6aad769..01c404db 100755 --- a/elasticsearch/README.md +++ b/elasticsearch/README.md @@ -181,7 +181,8 @@ 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. -* `GATEWAY` : only operates as a client node or a "smart router". These are the ones whose HTTP port 9200 will need to be exposed +* `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 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.yml b/elasticsearch/docker-compose.yml index e847b7eb..09b01ea7 100644 --- a/elasticsearch/docker-compose.yml +++ b/elasticsearch/docker-compose.yml @@ -29,6 +29,13 @@ services: environment: TYPE: GATEWAY UNICAST_HOSTS: master + ingest: + image: itzg/elasticsearch + ports: + - "9222:9200" + environment: + TYPE: INGEST + UNICAST_HOSTS: master kibana: image: kibana ports: diff --git a/elasticsearch/start b/elasticsearch/start index 61e94ccf..7612c084 100755 --- a/elasticsearch/start +++ b/elasticsearch/start @@ -77,15 +77,19 @@ setup_personality() { if [ -n "$TYPE" ]; then case $TYPE in MASTER) - OPTS="$OPTS -E node.master=true -E node.data=false" + OPTS="$OPTS -E node.master=true -E node.data=false -E node.ingest=false" ;; - GATEWAY) - OPTS="$OPTS -E node.master=false -E node.data=false" + GATEWAY|COORDINATING) + OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=false" + ;; + + INGEST) + OPTS="$OPTS -E node.master=false -E node.data=false -E node.ingest=true" ;; DATA|NON_MASTER) - OPTS="$OPTS -E node.master=false -E node.data=true" + OPTS="$OPTS -E node.master=false -E node.data=true -E node.ingest=false" ;; *)