Commit ebe1cabf authored by Ivan Tyagov's avatar Ivan Tyagov

Add logrotate entries for nginx, apache and supervisord processes belonging to runner.

@rafael , @Nicolas , @klaus  please review. It's followup of !272 

/reviewed-on !275
parents 0e51360f 2ccb0a00
......@@ -19,7 +19,7 @@ md5sum = 713db528880282d568278f09458d2aab
[template-runner]
filename = instance-runner.cfg
md5sum = 7df86928aeef0fbada832b0283b9a454
md5sum = ab366caca157bfa9d61307939038dab3
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......@@ -35,7 +35,7 @@ md5sum = 98ce179badc6af5979a64a7c3d0a2ceb
[instance-runner-export]
filename = instance-runner-export.cfg.in
md5sum = 00ddcaa6e571505d1930612d12de8fde
md5sum = d1122988652127af5e252f1503eeacab
[template-resilient]
filename = instance-resilient.cfg.jinja2
......
......@@ -7,11 +7,13 @@ parts +=
nginx-launcher
certificate-authority
ca-nginx
logrotate-entry-nginx
gunicorn-launcher
gunicorn-graceful
publish-connection-information
slaprunner-promise
apache-httpd-promise
logrotate-entry-apache-httpd
slaprunner-supervisord-wrapper
runner-sshd-add-authorized-key
runner-sshd-graceful
......@@ -30,6 +32,7 @@ parts +=
bash-profile
supervisord-wrapper
supervisord-promise
logrotate-entry-supervisord
httpd-graceful-wrapper
## Monitoring part
## Monitor for runner
......
......@@ -4,10 +4,12 @@ parts =
nginx-launcher
certificate-authority
ca-nginx
logrotate-entry-nginx
gunicorn-launcher
gunicorn-graceful
publish-connection-information
slaprunner-promise
logrotate-entry-apache-httpd
apache-httpd-promise
slaprunner-supervisord-wrapper
runner-sshd-add-authorized-key
......@@ -27,6 +29,7 @@ parts =
bash-profile
supervisord-wrapper
supervisord-promise
logrotate-entry-supervisord
httpd-graceful-wrapper
{% if slapparameter_dict.get('no-ipv4-frontend', 'false') == 'false' %}
slaprunner-frontend-promise
......@@ -347,6 +350,12 @@ mode = 700
context =
section param_nginx_frontend nginx-frontend
[logrotate-entry-nginx]
<= logrotate-entry-base
name = nginx
log = $${basedirectory:log}/nginx.access.log $${basedirectory:log}/nginx.error.log
post = kill -SIGUSR1 $(cat $${buildout:directory}/var/run/nginx.pid)
[httpd-parameters]
path_pid = $${directory:run}/httpd.pid
path_error_log = $${directory:log}/httpd-error.log
......@@ -387,6 +396,12 @@ wait-for-files =
$${ca-nginx:cert-file}
$${ca-nginx:key-file}
[logrotate-entry-apache-httpd]
<= logrotate-entry-base
name = apache
log = $${basedirectory:log}/httpd-access.log $${basedirectory:log}/httpd-error.log
post = test ! -s $${buildout:directory}/var/run/httpd.pid || $${buildout:directory}/bin/slapos-kill --pidfile $${buildout:directory}/var/run/httpd.pid -s USR1
[httpd-graceful-wrapper]
recipe = collective.recipe.template
input = inline:
......@@ -777,6 +792,12 @@ recipe = slapos.cookbook:wrapper
command-line = $${buildout:directory}/bin/supervisord -c $${supervisord-conf:rendered} --nodaemon
wrapper-path = $${directory:services}/supervisord
[logrotate-entry-supervisord]
<= logrotate-entry-base
name = supervisord
log = $${basedirectory:log}/slapproxy.log $${basedirectory:log}/supervisord.log $${basedirectory:log}/supervisord-errors.log
post = kill -SIGUSR2 $(cat $${buildout:directory}/var/run/supervisord.pid)
[supervisord-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/supervisord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment