Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341831 )

Change subject: elasticsearch - use default plugins directory in the 
elasticsearch class
......................................................................


elasticsearch - use default plugins directory in the elasticsearch class

The elasticsearch class was assuming that a specific, non standard plugins
directory was used. This is the case for all our production clusters, but
it does not make sense for simpler installations of elasticsearch.

Change-Id: I1e9068a4afce25df051dac1382216003dedf35f7
---
M modules/elasticsearch/manifests/init.pp
M modules/role/manifests/elasticsearch/common.pp
M modules/role/manifests/logstash/elasticsearch.pp
3 files changed, 8 insertions(+), 4 deletions(-)

Approvals:
  jenkins-bot: Verified
  Gehel: Looks good to me, approved



diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index d71fa69..3d95cab 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -77,7 +77,7 @@
     $cluster_name,
     $heap_memory = '2G',
     $data_dir = '/srv/elasticsearch',
-    $plugins_dir = '/srv/deployment/elasticsearch/plugins',
+    $plugins_dir = '/usr/share/elasticsearch/plugins',
     $plugins_mandatory = undef,
     $minimum_master_nodes = 1,
     $master_eligible = true,
diff --git a/modules/role/manifests/elasticsearch/common.pp 
b/modules/role/manifests/elasticsearch/common.pp
index 2ee0644..e816d08 100644
--- a/modules/role/manifests/elasticsearch/common.pp
+++ b/modules/role/manifests/elasticsearch/common.pp
@@ -54,9 +54,10 @@
     # Elasticsearch 5 doesn't allow setting the plugin path, we need
     # to symlink it into place. The directory already exists as part of the
     # debian package, so we need to force the creation of the symlink.
+    $plugins_dir = '/srv/deployment/elasticsearch/plugins'
     file { '/usr/share/elasticsearch/plugins':
       ensure  => 'link',
-      target  => '/srv/deployment/elasticsearch/plugins',
+      target  => $plugins_dir,
       force   => true,
       require => Package['elasticsearch/plugins'],
     }
@@ -75,6 +76,7 @@
             'extra',
             'analysis-icu',
         ],
+        plugins_dir                => $plugins_dir,
         # Let apifeatureusage create their indices
         auto_create_index          => '+apifeatureusage-*,-*',
         # Production can get a lot of use out of the filter cache.
diff --git a/modules/role/manifests/logstash/elasticsearch.pp 
b/modules/role/manifests/logstash/elasticsearch.pp
index c4365df..26b97a9 100644
--- a/modules/role/manifests/logstash/elasticsearch.pp
+++ b/modules/role/manifests/logstash/elasticsearch.pp
@@ -19,18 +19,20 @@
     # Elasticsearch 5 doesn't allow setting the plugin path, we need
     # to symlink it into place. The directory already exists as part of the
     # debian package, so we need to force the creation of the symlink.
+    $plugins_dir = '/srv/deployment/elasticsearch/plugins'
     file { '/usr/share/elasticsearch/plugins':
       ensure  => 'link',
-      target  => '/srv/deployment/elasticsearch/plugins',
+      target  => $plugins_dir,
       force   => true,
       require => Package['elasticsearch/plugins'],
     }
 
     class { '::elasticsearch':
-      require => [
+      require     => [
           Package['elasticsearch/plugins'],
           File['/usr/share/elasticsearch/plugins'],
       ],
+      plugins_dir => $plugins_dir,
     }
 
     $logstash_nodes = hiera('logstash::cluster_hosts')

-- 
To view, visit https://gerrit.wikimedia.org/r/341831
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e9068a4afce25df051dac1382216003dedf35f7
Gerrit-PatchSet: 6
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tarrow <thomasar...@gmail.com>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Gehel <guillaume.leder...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Tarrow <thomasar...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to