[MediaWiki-commits] [Gerrit] Configure elasticearch multicast per datacenter - change (operations/puppet)
Asher has submitted this change and it was merged. Change subject: Configure elasticearch multicast per datacenter .. Configure elasticearch multicast per datacenter In production each datacenter will get its own elasticsearch multicast group and its own cluster name. There should be no chance of a machine from one datacenter joining a cluster in another one accidentally. Change-Id: I0e418088d587d87e2f61d553caec457539553a6e --- M manifests/role/elasticsearch.pp M modules/elasticsearch/manifests/init.pp M modules/elasticsearch/templates/elasticsearch.yml.erb 3 files changed, 12 insertions(+), 3 deletions(-) Approvals: Demon: Looks good to me, but someone else must approve Asher: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp index e349a3f..1fdf186 100644 --- a/manifests/role/elasticsearch.pp +++ b/manifests/role/elasticsearch.pp @@ -4,9 +4,14 @@ # production. # class role::elasticsearch::production { +$multicast_group = $::site ? { +'eqiad' => '224.2.2.5', +'pmtpa' => '224.2.2.6', +} class { '::elasticsearch': -cluster_name => 'production-search', -heap_memory => '7G', +cluster_name=> "production-search-${::site}", +heap_memory => '7G', +multicast_group => $multicast_group } } diff --git a/modules/elasticsearch/manifests/init.pp b/modules/elasticsearch/manifests/init.pp index e3f5c71..dcf9794 100644 --- a/modules/elasticsearch/manifests/init.pp +++ b/modules/elasticsearch/manifests/init.pp @@ -7,6 +7,8 @@ # - $heap_memory: amount of memory to allocate to elasticsearch. Defaults to # "2G". Should be set to about half of ram or a 30G, whichever is # smaller. +# - $multicast_group: multicast group to use for peer discovery. Defaults to +# elasticsearch's default: '224.2.2.4'. # # == Sample usage: # @@ -14,7 +16,8 @@ # cluster_name = 'labs-search' # } # -class elasticsearch($cluster_name, $heap_memory = '2G') { +class elasticsearch($cluster_name, $heap_memory = '2G', +$multicast_group = '224.2.2.4') { # Install # Get a jdk on which to run elasticsearch java { 'java-default': } diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb b/modules/elasticsearch/templates/elasticsearch.yml.erb index 8b4a53d..ea00687 100644 --- a/modules/elasticsearch/templates/elasticsearch.yml.erb +++ b/modules/elasticsearch/templates/elasticsearch.yml.erb @@ -300,6 +300,7 @@ # for large clusters (>3 nodes): # # discovery.zen.minimum_master_nodes: 1 +discovery.zen.ping.multicast.group: <%= @multicast_group %> # Set the time to wait for ping responses from other nodes when discovering. # Set this option to a higher value on a slow or congested network -- To view, visit https://gerrit.wikimedia.org/r/78966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0e418088d587d87e2f61d553caec457539553a6e Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles Gerrit-Reviewer: Asher Gerrit-Reviewer: Demon Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Configure elasticearch multicast per datacenter - change (operations/puppet)
Manybubbles has uploaded a new change for review. https://gerrit.wikimedia.org/r/78966 Change subject: Configure elasticearch multicast per datacenter .. Configure elasticearch multicast per datacenter In production each datacenter will get its own elasticsearch multicast group and its own cluster name. There should be no chance of a machine from one datacenter joining a cluster in another one accidentally. Change-Id: I0e418088d587d87e2f61d553caec457539553a6e --- M manifests/role/elasticsearch.pp M modules/elasticsearch/manifests/init.pp M modules/elasticsearch/templates/elasticsearch.yml.erb 3 files changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/66/78966/1 diff --git a/manifests/role/elasticsearch.pp b/manifests/role/elasticsearch.pp index e349a3f..1fdf186 100644 --- a/manifests/role/elasticsearch.pp +++ b/manifests/role/elasticsearch.pp @@ -4,9 +4,14 @@ # production. # class role::elasticsearch::production { +$multicast_group = $::site ? { +'eqiad' => '224.2.2.5', +'pmtpa' => '224.2.2.6', +} class { '::elasticsearch': -cluster_name => 'production-search', -heap_memory => '7G', +cluster_name=> "production-search-${::site}", +heap_memory => '7G', +multicast_group => $multicast_group } } diff --git a/modules/elasticsearch/manifests/init.pp b/modules/elasticsearch/manifests/init.pp index e3f5c71..dcf9794 100644 --- a/modules/elasticsearch/manifests/init.pp +++ b/modules/elasticsearch/manifests/init.pp @@ -7,6 +7,8 @@ # - $heap_memory: amount of memory to allocate to elasticsearch. Defaults to # "2G". Should be set to about half of ram or a 30G, whichever is # smaller. +# - $multicast_group: multicast group to use for peer discovery. Defaults to +# elasticsearch's default: '224.2.2.4'. # # == Sample usage: # @@ -14,7 +16,8 @@ # cluster_name = 'labs-search' # } # -class elasticsearch($cluster_name, $heap_memory = '2G') { +class elasticsearch($cluster_name, $heap_memory = '2G', +$multicast_group = '224.2.2.4') { # Install # Get a jdk on which to run elasticsearch java { 'java-default': } diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb b/modules/elasticsearch/templates/elasticsearch.yml.erb index 8b4a53d..cbf6f22 100644 --- a/modules/elasticsearch/templates/elasticsearch.yml.erb +++ b/modules/elasticsearch/templates/elasticsearch.yml.erb @@ -300,6 +300,7 @@ # for large clusters (>3 nodes): # # discovery.zen.minimum_master_nodes: 1 +discovery.zen.ping.multicast.group = <%= @multicast_group %> # Set the time to wait for ping responses from other nodes when discovering. # Set this option to a higher value on a slow or congested network -- To view, visit https://gerrit.wikimedia.org/r/78966 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e418088d587d87e2f61d553caec457539553a6e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Manybubbles ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits