Commit 942d2f51 authored by Guillaume Hervier's avatar Guillaume Hervier

software/caddy-frontend: Use stack/logrotate instead of redoing it.

parent 7d90a118
......@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend]
filename = instance-apache-frontend.cfg.in
md5sum = 2c8e1dd8df4a225b4a8d8f70688a85ca
md5sum = 39b35496a8af756a89fdd83b54547f4c
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
......
......@@ -5,7 +5,6 @@ extends =
../../component/dash/buildout.cfg
../../component/caddy/buildout.cfg
../../component/gzip/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/rdiff-backup/buildout.cfg
../../component/trafficserver/buildout.cfg
......@@ -21,7 +20,6 @@ parts +=
template-caddy-replicate
caddy
dcron
logrotate
rdiff-backup
npm-modules
......@@ -83,7 +81,6 @@ caddy = ${caddy:output}
caddy_location = ${caddy:location}
curl = ${curl:location}
dash = ${dash:location}
dcron = ${dcron:location}
gzip = ${gzip:location}
logrotate = ${logrotate:location}
openssl = ${openssl:location}
......
......@@ -8,9 +8,6 @@ extends =
parts =
directory
configtest
logrotate
cron
cron-entry-logrotate
ca-frontend
ca-frontend-service
certificate-authority
......@@ -76,12 +73,6 @@ service = ${:etc}/service
etc-run = ${:etc}/run
promise = ${:etc}/promise
logrotate-backup = ${:backup}/logrotate
logrotate-entries = ${:etc}/logrotate.d
cron-entries = ${:etc}/cron.d
crontabs = ${:etc}/crontabs
cronstamps = ${:etc}/cronstamps
ca-dir = ${:srv}/ssl
varnginx = ${:var}/nginx
......@@ -367,64 +358,19 @@ apache-ca-certificate = ${configuration:apache-ca-certificate}
extra-context =
key content :apache-ca-certificate
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{ parameter_dict['dcron'] }}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${directory:service}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${directory:bin}/cron_simplelogger
log = ${directory:log}/cron.log
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
# Deploy Logrotate
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{ parameter_dict['logrotate'] }}/sbin/logrotate
gzip-binary = {{ parameter_dict['gzip'] }}/bin/gzip
gunzip-binary = {{ parameter_dict['gzip'] }}/bin/gunzip
# Directories
wrapper = ${directory:bin}/logrotate
conf = ${directory:etc}/logrotate.conf
logrotate-entries = ${directory:logrotate-entries}
backup = ${directory:logrotate-backup}
state-file = ${directory:srv}/logrotate.status
[logrotate-entry-caddy]
<= logrotate
recipe = slapos.cookbook:logrotate.d
<= logrotate-entry-base
name = caddy
log = ${caddy-configuration:error-log} ${caddy-configuration:access-log}
frequency = daily
rotatep-num = 30
rotate-num = 30
post = ${frontend-caddy-lazy-graceful:rendered} &
sharedscripts = true
notifempty = true
create = true
[logrotate-entry-nginx]
<= logrotate
recipe = slapos.cookbook:logrotate.d
<= logrotate-entry-base
name = caddy-nginx
log = ${nginx-configuration:error_log} ${nginx-configuration:access_log}
frequency = daily
rotatep-num = 30
rotate-num = 30
post = ${nginx-configuration:nginx-graceful-command}
sharedscripts = true
notifempty = true
create = true
#################
# Trafficserver
......
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