Dzahn has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/96403


Change subject: role and module structure for ishmael
......................................................................

role and module structure for ishmael

- add a role and use it in site.pp
- move to module structure
- separate config definition from the class

Change-Id: Ia0905a8e949ea78e72508a9e33a65772dfb6ae54
---
D manifests/misc/ishmael.pp
A manifests/role/ishmael.pp
M manifests/site.pp
A modules/ishmael/manifests/config.pp
A modules/ishmael/manifests/init.pp
5 files changed, 51 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/96403/1

diff --git a/manifests/misc/ishmael.pp b/manifests/misc/ishmael.pp
deleted file mode 100644
index 791a927..0000000
--- a/manifests/misc/ishmael.pp
+++ /dev/null
@@ -1,39 +0,0 @@
-# ishmael web app
-#
-# NOTE: this does not install ishmael.. it could be git deployed, but it 
hasn't been moved to a wmf repo. for now:
-# cd /srv ; git clone https://github.com/asher/ishmael.git ; cd ishmael ; git 
clone https://github.com/asher/ishmael.git sample
-#
-class misc::ishmael {
-    system::role { 'misc::ishmael': description => 'ishmael server' }
-
-    include passwords::ldap::wmf_cluster
-    $proxypass = $passwords::ldap::wmf_cluster::proxypass
-
-    file { '/etc/apache2/sites-available/ishmael.wikimedia.org':
-        ensure  => present,
-        owner   => 'root',
-        group   => 'root',
-        mode    => '0440',
-        content => template('apache/sites/ishmael.wikimedia.org.erb');
-    }
-
-    apache_site { 'ishmael': name => 'ishmael.wikimedia.org' }
-
-    define ishmael_config( $db_central_host='db1001.eqiad.wmnet', 
$review_table='%query_review', $history_table='%query_review_history' ) {
-        include passwords::mysql::querydigest
-
-        file { $title:
-            owner   => 'root',
-            group   => 'root',
-            mode    => '0444',
-            content => template('ishmael/conf.php.erb');
-        }
-    }
-
-    ishmael_config { '/srv/ishmael/conf.php': }
-
-    ishmael_config { '/srv/ishmael/sample/conf.php':
-        review_table  => '%tcpquery_review',
-        history_table => '%tcpquery_review_history',
-    }
-}
diff --git a/manifests/role/ishmael.pp b/manifests/role/ishmael.pp
new file mode 100644
index 0000000..d345525
--- /dev/null
+++ b/manifests/role/ishmael.pp
@@ -0,0 +1,9 @@
+# manifests/role/ishmael.pp
+
+class role::ishmael {
+
+    system::role { 'role::ishmael': description => 'ishmael server' }
+
+    include ishmael
+
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index b35d66b..cf08928 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2087,7 +2087,7 @@
     $ircecho_server = "chat.freenode.net"
     include standard,
         icinga::monitor,
-        misc::ishmael,
+        role::ishmael,
         misc::ircecho,
         tcpircbot,
         passwords::logmsgbot
diff --git a/modules/ishmael/manifests/config.pp 
b/modules/ishmael/manifests/config.pp
new file mode 100644
index 0000000..e0b2515
--- /dev/null
+++ b/modules/ishmael/manifests/config.pp
@@ -0,0 +1,14 @@
+# definition of an ishmael config
+
+define ishmael::config( $db_central_host='db1001.eqiad.wmnet', 
$review_table='%query_review', $history_table='%query_review_history' ) {
+
+    include passwords::mysql::querydigest
+
+    file { $title:
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0444',
+        content => template('ishmael/conf.php.erb');
+      }
+}
+
diff --git a/modules/ishmael/manifests/init.pp 
b/modules/ishmael/manifests/init.pp
new file mode 100644
index 0000000..24e3931
--- /dev/null
+++ b/modules/ishmael/manifests/init.pp
@@ -0,0 +1,27 @@
+# ishmael web app
+#
+# NOTE: this does not install ishmael.. it could be git deployed, but it 
hasn't been moved to a wmf repo. for now:
+# cd /srv ; git clone https://github.com/asher/ishmael.git ; cd ishmael ; git 
clone https://github.com/asher/ishmael.git sample
+#
+class ishmael {
+
+    include passwords::ldap::wmf_cluster
+    $proxypass = $passwords::ldap::wmf_cluster::proxypass
+
+    file { '/etc/apache2/sites-available/ishmael.wikimedia.org':
+        ensure  => present,
+        owner   => 'root',
+        group   => 'root',
+        mode    => '0440',
+        content => template('apache/sites/ishmael.wikimedia.org.erb');
+    }
+
+    apache_site { 'ishmael': name => 'ishmael.wikimedia.org' }
+
+    ishmael::config { '/srv/ishmael/conf.php': }
+
+    ishmael::config { '/srv/ishmael/sample/conf.php':
+        review_table  => '%tcpquery_review',
+        history_table => '%tcpquery_review_history',
+    }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0905a8e949ea78e72508a9e33a65772dfb6ae54
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to