Ottomata has submitted this change and it was merged.

Change subject: Add solr::decommission class & apply it to vanadium
......................................................................


Add solr::decommission class & apply it to vanadium

<ori-l> Nikerabbit: is it ok to remove role::solr::ttm from vanadium, btw?
<Nikerabbit> ori-l: it has been moved to a new server, but I already forgot the 
name

Also adds a bit of documentation for role::solr::ttm.

Change-Id: I6db14149b8f85c322ed41564d5a2ff315d2ed42d
---
M manifests/role/solr.pp
M manifests/site.pp
A modules/solr/manifests/decommission.pp
3 files changed, 37 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp
index 46f6b47..b0cc81c 100644
--- a/manifests/role/solr.pp
+++ b/manifests/role/solr.pp
@@ -27,6 +27,15 @@
        }
 }
 
+# == Class: role::solr::ttm
+#
+# TTMServer is a translation memory server that comes with the Translate
+# extension. The Translate extension turns MediaWiki into a tool for
+# doing collaborative translation work. This Puppet class configures a
+# Solr back-end for translation lookups.
+#
+# See 
<http://www.mediawiki.org/wiki/Help:Extension:Translate/Translation_memories#Solr_backend>.
+#
 class role::solr::ttm {
        system_role { "solr": description => "ttm solr backend" }
 
diff --git a/manifests/site.pp b/manifests/site.pp
index 2a2a9c2..61442f1 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2824,7 +2824,7 @@
         role::eventlogging,
         role::ipython_notebook,
         nrpe,
-        role::solr::ttm
+        solr::decommission
 
     sudo_user { [ 'otto', 'olivneh' ]:
         privileges => ['ALL = (ALL) NOPASSWD: ALL'],
diff --git a/modules/solr/manifests/decommission.pp 
b/modules/solr/manifests/decommission.pp
new file mode 100644
index 0000000..15c57aa
--- /dev/null
+++ b/modules/solr/manifests/decommission.pp
@@ -0,0 +1,27 @@
+# == Class: solr::decommission
+#
+# Uninstalls Solr & related configuration data from a node.
+#
+class solr::decommission {
+    package { 'solr-jetty':
+        ensure => absent,
+    }
+
+    file { [
+        '/etc/default/jetty',
+        '/etc/solr',
+        '/usr/share/jetty/webapps/solr',
+        '/usr/share/solr',
+    ]:
+        ensure  => absent,
+        recurse => true,
+        purge   => true,
+        force   => true,
+        require => Service['jetty'],
+    }
+
+    service { 'jetty':
+        ensure => stopped,
+        enable => false,
+    }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6db14149b8f85c322ed41564d5a2ff315d2ed42d
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to