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

Change subject: role::zookeeper: refactor to multiple profiles
......................................................................


role::zookeeper: refactor to multiple profiles

The zookeeper_cluster_name variable has been moved
from the top level hieradata/eqiad,codfw yaml files
to each profile that uses it, namely most of the
Analytics infrastructure. To avoid namespace clashing
the Hadoop hiera variable has been renamed, waiting
for a better solution when all the Hadoop code will be
moved to profiles as well. Some old roles have been
deleted in favor of a better reuse of the new profile
classes.

Bug: T114815
Change-Id: If511394ac4a80287dd44f0c89d9f29fcf9477ad1
---
M hieradata/codfw.yaml
D hieradata/common/zookeeper.yaml
M hieradata/eqiad.yaml
D hieradata/hosts/druid1001.yaml
D hieradata/hosts/druid1002.yaml
D hieradata/hosts/druid1003.yaml
M hieradata/labs.yaml
M hieradata/role/codfw/configcluster.yaml
D hieradata/role/codfw/zookeeper/server.yaml
A hieradata/role/common/analytics_cluster/client.yaml
M hieradata/role/common/analytics_cluster/druid/worker.yaml
A hieradata/role/common/analytics_cluster/druid/zookeeper.yaml
A hieradata/role/common/analytics_cluster/hadoop/balancer.yaml
A hieradata/role/common/analytics_cluster/hadoop/client.yaml
M hieradata/role/common/analytics_cluster/hadoop/master.yaml
M hieradata/role/common/analytics_cluster/hadoop/standby.yaml
M hieradata/role/common/analytics_cluster/hadoop/worker.yaml
A hieradata/role/common/analytics_cluster/hive/client.yaml
M hieradata/role/common/analytics_cluster/hue.yaml
A hieradata/role/common/analytics_cluster/oozie/client.yaml
A hieradata/role/common/analytics_cluster/refinery.yaml
M hieradata/role/common/configcluster.yaml
M hieradata/role/eqiad/configcluster.yaml
D hieradata/role/eqiad/zookeeper/server.yaml
M manifests/site.pp
R modules/profile/manifests/zookeeper/server.pp
A modules/role/manifests/analytics_cluster/druid/zookeeper.pp
M modules/role/manifests/analytics_cluster/hadoop/client.pp
M modules/role/manifests/analytics_cluster/hive/client.pp
M modules/role/manifests/configcluster.pp
D modules/role/manifests/zookeeper/client.pp
31 files changed, 104 insertions(+), 135 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  Elukey: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/hieradata/codfw.yaml b/hieradata/codfw.yaml
index 079f800..922c685 100644
--- a/hieradata/codfw.yaml
+++ b/hieradata/codfw.yaml
@@ -20,12 +20,6 @@
 
 ganglia_aggregators: install2002.wikimedia.org:10649
 
-# Default zookeeper cluster to use in codfw.
-# The cluster config is in common.yaml in zookeeper_clusters.
-zookeeper_cluster_name: 'main-codfw'
-# Page if a zookeeper server in this cluster goes down.
-zookeeper_cluster_is_critical: true
-
 #
 # LABS
 #
diff --git a/hieradata/common/zookeeper.yaml b/hieradata/common/zookeeper.yaml
deleted file mode 100644
index 391dfe6..0000000
--- a/hieradata/common/zookeeper.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Max number of connections per IP for Zookeeper
-zookeeper::max_client_connections: 1024
-
-# Default tick_time is 2000ms, this should allow a max
-# of 16 seconds of latency for Zookeeper client sessions.
-# See comments in role::kafka::analytics::broker for more info.
-zookeeper::sync_limit: 8
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index 0b83525..61da1b2 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -64,12 +64,6 @@
 
 labs_certmanager_hostname: "labservices1001.wikimedia.org"
 
-# Default zookeeper cluster to use in eqiad.
-# The cluster config is in common.yaml in zookeeper_clusters.
-zookeeper_cluster_name: 'main-eqiad'
-# Page if a zookeeper server in this cluster goes down.
-zookeeper_cluster_is_critical: true
-
 #
 # Labs
 #
