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

Change subject: racktables: role/profile, remove style violations
......................................................................


racktables: role/profile, remove style violations

Drop the redundant "::server" suffix, there were reasons
to do it like that in the past, but not anymore.

Create a proper profile class.

Move the Apache includes into that profile class.

Fix wmf-style violations. (Not all of them but delta still -5)

Change-Id: I9278b84268feef8565d9a074cbdb8a664c5f4eaa
---
A hieradata/role/common/racktables.yaml
D hieradata/role/common/racktables/server.yaml
M manifests/site.pp
R modules/profile/manifests/racktables.pp
M modules/profile/manifests/requesttracker/server.pp
M modules/racktables/manifests/init.pp
A modules/role/manifests/racktables.pp
7 files changed, 29 insertions(+), 17 deletions(-)

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



diff --git a/hieradata/role/common/racktables.yaml 
b/hieradata/role/common/racktables.yaml
new file mode 100644
index 0000000..6039a56
--- /dev/null
+++ b/hieradata/role/common/racktables.yaml
@@ -0,0 +1,3 @@
+standard::has_default_mail_relay: false
+
+profile::racktables::racktables_host: 'racktables.wikimedia.org'
diff --git a/hieradata/role/common/racktables/server.yaml 
b/hieradata/role/common/racktables/server.yaml
deleted file mode 100644
index 5e11526..0000000
--- a/hieradata/role/common/racktables/server.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-standard::has_default_mail_relay: false
-
-racktables_host: 'racktables.wikimedia.org'
diff --git a/manifests/site.pp b/manifests/site.pp
index a25a3b9..d064e17 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1249,7 +1249,7 @@
     # Running this here because krypton is a 'misc' Jessie
     # <s>monitoring host</s> (not really, it's just misc apps)
     role(wikimania_scholarships, iegreview::app, grafana::production,
-        kafka::analytics::burrow, racktables::server)
+        kafka::analytics::burrow, racktables)
     include ::standard
 }
 
diff --git a/modules/role/manifests/racktables/server.pp 
b/modules/profile/manifests/racktables.pp
similarity index 63%
rename from modules/role/manifests/racktables/server.pp
rename to modules/profile/manifests/racktables.pp
index 4d0c82f..846ac23 100644
--- a/modules/role/manifests/racktables/server.pp
+++ b/modules/profile/manifests/racktables.pp
@@ -1,17 +1,21 @@
 # https://racktables.wikimedia.org
-
 ## Please note that Racktables is a tarball extraction based installation
 ## into its web directory root.  This means that puppet cannot fully automate
 ## the installation at this time & the actual tarball must be downloaded from
 ## http://racktables.org/ and unzipped into /srv/org/wikimedia/racktables
 #
 # filtertags: labs-project-servermon
-class role::racktables::server {
+class profile::racktables (
+    $racktables_host = hiera('profile::racktables::racktables_host'),
+){
 
-    system::role { 'racktables::server': description => 'Racktables server' }
+    include ::apache
+    include ::apache::mod::php5
+    include ::apache::mod::ssl
+    include ::apache::mod::rewrite
+    include ::apache::mod::headers
 
-    include ::standard
-    include ::base::firewall
+    include ::passwords::racktables
 
     ferm::service { 'racktables-http':
         proto => 'tcp',
@@ -19,7 +23,7 @@
     }
 
     class { '::racktables':
-        racktables_host    => hiera('racktables_host', $facts['fqdn']),
+        racktables_host    => $racktables_host,
         racktables_db_host => 'm1-master.eqiad.wmnet',
         racktables_db      => 'racktables',
     }
diff --git a/modules/profile/manifests/requesttracker/server.pp 
b/modules/profile/manifests/requesttracker/server.pp
index 0c8ce66..25f0548 100644
--- a/modules/profile/manifests/requesttracker/server.pp
+++ b/modules/profile/manifests/requesttracker/server.pp
@@ -20,3 +20,4 @@
         srange => '$PRODUCTION_NETWORKS',
     }
 }
+
diff --git a/modules/racktables/manifests/init.pp 
b/modules/racktables/manifests/init.pp
index 3d9438a..bfb3e3d 100644
--- a/modules/racktables/manifests/init.pp
+++ b/modules/racktables/manifests/init.pp
@@ -4,13 +4,6 @@
 ## the installation at this time & the actual tarball must be downloaded from
 ## http://racktables.org/ and unzipped into /srv/org/wikimedia/racktables
 class racktables ($racktables_host, $racktables_db_host, $racktables_db) {
-    include ::mysql
-    include ::passwords::racktables
-    include ::apache
-    include ::apache::mod::php5
-    include ::apache::mod::ssl
-    include ::apache::mod::rewrite
-    include ::apache::mod::headers
 
     require_package('php5-mysql', 'php5-gd')
 
diff --git a/modules/role/manifests/racktables.pp 
b/modules/role/manifests/racktables.pp
new file mode 100644
index 0000000..cf90aa7
--- /dev/null
+++ b/modules/role/manifests/racktables.pp
@@ -0,0 +1,14 @@
+# https://racktables.wikimedia.org
+
+## Please note that Racktables is a tarball extraction based installation
+## into its web directory root.  This means that puppet cannot fully automate
+## the installation at this time & the actual tarball must be downloaded from
+## http://racktables.org/ and unzipped into /srv/org/wikimedia/racktables
+#
+class role::racktables {
+
+    system::role { 'racktables': description => 'Racktables server' }
+
+    include ::standard
+    include ::profile::racktables
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9278b84268feef8565d9a074cbdb8a664c5f4eaa
Gerrit-PatchSet: 12
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Dzahn <dz...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@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