Hashar has uploaded a new change for review.

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


Change subject: beta: let jenkins-deploy restart Parsoid
......................................................................

beta: let jenkins-deploy restart Parsoid

On the beta cluster, the Parsoid daemon runs on a dedicated instance
deployment-parsoid2.pmtpa.wmflabs.  The code is updated on
deployment-bastion using the jenkins-deploy user, we then need to
restart the parsoid daemon, that is going to be done via ssh from the
bastion to parsoid2 as user jenkins-deploy.

The sequence is roughly:

 script on deployment-bastion as jenkins-deploy
 ssh jenkins-deploy2@deployment-parsoid2
 > sudo -u parsoid /etc/init.d/parsoid restart

The deployment-parsoid2 already has the role::parsoid::beta class.

bug: 57233
Change-Id: Ie1d4c35a12fbc30b622f0754bf2956f55598844c
---
M manifests/role/parsoid.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/98685/1

diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index 62bcaad..6f6607a 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -77,6 +77,13 @@
 
     include role::parsoid::common
 
+    sudo_user { 'jenkins-deploy': privileges => [
+        # Need to allow jenkins-deploy to reload parsoid
+        # Since the "parsoid" user is local, we cant add the sudo policy in
+        # OpenStack manager interface at wikitech
+        'ALL = (parsoid) NOPASSWD:/etc/init.d/parsoid',
+    ] }
+
     file { '/var/lib/parsoid/Parsoid':
         ensure => link,
         target => 
'/data/project/apache/common-local/php-master/extensions/Parsoid',

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

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

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

Reply via email to