diff --git a/hieradata/hosts/druid1001.yaml b/hieradata/hosts/druid1001.yaml
deleted file mode 100644
index 4f22a10..0000000
--- a/hieradata/hosts/druid1001.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Druid nodes get their own Zookeeper cluster to isolate them
-# from the production ones.
-zookeeper_cluster_name: druid-eqiad
-# Don't page if a zookeeper server in this cluster goes down.
-zookeeper_cluster_is_critical: false
\ No newline at end of file
diff --git a/hieradata/hosts/druid1002.yaml b/hieradata/hosts/druid1002.yaml
deleted file mode 100644
index d2a9521..0000000
--- a/hieradata/hosts/druid1002.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Druid nodes get their own Zookeeper cluster to isolate them
-# from the production ones.
-zookeeper_cluster_name: druid-eqiad
-# Don't page if a zookeeper server in this cluster goes down.
-zookeeper_cluster_is_critical: false
diff --git a/hieradata/hosts/druid1003.yaml b/hieradata/hosts/druid1003.yaml
deleted file mode 100644
index d2a9521..0000000
--- a/hieradata/hosts/druid1003.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Druid nodes get their own Zookeeper cluster to isolate them
-# from the production ones.
-zookeeper_cluster_name: druid-eqiad
-# Don't page if a zookeeper server in this cluster goes down.
-zookeeper_cluster_is_critical: false
diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index f0264ee..377d824 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -65,8 +65,6 @@
 
 swift::proxy::tld: 'beta.wmflabs.org'
 
-
-zookeeper_cluster_name: "%{::labsproject}"
 zookeeper_clusters:
   "%{::labsproject}":
     hosts:
diff --git a/hieradata/role/codfw/configcluster.yaml 
b/hieradata/role/codfw/configcluster.yaml
index b0ab167..f228838 100644
--- a/hieradata/role/codfw/configcluster.yaml
+++ b/hieradata/role/codfw/configcluster.yaml
@@ -12,3 +12,4 @@
 # only conf2002 is active
 profile::etcd::replication::active: false
 profile::etcd::tlsproxy::read_only: true
+profile::zookeeper::cluster_name: main-codfw
\ No newline at end of file
diff --git a/hieradata/role/codfw/zookeeper/server.yaml 
b/hieradata/role/codfw/zookeeper/server.yaml
deleted file mode 100644
index b90d653..0000000
--- a/hieradata/role/codfw/zookeeper/server.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-debdeploy::grains:
-  debdeploy-zookeeper-codfw:
-    value: standard
diff --git a/hieradata/role/common/analytics_cluster/client.yaml 
b/hieradata/role/common/analytics_cluster/client.yaml
new file mode 100644
index 0000000..7bc321e
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/client.yaml
@@ -0,0 +1,5 @@
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics_cluster::hadoop::client
+# role::analytics_cluster::hive::client
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/analytics_cluster/druid/worker.yaml 
b/hieradata/role/common/analytics_cluster/druid/worker.yaml
index 1723be5..68a1add 100644
--- a/hieradata/role/common/analytics_cluster/druid/worker.yaml
+++ b/hieradata/role/common/analytics_cluster/druid/worker.yaml
@@ -3,3 +3,7 @@
 debdeploy::grains:
   debdeploy-druid:
     value: standard
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics::druid::common
+zookeeper_cluster_name: druid-eqiad
diff --git a/hieradata/role/common/analytics_cluster/druid/zookeeper.yaml 
b/hieradata/role/common/analytics_cluster/druid/zookeeper.yaml
new file mode 100644
index 0000000..05668da
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/druid/zookeeper.yaml
@@ -0,0 +1,14 @@
+# Druid nodes get their own Zookeeper cluster to isolate them
+# from the production ones.
+profile::zookeeper::cluster_name: druid-eqiad
+# Don't page if a zookeeper server in this cluster goes down.
+profile::zookeeper::is_critical: false
+# Max number of connections per IP for Zookeeper
+profile::zookeeper::max_client_connections: 1024
+# Default tick_time is 2000ms, this should allow a max
+# of 16 seconds of latency for Zookeeper client sessions.
+# See comments in role::kafka::analytics::broker for more info.
+profile::zookeeper::sync_limit: 8
+# To avoid version conflics with Cloudera zookeeper package, this
+# class manually specifies which debian package version should be installed.
+profile::zookeeper::zookeeper_version: '3.4.5+dfsg-2+deb8u2'
diff --git a/hieradata/role/common/analytics_cluster/hadoop/balancer.yaml 
b/hieradata/role/common/analytics_cluster/hadoop/balancer.yaml
new file mode 100644
index 0000000..883e3c9
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/hadoop/balancer.yaml
@@ -0,0 +1,4 @@
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/analytics_cluster/hadoop/client.yaml 
b/hieradata/role/common/analytics_cluster/hadoop/client.yaml
new file mode 100644
index 0000000..b4d3199
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/hadoop/client.yaml
@@ -0,0 +1 @@
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/analytics_cluster/hadoop/master.yaml 
b/hieradata/role/common/analytics_cluster/hadoop/master.yaml
index 23a1228..81dde56 100644
--- a/hieradata/role/common/analytics_cluster/hadoop/master.yaml
+++ b/hieradata/role/common/analytics_cluster/hadoop/master.yaml
@@ -1,5 +1,9 @@
 nagios_group: analytics_eqiad
 cluster: analytics
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
 admin::groups:
   - analytics-users
   - analytics-privatedata-users
diff --git a/hieradata/role/common/analytics_cluster/hadoop/standby.yaml 
b/hieradata/role/common/analytics_cluster/hadoop/standby.yaml
index aecf358..adf2d84 100644
--- a/hieradata/role/common/analytics_cluster/hadoop/standby.yaml
+++ b/hieradata/role/common/analytics_cluster/hadoop/standby.yaml
@@ -1,5 +1,9 @@
 nagios_group: analytics_eqiad
 cluster: analytics
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
 admin::groups:
   - analytics-users
   - analytics-privatedata-users
diff --git a/hieradata/role/common/analytics_cluster/hadoop/worker.yaml 
b/hieradata/role/common/analytics_cluster/hadoop/worker.yaml
index 83b8dc7..d976d93 100644
--- a/hieradata/role/common/analytics_cluster/hadoop/worker.yaml
+++ b/hieradata/role/common/analytics_cluster/hadoop/worker.yaml
@@ -1,5 +1,9 @@
 nagios_group: analytics_eqiad
 cluster: analytics
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
 admin::groups:
   - analytics-admins
 debdeploy::grains:
diff --git a/hieradata/role/common/analytics_cluster/hive/client.yaml 
b/hieradata/role/common/analytics_cluster/hive/client.yaml
new file mode 100644
index 0000000..b4d3199
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/hive/client.yaml
@@ -0,0 +1 @@
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/analytics_cluster/hue.yaml 
b/hieradata/role/common/analytics_cluster/hue.yaml
index f3c3b72..860725a 100644
--- a/hieradata/role/common/analytics_cluster/hue.yaml
+++ b/hieradata/role/common/analytics_cluster/hue.yaml
@@ -1,3 +1,8 @@
 debdeploy::grains:
   debdeploy-hue:
     value: standard
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics_cluster::hadoop::client
+# role::analytics_cluster::hive::client
+hadoop_zookeeper_cluster_name: main-eqiad
diff --git a/hieradata/role/common/analytics_cluster/oozie/client.yaml 
b/hieradata/role/common/analytics_cluster/oozie/client.yaml
new file mode 100644
index 0000000..e6592c2
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/oozie/client.yaml
@@ -0,0 +1,4 @@
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics_cluster::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/analytics_cluster/refinery.yaml 
b/hieradata/role/common/analytics_cluster/refinery.yaml
new file mode 100644
index 0000000..e6592c2
--- /dev/null
+++ b/hieradata/role/common/analytics_cluster/refinery.yaml
@@ -0,0 +1,4 @@
+# FIXME:
+# indirect hiera lookup due to includes in the role:
+# role::analytics_cluster::hadoop::client
+hadoop_zookeeper_cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/common/configcluster.yaml 
b/hieradata/role/common/configcluster.yaml
index 3bac14a..c35e87e 100644
--- a/hieradata/role/common/configcluster.yaml
+++ b/hieradata/role/common/configcluster.yaml
@@ -16,3 +16,14 @@
 #profile::etcd::tlsproxy::accounts
 #profile::etcd::tlsproxy::salt
 profile::etcd::tlsproxy::read_only: false
+# Page if a zookeeper server in this cluster goes down.
+profile::zookeeper::is_critical: true
+# Max number of connections per IP for Zookeeper
+profile::zookeeper::max_client_connections: 1024
+# Default tick_time is 2000ms, this should allow a max
+# of 16 seconds of latency for Zookeeper client sessions.
+# See comments in role::kafka::analytics::broker for more info.
+profile::zookeeper::sync_limit: 8
+# To avoid version conflics with Cloudera zookeeper package, this
+# class manually specifies which debian package version should be installed.
+profile::zookeeper::zookeeper_version: '3.4.5+dfsg-2+deb8u2'
diff --git a/hieradata/role/eqiad/configcluster.yaml 
b/hieradata/role/eqiad/configcluster.yaml
index a8ad506..69e6f4d 100644
--- a/hieradata/role/eqiad/configcluster.yaml
+++ b/hieradata/role/eqiad/configcluster.yaml
@@ -11,3 +11,4 @@
 profile::etcd::replication::destination_path: /conftool
 # only conf1002 is active if this is not the master DC.
 profile::etcd::replication::active: false
+profile::zookeeper::cluster_name: main-eqiad
\ No newline at end of file
diff --git a/hieradata/role/eqiad/zookeeper/server.yaml 
b/hieradata/role/eqiad/zookeeper/server.yaml
deleted file mode 100644
index c4f6dc9..0000000
--- a/hieradata/role/eqiad/zookeeper/server.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-debdeploy::grains:
-  debdeploy-zookeeper-eqiad:
-    value: standard
diff --git a/manifests/site.pp b/manifests/site.pp
index b7d3edc..a539f3f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -888,10 +888,7 @@
 node /^druid100[123].eqiad.wmnet$/ {
     role(analytics_cluster::druid::worker,
         analytics_cluster::hadoop::client,
-        # zookeeper_cluster_name is set in hiera
-        # in hieradata/hosts/druid100*.yaml.  This
-        # is a separate druid zookeeper cluster.
-        zookeeper::server)
+        analytics_cluster::druid::zookeeper)
 
     include ::base::firewall
     include ::standard
diff --git a/modules/role/manifests/zookeeper/server.pp 
b/modules/profile/manifests/zookeeper/server.pp
similarity index 65%
rename from modules/role/manifests/zookeeper/server.pp
rename to modules/profile/manifests/zookeeper/server.pp
index dc073c0..536dd4b 100644
--- a/modules/role/manifests/zookeeper/server.pp
+++ b/modules/profile/manifests/zookeeper/server.pp
@@ -1,27 +1,28 @@
-# Classes for Zookeeper nodes.
-# These role classes will configure Zookeeper properly in either
-# the labs or production environments.
-#
-# Usage:
-#
-# If you only need Zookeeper client configs to talk to Zookeeper servers:
-#   include role::zookeeper::client
-#
-# If you want to set up a Zookeeper server:
-#   include role::zookeeper::server
-#
-# == Class role::zookeeper::server
+# == Class profile::zookeeper::server
 #
 # zookeeper_cluster_name in hiera will be used to make jmxtrans
 # properly prefix zookeeper statsd (and graphite) metrics.
 #
 # filtertags: labs-project-deployment-prep labs-project-analytics
-class role::zookeeper::server {
-    include role::zookeeper::client
-    $cluster_name = $::role::zookeeper::client::cluster_name
+class profile::zookeeper::server (
+    $clusters               = hiera('zookeeper_clusters'),
+    $cluster_name           = hiera('profile::zookeeper::cluster_name'),
+    $is_critical            = hiera('profile::zookeeper::is_critical'),
+    $max_client_connections = 
hiera('profile::zookeeper::max_client_connections'),
+    $version                = hiera('profile::zookeeper::zookeeper_version'),
+    $sync_limit             = hiera('profile::zookeeper::sync_limit'),
+    $statsd_host            = hiera('statsd'),
+) {
+    # FIXME:
+    # This require package probably belongs to the zookeeper module, not this
+    # profile.
+    require_package('openjdk-7-jdk')
 
-    system::role { 'zookeeper::server':
-        description => "${cluster_name} Cluster Zookeeper Server"
+    class { '::zookeeper':
+        hosts                  => $clusters[$cluster_name]['hosts'],
+        version                => $version,
+        sync_limit             => $sync_limit,
+        max_client_connections => $max_client_connections,
     }
 
     class { '::zookeeper::server':
@@ -48,23 +49,24 @@
     # Use jmxtrans for sending metrics to ganglia
     class { 'zookeeper::jmxtrans':
         group_prefix => $group_prefix,
-        statsd       => hiera('statsd', undef),
+        statsd       => $statsd_host,
     }
 
-    if $::realm == 'production' {
-        # Configure service pages via hiera.
-        $zookeeper_cluster_is_critical = 
hiera('zookeeper_cluster_is_critical', false)
-
+    if $is_critical {
         # Alert if Zookeeper Server is not running.
         nrpe::monitor_service { 'zookeeper':
             description  => 'Zookeeper Server',
             nrpe_command => '/usr/lib/nagios/plugins/check_procs -c 1:1 -C 
java -a "org.apache.zookeeper.server.quorum.QuorumPeerMain 
/etc/zookeeper/conf/zoo.cfg"',
-            critical     => $zookeeper_cluster_is_critical,
+            critical     => $is_critical,
         }
+
+        # More info about port allocation for JMX:
+        # 
https://wikitech.wikimedia.org/wiki/Analytics/Systems/Cluster/Ports#JMX
+        $jmxtrans_port = 9998
 
         # jmxtrans statsd writer emits fqdns in keys
         # by substituting '.' with '_' and suffixing the jmx port.
-        $graphite_broker_key = 
regsubst("${::fqdn}_${::zookeeper::jmxtrans::jmx_port}", '\.', '_', 'G')
+        $graphite_broker_key = regsubst("${::fqdn}_${jmxtrans_port}", '\.', 
'_', 'G')
 
         # Alert if NumAliveConnections approaches max client connections
         # Alert if any Kafka Broker replica lag is too high
@@ -72,9 +74,9 @@
             description => 'Zookeeper Alive Client Connections too high',
             metric      => 
"${group_prefix}zookeeper.${graphite_broker_key}.zookeeper.NumAliveConnections",
             # Warn if we go over 50% of max
-            warning     => $::zookeeper::max_client_connections * 0.5,
+            warning     => $max_client_connections * 0.5,
             # Critical if we go over 90% of max
-            critical    => $::zookeeper::max_client_connections * 0.9,
+            critical    => $max_client_connections * 0.9,
         }
 
         # Experimental Analytics alarms on JVM usage
@@ -82,7 +84,7 @@
         # on a fixed Max Heap size of 1G.
         monitoring::graphite_threshold { 'zookeeper-server-heap-usage':
             description   => 'Zookeeper node JVM Heap usage',
-            metric        => 
"${group_prefix}jvm_memory.${::hostname}_${::site}_wmnet_${::zookeeper::jmxtrans::jmx_port}.memory.HeapMemoryUsage_used.upper",
+            metric        => 
"${group_prefix}jvm_memory.${::hostname}_${::site}_wmnet_${jmxtrans_port}.memory.HeapMemoryUsage_used.upper",
             from          => '60min',
             warning       => '921000000',  # 90% of the Heap used
             critical      => '972000000',  # 95% of the Heap used
diff --git a/modules/role/manifests/analytics_cluster/druid/zookeeper.pp 
b/modules/role/manifests/analytics_cluster/druid/zookeeper.pp
new file mode 100644
index 0000000..ab57703
--- /dev/null
+++ b/modules/role/manifests/analytics_cluster/druid/zookeeper.pp
@@ -0,0 +1,3 @@
+class role::analytics_cluster::druid::zookeeper {
+    include profile::zookeeper::server
+}
\ No newline at end of file
diff --git a/modules/role/manifests/analytics_cluster/hadoop/client.pp 
b/modules/role/manifests/analytics_cluster/hadoop/client.pp
index d863cae..1e9120c 100644
--- a/modules/role/manifests/analytics_cluster/hadoop/client.pp
+++ b/modules/role/manifests/analytics_cluster/hadoop/client.pp
@@ -30,7 +30,7 @@
     #
 
     $zookeeper_clusters     = hiera('zookeeper_clusters')
-    $zookeeper_cluster_name = hiera('zookeeper_cluster_name')
+    $zookeeper_cluster_name = hiera('hadoop_zookeeper_cluster_name')
     $zookeeper_hosts        = 
keys($zookeeper_clusters[$zookeeper_cluster_name]['hosts'])
 
     class { '::cdh::hadoop':
diff --git a/modules/role/manifests/analytics_cluster/hive/client.pp 
b/modules/role/manifests/analytics_cluster/hive/client.pp
index bcb7ba0..81c4cb6 100644
--- a/modules/role/manifests/analytics_cluster/hive/client.pp
+++ b/modules/role/manifests/analytics_cluster/hive/client.pp
@@ -12,7 +12,7 @@
     $auxpath = $hcatalog_jar
 
     $zookeeper_clusters     = hiera('zookeeper_clusters')
-    $zookeeper_cluster_name = hiera('zookeeper_cluster_name')
+    $zookeeper_cluster_name = hiera('hadoop_zookeeper_cluster_name')
     $zookeeper_hosts        = 
keys($zookeeper_clusters[$zookeeper_cluster_name]['hosts'])
 
     # You must set at least:
diff --git a/modules/role/manifests/configcluster.pp 
b/modules/role/manifests/configcluster.pp
index 219f50b..def5e08 100644
--- a/modules/role/manifests/configcluster.pp
+++ b/modules/role/manifests/configcluster.pp
@@ -1,7 +1,7 @@
 class role::configcluster {
     include ::standard
     include ::base::firewall
-    include ::role::zookeeper::server
+    include ::profile::zookeeper::server
     include ::profile::etcd
     include ::profile::etcd::tlsproxy
     include ::profile::etcd::replication
diff --git a/modules/role/manifests/zookeeper/client.pp 
b/modules/role/manifests/zookeeper/client.pp
deleted file mode 100644
index c164f29..0000000
--- a/modules/role/manifests/zookeeper/client.pp
+++ /dev/null
@@ -1,58 +0,0 @@
-# Classes for Zookeeper nodes.
-# These role classes will configure Zookeeper properly in either
-# the labs or production environments.
-#
-# To avoid version conflics with Cloudera zookeeper package, this
-# class manually specifies which debian package version should be installed.
-# There are sane defaults for Ubunty Trusty and Debian Jessie
-# (as of 2017-05 the Jessie version needs updated to 3.4.5+dfsg-2+deb8u1).
-# If you need to override this, you may set 'zookeeper_version' in hiera.
-#
-# Usage:
-#
-# If you only need Zookeeper client configs to talk to Zookeeper servers:
-#   include role::zookeeper::client
-#
-# If you want to set up a Zookeeper server:
-#   include role::zookeeper::server
-#
-# You need to include the hiera variables 'zookeeper_clusters' and
-# 'zookeeper_cluster_name'.  zookeeper_clusters should be a hash with
-# zookeeper_cluster_name as a key, the value of which is a hash
-# that has a 'hosts' sub with key being name of node and value being zookeeper
-# id for the client / server roles to work.
-#
-# E.g.
-#
-# # In eqiad.yaml, or role/eqiad/zookeeper/server.yaml:
-# zookeeper_cluster_name: main-eqiad
-#
-# # In common.yaml:
-# zookeeper_clusters:
-#  main-eqiad:
-#   hosts:
-#     nodeA: 1
-#     nodeB: 2
-# ...
-#
-# == Class role::zookeeper::client
-#
-class role::zookeeper::client {
-
-    $version = hiera('zookeeper_version',
-        $::lsbdistcodename ? {
-            'jessie'  => '3.4.5+dfsg-2+deb8u2',
-            'trusty'  => '3.4.5+dfsg-1',
-        }
-    )
-
-    $clusters     = hiera('zookeeper_clusters')
-    $cluster_name = hiera('zookeeper_cluster_name')
-
-    require_package('openjdk-7-jdk')
-    class { '::zookeeper':
-        hosts   => $clusters[$cluster_name]['hosts'],
-        version => $version,
-    }
-}
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If511394ac4a80287dd44f0c89d9f29fcf9477ad1
Gerrit-PatchSet: 42
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey <ltosc...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Elukey <ltosc...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Ottomata <ao...@wikimedia.org>
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