DCausse has uploaded a new change for review.
https://gerrit.wikimedia.org/r/290883
Change subject: Elastic: add support for network.host
......................................................................
Elastic: add support for network.host
Elastic 2.x will now bind localhost by default. We need to override this
default.
Change-Id: I54c03daedf0f55158fea4058b4453d564b870044
---
M hieradata/labs/deployment-prep/common.yaml
M modules/elasticsearch/manifests/init.pp
M modules/elasticsearch/templates/elasticsearch.yml.erb
3 files changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/83/290883/1
diff --git a/hieradata/labs/deployment-prep/common.yaml
b/hieradata/labs/deployment-prep/common.yaml
index baa6a54..5dabb41 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -177,6 +177,9 @@
- deployment-elastic06
- deployment-elastic07
- deployment-elastic08
+"elasticsearch::bind_networks":
+ - _local_
+ - _site_
"elasticsearch::cluster_name": beta-search
"elasticsearch::auto_create_index": '+apifeatureusage-*,-*'
"elasticsearch::graylog_hosts":
diff --git a/modules/elasticsearch/manifests/init.pp
b/modules/elasticsearch/manifests/init.pp
index 95ad5ff..a29fbe8 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -56,6 +56,8 @@
# hosts in the cluster to this list. Elasticsearch will still use
# multicast discovery but this will keep it from getting lost if none of
# its pings reach other servers.
+# - $bind_networks: networks to bind (both transport and http connectors)
+# see
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values
# - $filter_cache_size: size of the filter cache. See
#
www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html
# for possible values. Default is 10% like the Elasticsearch default.
@@ -96,6 +98,7 @@
$rack = undef,
$multicast_enabled = true,
$unicast_hosts = undef,
+ $bind_networks = undef,
$filter_cache_size = '10%',
$bulk_thread_pool_executors = undef,
$bulk_thread_pool_capacity = undef,
diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb
b/modules/elasticsearch/templates/elasticsearch.yml.erb
index 4b79a08..c692bd9 100644
--- a/modules/elasticsearch/templates/elasticsearch.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch.yml.erb
@@ -207,7 +207,7 @@
# Set both 'bind_host' and 'publish_host':
#
-#network.host: 192.168.0.1
+<%= @bind_networks ? "network.host: [ #{Array(@bind_networks).join(',')} ]" :
"#network.host: 192.168.0.1" %>
# Set a custom port for the node to node communication (9300 by default):
#
--
To view, visit https://gerrit.wikimedia.org/r/290883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54c03daedf0f55158fea4058b4453d564b870044
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: DCausse <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits