Ori.livneh has submitted this change and it was merged.
Change subject: Add parsoid::testing role and use it on ruthenium
......................................................................
Add parsoid::testing role and use it on ruthenium
* The repo is initialized via git and is installed in
/usr/lib/parsoid to mimic the setup on ruthenium and
could possibly be moved to /srv/parsoid later on.
Change-Id: I6e8405b296afe1970bc647076cbda02ee353054d
---
M manifests/role/parsoid.pp
M manifests/site.pp
2 files changed, 79 insertions(+), 1 deletion(-)
Approvals:
Ori.livneh: Verified; Looks good to me, approved
diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index b9dd1eb..a38e3a8 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -67,6 +67,7 @@
mode => '0444',
source => 'puppet:///files/misc/parsoid.upstart',
}
+
file { '/var/log/parsoid':
ensure => directory,
owner => parsoid,
@@ -247,6 +248,83 @@
include role::ci::slave::labs::common
# Also need the slave scripts for multi-git.sh
include contint::slave_scripts
+}
+# This role is used by testing services
+# Ex: Parsoid roundtrip testing, Parsoid & PHP parser visual diff testing
+class role::parsoid::testing {
+ system::role { 'role::parsoid::testing':
+ description => 'Parsoid server (rt-testing, visual-diffing, etc.)'
+ }
+ include role::parsoid::common
+
+ group { 'parsoid':
+ ensure => present,
+ name => 'parsoid',
+ system => true,
+ }
+
+ user { 'parsoid':
+ gid => 'parsoid',
+ home => '/var/lib/parsoid',
+ managehome => true,
+ system => true,
+ }
+
+ # We clone the git repo and let testing services
+ # update / modify the repo as appropriate
+ # (via scripts, manually, however).
+ git::clone { 'mediawiki/services/parsoid/deploy':
+ owner => 'root',
+ group => 'wikidev',
+ # FIXME: Should we move this to /srv/parsoid ?
+ # I am picking /usr/lib to minimize changes to
+ # ruthenium setup.
+ directory => '/usr/lib/parsoid',
+ before => Service['parsoid'],
+ }
+
+ file { '/etc/init/parsoid.conf':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => '0444',
+ source => 'puppet:///files/misc/parsoid.upstart',
+ before => Service['parsoid'],
+ }
+
+ file { '/var/log/parsoid':
+ ensure => directory,
+ owner => parsoid,
+ group => parsoid,
+ mode => '0775',
+ before => Service['parsoid'],
+ }
+
+ $parsoid_log_file = '/var/log/parsoid/parsoid.log'
+ $parsoid_node_path = '/usr/lib/parsoid/deploy/node_modules'
+ # default local settings -- test setups provide their own settings
+ $parsoid_settings_file = '/usr/lib/parsoid/src/localsettings.js'
+ $parsoid_base_path = '/usr/lib/parsoid/deploy/src'
+
+ #TODO: Duplication of code, deduplicate somehow
+ file { '/etc/default/parsoid':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => '0444',
+ content => template('misc/parsoid.default.erb'),
+ before => Service['parsoid'],
+ }
+
+ service { 'parsoid':
+ hasstatus => true,
+ hasrestart => true,
+ provider => 'upstart',
+ subscribe => [
+ File['/etc/default/parsoid'],
+ File['/etc/init/parsoid.conf'],
+ ],
+ }
}
diff --git a/manifests/site.pp b/manifests/site.pp
index 1459a65..03272d4 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2337,7 +2337,7 @@
# Right now, both rt-server and rt-clients run on the same node
# But, we are likely going to split them into different boxes soon.
node 'ruthenium.eqiad.wmnet' {
- role testsystem, parsoid-rt-server, parsoid-rt-client
+ role testsystem, parsoid::testing, parsoid-rt-server, parsoid-rt-client
}
# T95046 install/deploy scandium as zuul merger (ci) server
--
To view, visit https://gerrit.wikimedia.org/r/264024
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6e8405b296afe1970bc647076cbda02ee353054d
Gerrit-PatchSet: 7
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits