Yuvipanda has uploaded a new change for review.

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

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

apertium: Unify production and beta roles

Change-Id: I0b5dcc76b002b7e9fad6add180ddde1a8102b8d7
---
M manifests/role/apertium.pp
1 file changed, 6 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/184586/1

diff --git a/manifests/role/apertium.pp b/manifests/role/apertium.pp
index dd178ca..f20d909 100644
--- a/manifests/role/apertium.pp
+++ b/manifests/role/apertium.pp
@@ -1,49 +1,33 @@
 # vim: set ts=4 et sw=4:
-
-class role::apertium::production {
+class role::apertium(
+    $port = '2737',
+) {
     system::role { 'role::apertium::production':
         description => 'Apertium APY server'
     }
-
-    # Define Apertium port
-    $apertium_port = hiera('role::apertium::apertium_port', '2737')
 
     include ::apertium
 
     # We have to explicitly open the apertium port (bug T47868)
     ferm::service { 'apertium_http':
         proto => 'tcp',
-        port  => $apertium_port,
+        port  => $port,
     }
 
     monitoring::service { 'apertium':
         description   => 'apertium apy',
         check_command => 
"check_http_url_on_port!apertium.svc.eqiad.wmnet!${apertium_port}!/listPairs",
     }
+
 }
 
-class role::apertium::beta {
-    system::role { 'role::apertium::beta':
-        description => 'Apertium APY server (on beta)'
-    }
-
-    # Define Apertium port
-    $apertium_port = hiera('role::apertium::apertium_port', '2737')
-
-    include ::apertium
-
+class role::apertium::jenkins_access {
     # Need to allow jenkins-deploy to reload apertium
     sudo::user { 'jenkins-deploy': privileges => [
         # Since the "root" user is local, we cant add the sudo policy in
         # OpenStack manager interface at wikitech
         'ALL = (root)  NOPASSWD:/usr/sbin/service apertium-apy restart',
     ] }
-
-    # We have to explicitly open the apertium port (bug T47868)
-    ferm::service { 'apertium_http':
-        proto => 'tcp',
-        port  => $apertium_port,
-    }
 
     # Allow ssh access from the Jenkins master to the server where apertium is
     # running

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

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

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

Reply via email to