Yuvipanda has submitted this change and it was merged.

Change subject: mathoid: Unify mathoid production and beta roles
......................................................................


mathoid: Unify mathoid production and beta roles

Bug: T86633
Change-Id: I10463938bac5afdd75e10b7cf8f2574fd809391f
---
M manifests/role/mathoid.pp
M manifests/site.pp
M modules/mathoid/manifests/init.pp
3 files changed, 8 insertions(+), 49 deletions(-)

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



diff --git a/manifests/role/mathoid.pp b/manifests/role/mathoid.pp
index 2edde67..27d42ac 100644
--- a/manifests/role/mathoid.pp
+++ b/manifests/role/mathoid.pp
@@ -4,16 +4,12 @@
 # better place
 @monitoring::group { 'sca_eqiad': description => 'Service Cluster A servers' }
 
-class role::mathoid::production {
-    system::role { 'role::mathoid::production':
+class role::mathoid{
+    system::role { 'role::mathoid':
         description => 'mathoid server'
     }
 
     class { '::mathoid':
-      base_path => '/srv/deployment/mathoid/mathoid',
-      node_path => '/srv/deployment/mathoid/mathoid/node_modules',
-      conf_path => '/srv/deployment/mathoid/mathoid/mathoid.config.json',
-      log_dir   => '/var/log/mathoid',
       require   => Package['mathoid/mathoid'],
     }
 
@@ -45,43 +41,7 @@
     }
 }
 
-class role::mathoid::beta {
-    system::role { 'role::mathoid::beta':
-        description => 'mathoid server (on beta)'
-    }
-
-    class { '::mathoid':
-        base_path => '/srv/deployment/mathoid/mathoid',
-        node_path => '/srv/deployment/mathoid/mathoid/node_modules',
-        conf_path => '/srv/deployment/mathoid/mathoid/mathoid.config.json',
-        log_dir   => '/var/log/mathoid',
-        require   => Package['mathoid'],
-    }
-
-    package { 'mathoid':
-        provider => 'trebuchet',
-    }
-
-    group { 'mathoid':
-        ensure => present,
-        name   => 'mathoid',
-        system => true,
-    }
-
-    user { 'mathoid':
-        gid           => 'mathoid',
-        home          => '/srv/deployment/mathoid/mathoid',
-        managehome    => true,
-        system        => true,
-    }
-
-    # Beta mathoid server has some ferm DNAT rewriting rules (bug 45868) so we
-    # have to explicitly allow mathoid port 10042
-    ferm::service { 'mathoid':
-        proto => 'tcp',
-        port  => '10042'
-    }
-
+class role::mathoid::jenkins_access {
     # Allow ssh access from the Jenkins master to the server where mathoid is
     # running
     include contint::firewall::labs
diff --git a/manifests/site.pp b/manifests/site.pp
index ebf4a9f..b6d58bd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2716,8 +2716,7 @@
     $ganglia_aggregator = true
     include standard
 
-    include role::mathoid::production
-    role apertium, cxserver, citoid
+    role apertium, citoid, cxserver, mathoid
 
     class { 'admin':
         groups => [
diff --git a/modules/mathoid/manifests/init.pp 
b/modules/mathoid/manifests/init.pp
index 1e3314a..e9b44c1 100644
--- a/modules/mathoid/manifests/init.pp
+++ b/modules/mathoid/manifests/init.pp
@@ -17,10 +17,10 @@
 #   Port where to run the mathoid service. Defaults to 10042.
 #
 class mathoid(
-    $base_path,
-    $node_path,
-    $conf_path,
-    $log_dir,
+    $base_path = '/srv/deployment/mathoid/mathoid',
+    $node_path = '/srv/deployment/mathoid/mathoid/node_modules',
+    $conf_path = '/srv/deployment/mathoid/mathoid/mathoid.config.json',
+    $log_dir = '/var/log/mathoid',
     $port=10042
 ) {
     require_package('nodejs')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10463938bac5afdd75e10b7cf8f2574fd809391f
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to