Commit 4c33fa8c authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Thomas Gambier

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

parent 5107d40b
......@@ -14,11 +14,11 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = f0cab61c7b8478afb8b676fc725d50d5
md5sum = c44a7481bb85e3258128afe3fcf23f44
[template-runner]
filename = instance-runner.cfg
md5sum = 7c48c89f33ad243f0dffb3eeef8c56e8
md5sum = 8882bc63d615d8a2cd6de3d32b1013e0
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......@@ -26,11 +26,11 @@ md5sum = ed6dc50713c14e2527b9958d98674eed
[instance-runner-import]
filename = instance-runner-import.cfg.in
md5sum = 1ed9526a6e5ac9a80e5b3add2d0a88fe
md5sum = 238466e8045096c09534e1d01b1befd6
[instance-runner-export]
filename = instance-runner-export.cfg.in
md5sum = 4b19026c50af55c8b7387aeaf624b47c
md5sum = b992bb3391de9d6d422bfa8011d8ffc4
[template-resilient]
filename = instance-resilient.cfg.jinja2
......
......@@ -76,6 +76,10 @@ instance-configuration =
httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output}
configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
# Extends publish section with resilient parameters
[publish-connection-information]
<= resilient-publish-connection-parameter
......
......@@ -189,11 +189,11 @@ configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
${directory:logrotate-backup}
$${logrotate-directory:logrotate-backup}
[post-notification-run]
recipe = slapos.cookbook:wrapper
command-line = {{ software_release_bin }}/runner-importer-post-notification-run --diff-file ${:diff-file} --proof-signature-file ${:proof-signature-file} --srv-path ${directory:srv} --backup-path ${directory:backup}
wrapper-path = ${rootdirectory:bin}/post-notification-run
output = ${:wrapper-path}
mode = 0700
\ No newline at end of file
mode = 0700
......@@ -51,7 +51,9 @@ common-runner-parts =
template-slapuser-script
parts = $${:common-runner-parts}
extends = ${monitor2-template:rendered}
extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -882,6 +884,10 @@ instance-configuration =
httpdcors cors-domain $${slaprunner-httpd-cors:location} $${httpd-graceful-wrapper:output}
configuration-file-path = $${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
[monitor-check-webrunner-internal-instance]
recipe = slapos.recipe.template:jinja2
template = ${monitor-check-webrunner-internal-instance:location}/${monitor-check-webrunner-internal-instance:filename}
......
......@@ -5,7 +5,8 @@ parts =
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
extends = ${template-resilient-templates:output}
extends =
${template-resilient-templates:output}
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
......
......@@ -24,6 +24,7 @@ extends =
../../stack/slapos.cfg
../../stack/flask.cfg
../../stack/resilient/buildout.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg
# stacks are listed from most generic to most specific,
......
......@@ -14,7 +14,7 @@
# not need these here).
[pbsready]
filename = pbsready.cfg.in
md5sum = 367f8b8a09c3098844739f9b2856b912
md5sum = 516482f89d7a3ebe4458a404eb4a575b
[pbsready-import]
filename = pbsready-import.cfg.in
......@@ -26,7 +26,7 @@ md5sum = c6c11db5372150019debb1ce519b907d
[template-pull-backup]
filename = instance-pull-backup.cfg.in
md5sum = 4cff5dc82428256929ecbf21cd918c00
md5sum = 57b9b421d233402e6d5177c69cf9567e
[template-replicated]
filename = template-replicated.cfg.in
......
......@@ -3,10 +3,7 @@
parts =
publish-connection-information
pbs
logrotate
logrotate-entry-notifier
cron
cron-entry-logrotate
pbs-sshkeys-authority
sshkeys-openssh
resilient-genstatrss-wrapper
......@@ -19,7 +16,9 @@ parts =
monitor-base
monitor-check-resilient-feed-file
extends = ${monitor2-template:rendered}
extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
......@@ -49,8 +48,6 @@ notifier = $${rootdirectory:etc}/notifier
[directory]
recipe = slapos.cookbook:mkdirectory
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
......@@ -151,69 +148,13 @@ name = resilient-pbs-status-feed
frequency = */5 * * * *
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]
recipe = collective.recipe.template
mode = 600
input = inline:
$${directory:notifier-feeds}/* {
rotate 5
weekly
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
<= logrotate-entry-base
name = notifier
log = $${directory:notifier-feeds}/*
rotate-num = 5
frequency = weekly
nocompress = true
#----------------
#--
......@@ -324,7 +265,7 @@ password = $${slap-parameter:monitor-password}
[monitor-conf-parameters]
private-path-list +=
$${directory:logrotate-backup}
$${logrotate-directory:logrotate-backup}
$${basedirectory:log}
[monitor-check-resilient-feed-file]
......
......@@ -56,8 +56,6 @@ notifier-status-items = $${basedirectory:notifier}/status-items
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cgi-bin = $${rootdirectory:srv}/cgi-bin
monitor-resilient = $${monitor-directory:private}/resilient
......
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