Commit a7d717e2 authored by Guillaume Hervier's avatar Guillaume Hervier

stack/resilient: Use stack/logrotate instead of redoing it.

parent d63a5a66
...@@ -26,7 +26,7 @@ md5sum = c6c11db5372150019debb1ce519b907d ...@@ -26,7 +26,7 @@ md5sum = c6c11db5372150019debb1ce519b907d
[template-pull-backup] [template-pull-backup]
filename = instance-pull-backup.cfg.in filename = instance-pull-backup.cfg.in
md5sum = 4cff5dc82428256929ecbf21cd918c00 md5sum = b3a836991635bac5fa5dff0b3ad1c4d1
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
......
...@@ -3,10 +3,7 @@ ...@@ -3,10 +3,7 @@
parts = parts =
publish-connection-information publish-connection-information
pbs pbs
logrotate
logrotate-entry-notifier logrotate-entry-notifier
cron
cron-entry-logrotate
pbs-sshkeys-authority pbs-sshkeys-authority
sshkeys-openssh sshkeys-openssh
resilient-genstatrss-wrapper resilient-genstatrss-wrapper
...@@ -49,8 +46,6 @@ notifier = $${rootdirectory:etc}/notifier ...@@ -49,8 +46,6 @@ notifier = $${rootdirectory:etc}/notifier
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs crontabs = $${rootdirectory:etc}/crontabs
...@@ -151,69 +146,13 @@ name = resilient-pbs-status-feed ...@@ -151,69 +146,13 @@ name = resilient-pbs-status-feed
frequency = */5 * * * * frequency = */5 * * * *
command = $${pbs-resilient-status-feed:wrapper-path} command = $${pbs-resilient-status-feed:wrapper-path}
#----------------
#--
#-- Deploy cron.
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
#----------------
#--
#-- Deploy logrotate.
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${rootdirectory:bin}/logrotate
conf = $${rootdirectory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status
[logrotate-entry-cron]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = cron
log = $${cron-simplelogger:log}
frequency = daily
rotate-num = 30
[logrotate-entry-notifier] [logrotate-entry-notifier]
recipe = collective.recipe.template <= logrotate-entry-base
mode = 600 name = notifier
input = inline: log = $${directory:notifier-feeds}/*
$${directory:notifier-feeds}/* { rotate-num = 5
rotate 5 frequency = weekly
weekly nocompress = true
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
#---------------- #----------------
#-- #--
......
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