From a4e05a60de5303dbbb14321d233b95722396095f Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 8 Feb 2018 09:36:53 -0500 Subject: [PATCH] ES salt module - added pillar items for ES --- pillar/masters/example.sls | 7 ++++--- salt/elastic/init.sls | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pillar/masters/example.sls b/pillar/masters/example.sls index bf4f61876..b4895bf05 100644 --- a/pillar/masters/example.sls +++ b/pillar/masters/example.sls @@ -1,4 +1,5 @@ -# Example Pillar file for a sensor +# Example Pillar file for a master master: - interface: CHANGEME - lbprocs: CHANGEME + esaccessip: CHANGEME + esheap: CHANGEME + esclustername: CHANGEME diff --git a/salt/elastic/init.sls b/salt/elastic/init.sls index 5a41b0e0e..ec4e09d1a 100644 --- a/salt/elastic/init.sls +++ b/salt/elastic/init.sls @@ -3,11 +3,11 @@ so-elasticsearch: dockerng.running: - image: pillaritem/so-logstash - hostname: elasticsearch - - user: + - user: elasticsearch - environment: - bootstrap.memory_lock=true - - cluster.name={{ grains.host }} - - ES_JAVA_OPTS="-Xms$ELASTICSEARCH_HEAP -Xmx$ELASTICSEARCH_HEAP" + - cluster.name={{ esclustername }} + - ES_JAVA_OPTS="-Xms{{ esheap }} -Xmx{{ esheap }}" - http.host=0.0.0.0 - transport.host=127.0.0.1 - ulimits: @@ -15,8 +15,8 @@ so-elasticsearch: - nofile=65536:65536 - nproc=4096 - port_bindings: - - 9200 - - 9300 + - {{ esaccessip }}:9200:9200 + - {{ esaccessip }}:9300:9300 - binds: - /opt/so/conf/logstash/log4j2.properties:/usr/share/logstash/config/log4j2.properties:ro - /opt/so/conf/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro