Yuvipanda has uploaded a new change for review.
https://gerrit.wikimedia.org/r/184590
Change subject: cxserver: Unify production and beta roles
......................................................................
cxserver: Unify production and beta roles
Bug: T86633
Change-Id: I74ee57e9e10aac2f7df7c3c09052afbaf901e4d0
---
M hieradata/role/common/cxserver/production.yaml
M manifests/role/cxserver.pp
M manifests/site.pp
3 files changed, 9 insertions(+), 39 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/90/184590/1
diff --git a/hieradata/role/common/cxserver/production.yaml
b/hieradata/role/common/cxserver/production.yaml
index 6fb0a82..b3b5cd4 100644
--- a/hieradata/role/common/cxserver/production.yaml
+++ b/hieradata/role/common/cxserver/production.yaml
@@ -1 +1 @@
-role::cxserver::cxserver_port: 8080
+role::cxserver::port: 8080
diff --git a/manifests/role/cxserver.pp b/manifests/role/cxserver.pp
index 7a6c565..d6c2b99 100644
--- a/manifests/role/cxserver.pp
+++ b/manifests/role/cxserver.pp
@@ -1,7 +1,9 @@
# vim: set ts=4 et sw=4:
-class role::cxserver::production {
- system::role { 'role::cxserver::production':
+class role::cxserver (
+ $port = 8080,
+) {
+ system::role { 'role::cxserver':
description => 'content translation server'
}
@@ -14,51 +16,19 @@
apertium => 'http://apertium.svc.eqiad.wmnet',
}
- # Define cxserver port
- $cxserver_port = hiera('role::cxserver::cxserver_port', 8080)
-
# We have to explicitly open the cxserver port (bug T47868)
ferm::service { 'cxserver_http':
proto => 'tcp',
- port => $cxserver_port,
+ port => $port,
}
monitoring::service { 'cxserver':
description => 'cxserver',
- check_command => "check_http_on_port!${cxserver_port}",
+ check_command => "check_http_on_port!${port}",
}
}
-class role::cxserver::beta {
- system::role { 'role::cxserver::beta':
- description => 'content translation server (on beta)'
- }
-
- class { '::cxserver':
- base_path => '/srv/deployment/cxserver/cxserver',
- node_path => '/srv/deployment/cxserver/deploy/node_modules',
- conf_path => '/srv/deployment/cxserver/config.js',
- log_dir => '/data/project/cxserver/log',
- parsoid => 'http://parsoid-lb.eqiad.wikimedia.org',
- apertium => 'http://apertium-beta.wmflabs.org',
- }
-
- # Need to allow jenkins-deploy to reload cxserver
- 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 cxserver restart',
- ] }
-
- # Define cxserver port
- $cxserver_port = hiera('role::cxserver::cxserver_port', 8080)
-
- # We have to explicitly open the cxserver port (bug 45868)
- ferm::service { 'cxserver_http':
- proto => 'tcp',
- port => $cxserver_port,
- }
-
+class role::cxserver::jenkins_access {
# Allow ssh access from the Jenkins master to the server where cxserver is
# running
include contint::firewall::labs
diff --git a/manifests/site.pp b/manifests/site.pp
index bdec9e5..65317d7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2954,7 +2954,7 @@
include role::mathoid::production
include role::citoid::production
- role apertium, cxserver::production
+ role apertium, cxserver
class { 'admin':
groups => [
--
To view, visit https://gerrit.wikimedia.org/r/184590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74ee57e9e10aac2f7df7c3c09052afbaf901e4d0
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