mirror of https://github.com/zulip/zulip.git
puppet: Run zephyr_mirror.py via supervisord.
(imported from commit 09086a1dd298e7ee9b655ccd6c58ac720bbc7798)
This commit is contained in:
parent
00279ae705
commit
c7be859d21
|
@ -0,0 +1,11 @@
|
||||||
|
[program:zmirror]
|
||||||
|
command=python /home/humbug/humbug/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --enable-log=/home/humbug/all_zephyrs_log --forward-class-messages --enable-log=/home/humbug/logs/mirror-log
|
||||||
|
priority=200 ; the relative start priority (default 999)
|
||||||
|
autostart=true ; start at supervisord start (default: true)
|
||||||
|
autorestart=true ; whether/when to restart (default: unexpected)
|
||||||
|
stopsignal=TERM ; signal used to kill process (default TERM)
|
||||||
|
stopwaitsecs=30 ; max num secs to wait b4 SIGKILL (default 10)
|
||||||
|
user=humbug ; setuid to this UNIX account to run the program
|
||||||
|
redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||||
|
stdout_logfile=/var/log/humbug/zmirror.log ; stdout log path, NONE for none; default AUTO
|
||||||
|
environment=HOME="/home/humbug",USER="humbug"
|
|
@ -1,5 +1,6 @@
|
||||||
class zulip::zmirror {
|
class zulip::zmirror {
|
||||||
class { 'zulip::base': }
|
class { 'zulip::base': }
|
||||||
|
class { 'zulip::supervisor': }
|
||||||
|
|
||||||
$zmirror_packages = [ "cython", "libzephyr-dev", "comerr-dev", "python-dev", "libzephyr4-krb5", "zephyr-clients",
|
$zmirror_packages = [ "cython", "libzephyr-dev", "comerr-dev", "python-dev", "libzephyr4-krb5", "zephyr-clients",
|
||||||
"krb5-config", "krb5-user", "krb5-clients", "debathena-kerberos-config", "debathena-zephyr-config"]
|
"krb5-config", "krb5-user", "krb5-clients", "debathena-kerberos-config", "debathena-zephyr-config"]
|
||||||
|
@ -12,11 +13,18 @@ class zulip::zmirror {
|
||||||
group => "root",
|
group => "root",
|
||||||
source => 'puppet:///modules/zulip/debathena.list',
|
source => 'puppet:///modules/zulip/debathena.list',
|
||||||
}
|
}
|
||||||
|
file { "/etc/supervisor/conf.d/zmirror.conf":
|
||||||
|
require => Package[supervisor],
|
||||||
|
ensure => file,
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
mode => 644,
|
||||||
|
source => "puppet:///modules/zulip/supervisord/conf.d/zmirror.conf",
|
||||||
|
notify => Service["supervisor"],
|
||||||
|
}
|
||||||
|
|
||||||
# TODO: Do the rest of our setup, which includes at least:
|
# TODO: Do the rest of our setup, which includes at least:
|
||||||
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
# Building python-zephyr after cloning it from https://github.com/ebroder/python-zephyr
|
||||||
# Putting tabbott/extra's keytab on the system at /home/humbug/tabbott.extra.keytab
|
# Putting tabbott/extra's keytab on the system at /home/humbug/tabbott.extra.keytab
|
||||||
# Setting api/bots/zephyr-mirror-crontab to be the humbug user's crontab
|
# Setting api/bots/zephyr-mirror-crontab to be the humbug user's crontab
|
||||||
# Running the mirroring bot in a screen session with these arguments:
|
|
||||||
# /home/humbug/api/bots/zephyr_mirror.py --root-path=/home/humbug/ --user=tabbott/extra --enable-log=/home/humbug/all_zephyrs_log --forward-class-messages
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue