* [gentoo-commits] gentoo-x86 commit in dev-python/mwlib/files: nserve.logrotate 0.15.8-nslave-add-address-parameter.patch nserve.confd mwlib-purge-cache.cron mw-qserve.confd postman.logrotate nserve.initd postman.confd postman.initd mw-qserve.initd nslave.initd nslave.logrotate mw-qserve.logrotate nslave.confd
@ 2013-07-01 13:56 Tiziano Mueller (dev-zero)
0 siblings, 0 replies; only message in thread
From: Tiziano Mueller (dev-zero) @ 2013-07-01 13:56 UTC (permalink / raw
To: gentoo-commits
dev-zero 13/07/01 13:56:29
Added: nserve.logrotate
0.15.8-nslave-add-address-parameter.patch
nserve.confd mwlib-purge-cache.cron mw-qserve.confd
postman.logrotate nserve.initd postman.confd
postman.initd mw-qserve.initd nslave.initd
nslave.logrotate mw-qserve.logrotate nslave.confd
Log:
Add init.d scripts to manage servers, thanks to Pat Kläy and Christian Affolter. Add patch which adds an address parameter to nslave.
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 0x1E0CA85F!)
Revision Changes Path
1.1 dev-python/mwlib/files/nserve.logrotate
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.logrotate?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.logrotate?rev=1.1&content-type=text/plain
Index: nserve.logrotate
===================================================================
/var/log/mwlib/nserve.log {
su mwlib mwlib
missingok
postrotate
/etc/init.d/nserve restart > /dev/null 2>&1
endscript
}
1.1 dev-python/mwlib/files/0.15.8-nslave-add-address-parameter.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/0.15.8-nslave-add-address-parameter.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/0.15.8-nslave-add-address-parameter.patch?rev=1.1&content-type=text/plain
Index: 0.15.8-nslave-add-address-parameter.patch
===================================================================
diff --git a/mwlib/nslave.py b/mwlib/nslave.py
index d3f8fc0..cccfc7a 100755
--- a/mwlib/nslave.py
+++ b/mwlib/nslave.py
@@ -184,7 +184,7 @@ class commands(object):
return doit(**params)
-def start_serving_files(cachedir, port):
+def start_serving_files(cachedir, address, port):
from gevent.pywsgi import WSGIServer
from bottle import route, static_file, default_app
cachedir = os.path.abspath(cachedir)
@@ -195,7 +195,7 @@ def start_serving_files(cachedir, port):
if filename.endswith(".rl"):
response.headers["Content-Disposition"] = "inline; filename=collection.pdf"
return response
- s = WSGIServer(("", port), default_app())
+ s = WSGIServer((address, port), default_app())
s.start()
return s
@@ -212,10 +212,11 @@ def make_cachedir(cachedir):
def main():
global cachedir, cacheurl
numgreenlets = 10
+ http_address = 'localhost'
http_port = 8898
serve_files = True
from mwlib import argv
- opts, args = argv.parse(sys.argv[1:], "--no-serve-files --serve-files-port= --serve-files --cachedir= --url= --numprocs=")
+ opts, args = argv.parse(sys.argv[1:], "--no-serve-files --serve-files-port= --serve-files-address= --serve-files --cachedir= --url= --numprocs=")
for o, a in opts:
if o == "--cachedir":
cachedir = a
@@ -227,12 +228,14 @@ def main():
serve_files = False
elif o == "--serve-files-port":
http_port = int(a)
+ elif o == "--serve-files-address":
+ http_address = str(a)
if cachedir is None:
sys.exit("nslave: missing --cachedir argument")
if serve_files:
- wsgi_server = start_serving_files(cachedir, http_port)
+ wsgi_server = start_serving_files(cachedir, http_address, http_port)
port = wsgi_server.socket.getsockname()[1]
if not cacheurl:
cacheurl = "http://%s:%s/cache" % (find_ip(), port)
1.1 dev-python/mwlib/files/nserve.confd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.confd?rev=1.1&content-type=text/plain
Index: nserve.confd
===================================================================
# The port on which the mw-qserve service is listening
MW_QSERVE_PORT=14311
# The interface on which the mw-qserve is listening (for example: 127.0.0.1)
MW_QSERVE_INTERFACE="127.0.0.1"
# The port to listen to
NSERVE_PORT=8899
# The interface to listen to (for example: 127.0.0.1)
NSERVE_INTERFACE="127.0.0.1"
# The user running the nserve service, defaults to 'mwlib'
# NSERVE_USER="mwlib"
# The group running the nserve service, defaults to 'mwlib'
# NSERVE_GROUP="mwlib"
# The logfile collecting all output from stdout and stderr, comment out for no logging
NSERVE_LOGFILE="/var/log/mwlib/nserve.log"
1.1 dev-python/mwlib/files/mwlib-purge-cache.cron
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mwlib-purge-cache.cron?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mwlib-purge-cache.cron?rev=1.1&content-type=text/plain
Index: mwlib-purge-cache.cron
===================================================================
# purge mw-serve cache directory
# --cache-dir=DIR: the NSLAVE_CACHEDIR directory specified in /etc/conf.d/nslave
# --purge-cache=HOURS: remove cache files that have not been touched for at east HOURS hours
00 23 * * * sudo -u mwlib mw-serve-ctl --cache-dir=/var/cache/mw-serve --purge-cache=24
1.1 dev-python/mwlib/files/mw-qserve.confd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.confd?rev=1.1&content-type=text/plain
Index: mw-qserve.confd
===================================================================
# The port to listen to
MW_QSERVE_PORT=14311
# The interface to listen to (for example: 127.0.0.1)
MW_QSERVE_INTERFACE="127.0.0.1"
# The user running the mw-qserve service, defaults to 'mwlib'
# MW_QSERVE_USER="mwlib"
# The group running the mq-qserve service, defaults to 'mwlib'
# MW_QSERVE_GROUP="mwlib"
# The logfile collecting all output from stdout and stderr, comment out for no logging
MW_QSERVE_LOGFILE="/var/log/mwlib/mw-qserve.log"
1.1 dev-python/mwlib/files/postman.logrotate
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.logrotate?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.logrotate?rev=1.1&content-type=text/plain
Index: postman.logrotate
===================================================================
/var/log/mwlib/postman.log {
su mwlib mwlib
missingok
postrotate
/etc/init.d/postman restart > /dev/null 2>&1
endscript
}
1.1 dev-python/mwlib/files/nserve.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nserve.initd?rev=1.1&content-type=text/plain
Index: nserve.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib/files/nserve.initd,v 1.1 2013/07/01 13:56:29 dev-zero Exp $
description="nserve is a HTTP server which distributes received jobs to a mw-qserve instance"
command="/usr/bin/nserve"
command_args="--port=${NSERVE_PORT} \
--interface=${NSERVE_INTERFACE} \
--qserve=${MW_QSERVE_INTERFACE}:${MW_QSERVE_PORT}"
pidfile="/var/run/${SVCNAME}.pid"
command_background="yes"
start_stop_daemon_args="--user ${NSERVE_USER:-mwlib} \
--group ${NSERVE_GROUP:-mwlib} \
${NSERVE_LOGFILE:+--stderr ${NSERVE_LOGFILE}} \
${NSERVE_LOGFILE:+--stdout ${NSERVE_LOGFILE}}"
depend() {
need net localmount
use mw-qserve
}
1.1 dev-python/mwlib/files/postman.confd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.confd?rev=1.1&content-type=text/plain
Index: postman.confd
===================================================================
# The cache-directory to which the collections are saved, make sure you enter
# the same directory as in /etc/conf.d/nslave
POSTMAN_CACHEDIR="/var/cache/mwlib/"
# The user running the postman service, defaults to 'mwlib'
# POSTMAN_USER="mwlib"
# The group running the postman service, defaults to 'mwlib'
# POSTMAN_GROUP="mwlib"
# The logfile collecting all output from stdout and stderr, comment out for no logging
POSTMAN_LOGFILE="/var/log/mwlib/postman.log"
1.1 dev-python/mwlib/files/postman.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/postman.initd?rev=1.1&content-type=text/plain
Index: postman.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib/files/postman.initd,v 1.1 2013/07/01 13:56:29 dev-zero Exp $
description="postman uploads zip collections to pediapress in case someone likes to order printed books"
command="/usr/bin/postman"
command_args="--cachedir=${POSTMAN_CACHDIR}"
pidfile="/var/run/${SVCNAME}.pid"
command_background="yes"
start_stop_daemon_args="--user ${POSTMAN_USER:-mwlib} \
--group ${POSTMAN_GROUP:-mwlib} \
${POSTMAN_LOGFILE:+--stderr ${POSTMAN_LOGFILE}} \
${POSTMAN_LOGFILE:+--stdout ${POSTMAN_LOGFILE}}"
depend() {
need net localmount
}
1.1 dev-python/mwlib/files/mw-qserve.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.initd?rev=1.1&content-type=text/plain
Index: mw-qserve.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib/files/mw-qserve.initd,v 1.1 2013/07/01 13:56:29 dev-zero Exp $
description="mw-qserve is a job queue server used to distribute and manage jobs"
command="/usr/bin/mw-qserve"
command_args="--interface=${MW_QSERVE_INTERFACE} --port=${MW_QSERVE_PORT}"
pidfile="/var/run/${SVCNAME}.pid"
command_background="yes"
start_stop_daemon_args="--user ${MW_QSERVE_USER:-mwlib} \
--group ${MW_QSERVE_GROUP:-mwlib} \
${MW_QSERVE_LOGFILE:+--stderr ${MW_QSERVE_LOGFILE}} \
${MW_QSERVE_LOGFILE:+--stdout ${MW_QSERVE_LOGFILE}}"
depend() {
need net localmount
}
1.1 dev-python/mwlib/files/nslave.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.initd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.initd?rev=1.1&content-type=text/plain
Index: nslave.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib/files/nslave.initd,v 1.1 2013/07/01 13:56:29 dev-zero Exp $
description="nslave pulls new jobs from a mw-qserve instance"
command="/usr/bin/nslave"
command_args="--cachedir=${NSLAVE_CACHEDIR} \
--serve-files-address=${NSLAVE_ADDRESS} \
--serve-files-port=${NSLAVE_PORT} \
--url=${NSLAVE_URL} \
--numprocs=${NSLAVE_NUMPROCS}"
pidfile="/var/run/${SVCNAME}.pid"
command_background="yes"
start_stop_daemon_args="--user ${NSLAVE_USER:-mwlib} \
--group ${NSLAVE_GROUP:-mwlib} \
${NSLAVE_LOGFILE-:+-stderr ${NSLAVE_LOGFILE}} \
${NSLAVE_LOGFILE:+--stdout ${NSLAVE_LOGFILE}} \
--umask ${NSLAVE_UMASK}"
depend() {
need net localmount
use mw-qserve
}
1.1 dev-python/mwlib/files/nslave.logrotate
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.logrotate?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.logrotate?rev=1.1&content-type=text/plain
Index: nslave.logrotate
===================================================================
/var/log/mwlib/nslave.log {
su mwlib mwlib
missingok
postrotate
/etc/init.d/nslave restart > /dev/null 2>&1
endscript
}
1.1 dev-python/mwlib/files/mw-qserve.logrotate
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.logrotate?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/mw-qserve.logrotate?rev=1.1&content-type=text/plain
Index: mw-qserve.logrotate
===================================================================
/var/log/mwlib/mw-qserve.log {
su mwlib mwlib
missingok
postrotate
/etc/init.d/mw-qserve restart > /dev/null 2>&1
endscript
}
1.1 dev-python/mwlib/files/nslave.confd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.confd?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/mwlib/files/nslave.confd?rev=1.1&content-type=text/plain
Index: nslave.confd
===================================================================
# The address to serve the rendered files to the wiki
NSLAVE_ADDRESS="localhost"
# The port to serve the rendered files to the wiki
NSLAVE_PORT=8898
# The url to serve the rendered files to the wiki
NSLAVE_URL="http://${NSLAVE_ADDRESS}:${NSLAVE_PORT}"
# The directory to save the rendered PDFs to
NSLAVE_CACHEDIR="/var/cache/mwlib/"
# The umask to create files in NSLAVE_CACHEDIR
NSLAVE_UMASK=027
# How many greenlets are allowed to run in parallel
NSLAVE_NUMPROCS=10
# The user running the nserve service, defaults to 'mwlib'
# NSLAVE_USER="mwlib"
# The group running the nserve service, defaults to 'mwlib'
# NSLAVE_GROUP="mwlib"
# The logfile collecting all output from stdout and stderr, comment out for no logging
NSLAVE_LOGFILE="/var/log/mwlib/nslave.log"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-01 13:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 13:56 [gentoo-commits] gentoo-x86 commit in dev-python/mwlib/files: nserve.logrotate 0.15.8-nslave-add-address-parameter.patch nserve.confd mwlib-purge-cache.cron mw-qserve.confd postman.logrotate nserve.initd postman.confd postman.initd mw-qserve.initd nslave.initd nslave.logrotate mw-qserve.logrotate nslave.confd Tiziano Mueller (dev-zero)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox