GWicke has uploaded a new change for review.

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

Change subject: WIP: Phase 2 of switching to the new Parsoid deploy system
......................................................................

WIP: Phase 2 of switching to the new Parsoid deploy system

Follow-up to Iad299f0e43f309409a98d3f32d1ac9a3851228c3.

- remove custom deploy script that is no longer needed

- switch to upstart by default and remove references to init file and old repo

Change-Id: I2b3cc40ef2ede8d0212d4039d240c214e4a30866
---
M manifests/role/parsoid.pp
D modules/deployment/files/modules/parsoid.py
2 files changed, 6 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/110617/1

diff --git a/manifests/role/parsoid.pp b/manifests/role/parsoid.pp
index e33a56f..622cc58 100644
--- a/manifests/role/parsoid.pp
+++ b/manifests/role/parsoid.pp
@@ -66,7 +66,7 @@
     # Use name that does not match the 'parsoid' service name for now to avoid
     # it taking precedence over the init script
     # TODO: remove init script and rename back to parsoid.conf
-    file { '/etc/init/parsoid-test.conf':
+    file { '/etc/init/parsoid.conf':
         ensure  => present,
         owner   => root,
         group   => root,
@@ -108,7 +108,11 @@
         hasstatus  => true,
         hasrestart => true,
         enable     => true,
-        require    => File['/etc/init.d/parsoid'],
+        provider   => 'upstart',
+        subscribe  => [
+            File['/etc/default/parsoid'],
+            File['/etc/init/parsoid.conf'],
+        ],
     }
 
     monitor_service { 'parsoid':
diff --git a/modules/deployment/files/modules/parsoid.py 
b/modules/deployment/files/modules/parsoid.py
deleted file mode 100644
index ce1d68e..0000000
--- a/modules/deployment/files/modules/parsoid.py
+++ /dev/null
@@ -1,36 +0,0 @@
-'''
-Parsoid deployment module for git-deploy / salt
-'''
-
-import os
-import subprocess
-
-
-def config_symlink(repo):
-    '''
-    Put a localsettings.js symlink in the Parsoid checkout pointing to the
-    config checkout
-    '''
-    config = __salt__['deploy.get_config'](repo)
-    lsSymlinkPath = config['location'] + '/js/api/localsettings.js'
-    nmSymlinkPath = config['location'] + '/js/node_modules'
-    if not __salt__['file.file_exists'](lsSymlinkPath):
-        try:
-            os.symlink('../../../config/localsettings.js', lsSymlinkPath)
-        except OSError:
-            return 1
-    if not __salt__['file.file_exists'](nmSymlinkPath):
-        try:
-            os.symlink('../../config/node_modules', nmSymlinkPath)
-        except OSError:
-            return 1
-
-    return 0
-
-
-def restart_parsoid(repo):
-    '''
-    restart the parsoid service
-    '''
-    ret = subprocess.call("/etc/init.d/parsoid restart", shell=True)
-    return ret

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

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

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

Reply via email to