jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/329599 )
Change subject: Zotero: Migrate to SystemD
......................................................................
Zotero: Migrate to SystemD
Bug: T154274
Change-Id: I5bdc8f5c424412f49782897a4bbc084ef50964fc
---
M puppet/modules/zotero/manifests/init.pp
A puppet/modules/zotero/templates/systemd.service.erb
D puppet/modules/zotero/templates/upstart.conf.erb
3 files changed, 28 insertions(+), 39 deletions(-)
Approvals:
BryanDavis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/puppet/modules/zotero/manifests/init.pp
b/puppet/modules/zotero/manifests/init.pp
index 139fd84..0fc2487 100644
--- a/puppet/modules/zotero/manifests/init.pp
+++ b/puppet/modules/zotero/manifests/init.pp
@@ -58,12 +58,12 @@
group => $::share_group,
}
- file { '/etc/init/zotero.conf':
+ file { '/lib/systemd/system/zotero.service':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
- content => template('zotero/upstart.conf.erb'),
+ content => template('zotero/systemd.service.erb'),
notify => Service['zotero'],
}
@@ -84,7 +84,8 @@
enable => true,
hasstatus => true,
hasrestart => true,
- provider => 'upstart',
- subscribe => File['/etc/init/zotero.conf'],
+ provider => 'systemd',
+ require => File['/lib/systemd/system/zotero.service'],
+ subscribe => File['/lib/systemd/system/zotero.service'],
}
}
diff --git a/puppet/modules/zotero/templates/systemd.service.erb
b/puppet/modules/zotero/templates/systemd.service.erb
new file mode 100644
index 0000000..d4f0ecb
--- /dev/null
+++ b/puppet/modules/zotero/templates/systemd.service.erb
@@ -0,0 +1,23 @@
+# NOTE: This file is managed by Puppet
+# Systemd unit for Zotero
+[Unit]
+Description="Zotero service"
+After=network.target
+
+[Service]
+# up ulimit -n a bit
+LimitNOFILE=10000
+User=www-data
+Group=www-data
+Environment="LD_LIBRARY_PATH=/usr/lib/xulrunner-24.0/"
+Restart=always
+RestartSec=2s
+# wait 60 seconds for a graceful restart before killing the master
+TimeoutStopSec=60
+# The xulrunner-dev package installs a non-executable
+# /usr/lib/xulrunner-devel-24.0/sdk/bin/xpcshell
+# Work around that by invoking ld-linux-x86-64.so.2 first.
+ExecStart=/lib64/ld-linux-x86-64.so.2
/usr/lib/xulrunner-devel-24.0/sdk/bin/xpcshell -g /usr/lib/xulrunner-24.0/ -a
<%= @base_path %>/translation-server -mn -v 180 <%= @base_path
%>/translation-server/translation-server/init.js >> <%= @log_file %> 2>&1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/puppet/modules/zotero/templates/upstart.conf.erb
b/puppet/modules/zotero/templates/upstart.conf.erb
deleted file mode 100644
index b92e516..0000000
--- a/puppet/modules/zotero/templates/upstart.conf.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-# vim: set ft=upstart:
-
-# This file is managed by Puppet
-# Upstart init script for Zotero
-
-description "Zotero HTTP service (dependency of Citoid)"
-
-start on mediawiki-ready
-stop on runlevel [016]
-
-# up ulimit -n a bit
-limit nofile 10000 10000
-
-setuid "www-data"
-setgid "www-data"
-
-respawn
-respawn limit 5 10
-
-# wait 60 seconds for a graceful restart before killing the master
-kill timeout 60
-
-env LD_LIBRARY_PATH=/usr/lib/xulrunner-24.0/
-
-# The xulrunner-dev package installs a non-executable
-# /usr/lib/xulrunner-devel-24.0/sdk/bin/xpcshell
-# Work around that by invoking ld-linux-x86-64.so.2 first.
-exec /lib64/ld-linux-x86-64.so.2 \
- /usr/lib/xulrunner-devel-24.0/sdk/bin/xpcshell \
- -g /usr/lib/xulrunner-24.0/ \
- -a <%= @base_path %>/translation-server \
- -mn \
- -v 180 \
- <%= @base_path %>/translation-server/translation-server/init.js \
- >> <%= @log_file %> 2>&1
--
To view, visit https://gerrit.wikimedia.org/r/329599
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5bdc8f5c424412f49782897a4bbc084ef50964fc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: jessie-migration
Gerrit-Owner: Mobrovac <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Mvolz <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits