From: Simon Pasquier Date: Thu, 24 Nov 2016 16:09:12 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/master' into stacklight X-Git-Tag: 2016.12~5^2~1^2 X-Git-Url: https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas%2Felasticsearch.git;a=commitdiff_plain;h=c69012544408e0e43c1e26db22bcc5cfe168d5a1;hp=-c Merge remote-tracking branch 'upstream/master' into stacklight --- c69012544408e0e43c1e26db22bcc5cfe168d5a1 diff --combined README.rst index cc8cfdb,8c49531..08bd72a --- a/README.rst +++ b/README.rst @@@ -24,6 -24,17 +24,17 @@@ Single-node elasticsearch with clusteri shards: 1 replicas: 0 + Setup shared repository for snapshots: + + .. code-block:: bash + + elasticsearch: + server: + snapshot: + reponame: + path: /var/lib/glusterfs/repo + compress: true + Cluster with manually defined members: .. code-block:: yaml @@@ -119,36 -130,6 +130,36 @@@ Common definition for curator unit: days unit_count: 2 +Client setup +------------ + +Client with host and port: + +.. code-block:: yaml + + elasticsearch: + client: + enabled: true + server: + host: elasticsearch.host + port: 9200 + +Client where you download an index template that is stored in the direcotry +*files/*: + +.. code-block:: yaml + + elasticsearch: + client: + enabled: true + server: + host: elasticsearch.host + port: 9200 + index: + my_index: + enabled: true + template: elasticsearch/files/my_index_template.json + Read more ========= diff --combined elasticsearch/files/elasticsearch.yml index 4d21261,df2cbc7..a51cf3c --- a/elasticsearch/files/elasticsearch.yml +++ b/elasticsearch/files/elasticsearch.yml @@@ -95,10 -95,6 +95,10 @@@ node.rack: {{ server.rack } # to disable it, set the following: # node.max_local_storage_nodes: 1 +{%- if server.get('threadpool', {}).get('bulk', {}).queue_size is defined %} +# For bulk operations. Thread pool type is fixed with a size of # of available processors. +threadpool.bulk.queue_size: {{ server.threadpool.bulk.queue_size }} +{%- endif %} #################################### Index #################################### @@@ -158,9 -154,6 +158,9 @@@ index.number_of_replicas: {{ server.get # Path to directory where to store index data allocated for this node. # # path.data: /path/to/data +{%- if server.get('path', {}).data is defined %} +path.data = {{ server.path.data }} +{%- endif %} # # Can optionally include more than one location, causing data to be striped across # the locations (a la RAID 0) on a file level, favouring locations with most free @@@ -175,13 -168,17 +175,20 @@@ # Path to log files: # # path.logs: /path/to/logs +{%- if server.get('path', {}).logs is defined %} +path.logs = {{ server.path.logs }} +{%- endif %} # Path to where plugins are installed: # # path.plugins: /path/to/plugins + # + {%- if server.snapshot is defined %} + path.repo: + {%- for repo_name, repo in server.snapshot.iteritems() %} + - {{ repo.path }} + {%- endfor %} + {%- endif %} #################################### Plugin ################################### @@@ -199,9 -196,6 +206,9 @@@ # Set this property to true to lock the memory: # # bootstrap.mlockall: true +{%- if server.mlockall is defined %} +bootstrap.mlockall: {{ server.mlockall|lower }} +{%- endif %} # Make sure that the ES_MIN_MEM and ES_MAX_MEM environment variables are set # to the same value, and that the machine has enough memory to allocate @@@ -218,21 -212,22 +225,21 @@@ # communication. (the range means that if the port is busy, it will automatically # try the next port). -# Set the bind address specifically (IPv4 or IPv6): -# -# -network.bind_host: {{ server.bind.address }} -http.port: {{ server.bind.port }} -http.enabled: true -# Set the address other nodes will use to communicate with this node. If not -# set, it is automatically derived. It must point to an actual IP address. +# Set both 'bind_host' and 'publish_host': # +# network.host: 192.168.0.1 + +{%- if server.get('bind', {}).address is defined %} +network.host: {{ server.bind.address }} +{%- endif %} + +# Set specifically the address other nodes will use to communicate with this +# node. If not set, it is automatically derived. It must point to an actual +# IP address. {%- if server.publish_host is defined %} network.publish_host: {{ server.publish_host }} {%- endif %} -# Set both 'bind_host' and 'publish_host': -# -# network.host: 192.168.0.1 # Set a custom port for the node to node communication (9300 by default): # @@@ -245,28 -240,14 +252,28 @@@ # Set a custom port to listen for HTTP traffic: # # http.port: 9200 +{%- if server.get('bind', {}).port is defined %} +http.port: {{ server.bind.port }} +{%- endif %} # Set a custom allowed content length: # # http.max_content_length: 100mb +# Enable or disable cross-origin resource sharing +{%- if server.get('cors', {}).enabled is defined %} +http.cors.enabled: {{ server.cors.enabled|lower }} +{%- endif %} + +# Which origins to allow. +{%- if server.get('cors', {}).allow_origin is defined %} +http.cors.allow-origin: {{ server.cors.allow_origin }} +{%- endif %} + # Disable HTTP completely: # # http.enabled: false +http.enabled: true ################################### Gateway ################################### @@@ -290,26 -271,17 +297,26 @@@ # Allow recovery process after N nodes in a cluster are up: # # gateway.recover_after_nodes: 1 +{%- if server.get('gateway', {}).recover_after_nodes is defined %} +gateway.recover_after_nodes: {{ server.gateway.recover_after_nodes }} +{%- endif %} # Set the timeout to initiate the recovery process, once the N nodes # from previous setting are up (accepts time value): # # gateway.recover_after_time: 5m +{%- if server.get('gateway', {}).recover_after_time is defined %} +gateway.recover_after_time: {{ server.gateway.recover_after_time }} +{%- endif %} # Set how many nodes are expected in this cluster. Once these N nodes # are up (and recover_after_nodes is met), begin recovery process immediately # (without waiting for recover_after_time to expire): # # gateway.expected_nodes: 2 +{%- if server.get('gateway', {}).expected_nodes is defined %} +gateway.expected_nodes: {{ server.gateway.expected_nodes }} +{%- endif %} ############################# Recovery Throttling #############################