Commit 6a2e7859 authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Thomas Gambier

logrotate: Use xz instead of gzip for log file compression

- Use `xz-utils` component for log file compression
- Fix some stacks and software releases to use the logrotate stack instead of re-creating it:
  - `software/caddy-frontend`
  - `stack/resilient`

/reviewed-on nexedi/slapos!508
parents ad4c0241 8d3ba8b8
...@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b ...@@ -22,7 +22,7 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend] [template-apache-frontend]
filename = instance-apache-frontend.cfg.in filename = instance-apache-frontend.cfg.in
md5sum = e5fa926695de04c5bff54cd8128227a3 md5sum = abbbc8f24cdef389b9b2859b0ef8dd0e
[template-apache-replicate] [template-apache-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
...@@ -30,7 +30,7 @@ md5sum = 81ad603fe0a1e29948bd81b457e8d7a4 ...@@ -30,7 +30,7 @@ md5sum = 81ad603fe0a1e29948bd81b457e8d7a4
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = 8bed2dcba7904a765c29cf8349b7d5cc md5sum = dfbe4378610aa42f2cbc2a55d386324e
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
...@@ -122,4 +122,4 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8 ...@@ -122,4 +122,4 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8
[template-kedifa] [template-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = 66de9edcd66447271424be3d92c2cb90 md5sum = 5597b2184b445af69ad6d517d0729ad6
...@@ -5,7 +5,6 @@ extends = ...@@ -5,7 +5,6 @@ extends =
../../component/dash/buildout.cfg ../../component/dash/buildout.cfg
../../component/caddy/buildout.cfg ../../component/caddy/buildout.cfg
../../component/gzip/buildout.cfg ../../component/gzip/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
../../component/rdiff-backup/buildout.cfg ../../component/rdiff-backup/buildout.cfg
../../component/trafficserver/buildout.cfg ../../component/trafficserver/buildout.cfg
...@@ -22,7 +21,6 @@ parts += ...@@ -22,7 +21,6 @@ parts +=
template-caddy-replicate template-caddy-replicate
caddy caddy
dcron
logrotate logrotate
rdiff-backup rdiff-backup
npm-modules npm-modules
...@@ -97,6 +95,7 @@ context = ...@@ -97,6 +95,7 @@ context =
[template-frontend-parameter-section] [template-frontend-parameter-section]
common_profile = ${template-common:rendered} common_profile = ${template-common:rendered}
logrotate_base_instance = ${template-logrotate-base:rendered}
bin_directory = ${buildout:bin-directory} bin_directory = ${buildout:bin-directory}
...@@ -105,7 +104,6 @@ caddy = ${caddy:output} ...@@ -105,7 +104,6 @@ caddy = ${caddy:output}
caddy_location = ${caddy:location} caddy_location = ${caddy:location}
curl = ${curl:location} curl = ${curl:location}
dash = ${dash:location} dash = ${dash:location}
dcron = ${dcron:location}
gzip = ${gzip:location} gzip = ${gzip:location}
logrotate = ${logrotate:location} logrotate = ${logrotate:location}
openssl = ${openssl:location}/bin/openssl openssl = ${openssl:location}/bin/openssl
......
...@@ -5,13 +5,11 @@ ...@@ -5,13 +5,11 @@
extends = extends =
{{ parameter_dict['common_profile'] }} {{ parameter_dict['common_profile'] }}
{{ parameter_dict['monitor_template'] }} {{ parameter_dict['monitor_template'] }}
{{ parameter_dict['logrotate_base_instance'] }}
parts = parts =
directory directory
configtest configtest
logrotate
cron
cron-entry-logrotate
logrotate-entry-caddy logrotate-entry-caddy
logrotate-entry-nginx logrotate-entry-nginx
caddy-frontend caddy-frontend
...@@ -78,12 +76,6 @@ etc-run = ${:etc}/run ...@@ -78,12 +76,6 @@ etc-run = ${:etc}/run
promise = ${:etc}/promise promise = ${:etc}/promise
plugin = ${:etc}/plugin plugin = ${:etc}/plugin
logrotate-backup = ${:backup}/logrotate
logrotate-entries = ${:etc}/logrotate.d
cron-entries = ${:etc}/cron.d
crontabs = ${:etc}/crontabs
cronstamps = ${:etc}/cronstamps
ca-dir = ${:srv}/ssl ca-dir = ${:srv}/ssl
# BBB: SlapOS Master non-zero knowledge BEGIN # BBB: SlapOS Master non-zero knowledge BEGIN
bbb-ssl-dir = ${:srv}/bbb-ssl bbb-ssl-dir = ${:srv}/bbb-ssl
...@@ -148,6 +140,7 @@ context = ...@@ -148,6 +140,7 @@ context =
import json_module json import json_module json
import os_module os import os_module os
raw common_profile {{ parameter_dict['common_profile'] }} raw common_profile {{ parameter_dict['common_profile'] }}
raw logrotate_base_instance {{ parameter_dict['logrotate_base_instance'] }}
key slap_software_type :slap_software_type key slap_software_type :slap_software_type
key slapparameter_dict :slapparameter_dict key slapparameter_dict :slapparameter_dict
section directory directory section directory directory
...@@ -266,7 +259,6 @@ extra-context = ...@@ -266,7 +259,6 @@ extra-context =
key template_notebook_slave_configuration software-release-path:template-nginx-notebook-slave-virtualhost key template_notebook_slave_configuration software-release-path:template-nginx-notebook-slave-virtualhost
key software_type :software_type key software_type :software_type
key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered
section logrotate_dict logrotate
section frontend_configuration frontend-configuration section frontend_configuration frontend-configuration
section caddy_configuration caddy-configuration section caddy_configuration caddy-configuration
section nginx_configuration nginx-configuration section nginx_configuration nginx-configuration
...@@ -418,64 +410,19 @@ extra-context = ...@@ -418,64 +410,19 @@ extra-context =
key content :content key content :content
# BBB: SlapOS Master non-zero knowledge END # BBB: SlapOS Master non-zero knowledge END
[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-entry-caddy]
<= logrotate <= logrotate-entry-base
recipe = slapos.cookbook:logrotate.d
name = caddy name = caddy
log = ${caddy-configuration:error-log} ${caddy-configuration:access-log} log = ${caddy-configuration:error-log} ${caddy-configuration:access-log}
frequency = daily rotate-num = 30
rotatep-num = 30
post = ${frontend-caddy-lazy-graceful:rendered} & post = ${frontend-caddy-lazy-graceful:rendered} &
sharedscripts = true
notifempty = true
create = true
[logrotate-entry-nginx] [logrotate-entry-nginx]
<= logrotate <= logrotate-entry-base
recipe = slapos.cookbook:logrotate.d
name = caddy-nginx name = caddy-nginx
log = ${nginx-configuration:error_log} ${nginx-configuration:access_log} log = ${nginx-configuration:error_log} ${nginx-configuration:access_log}
frequency = daily rotate-num = 30
rotatep-num = 30
post = ${nginx-configuration:nginx-graceful-command} post = ${nginx-configuration:nginx-graceful-command}
sharedscripts = true
notifempty = true
create = true
################# #################
# Trafficserver # Trafficserver
...@@ -740,7 +687,7 @@ monitor-httpd-port = {{ monitor_httpd_port | int }} ...@@ -740,7 +687,7 @@ monitor-httpd-port = {{ monitor_httpd_port | int }}
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
${directory:logrotate-backup} ${logrotate-directory:logrotate-backup}
[monitor-traffic-summary-last-stats-wrapper] [monitor-traffic-summary-last-stats-wrapper]
......
...@@ -51,13 +51,6 @@ service = ${:etc}/service ...@@ -51,13 +51,6 @@ service = ${:etc}/service
etc-run = ${:etc}/run etc-run = ${:etc}/run
promise = ${:etc}/promise promise = ${:etc}/promise
logrotate-backup = ${:backup}/logrotate
logrotate-entries = ${:etc}/logrotate.d
cron-entries = ${:etc}/cron.d
crontabs = ${:etc}/crontabs
cronstamps = ${:etc}/cronstamps
# KeDiFa directories # KeDiFa directories
kedifa = ${:srv}/kedifa kedifa = ${:srv}/kedifa
etc-kedifa = ${:etc}/kedifa etc-kedifa = ${:etc}/kedifa
......
...@@ -24,12 +24,6 @@ context = ...@@ -24,12 +24,6 @@ context =
raw common_profile {{ common_profile }} raw common_profile {{ common_profile }}
${:extra-context} ${:extra-context}
{% do logrotate_dict.pop('recipe') %}
[logrotate]
{% for key, value in logrotate_dict.iteritems() %}
{{ key }} = {{ value }}
{% endfor %}
post = {{ frontend_lazy_graceful_reload }} & post = {{ frontend_lazy_graceful_reload }} &
frequency = daily frequency = daily
rotatep-num = 30 rotatep-num = 30
...@@ -82,7 +76,7 @@ output = {{ plugin_directory }}/${:name} ...@@ -82,7 +76,7 @@ output = {{ plugin_directory }}/${:name}
{% do part_list.extend([slave_ln_section]) %} {% do part_list.extend([slave_ln_section]) %}
{% do part_list.extend([slave_logrotate_section, slave_section_title]) %} {% do part_list.extend([slave_logrotate_section, slave_section_title]) %}
{% set slave_log_folder = logrotate_dict.get('backup') + '/' + slave_reference + "-logs" %} {% set slave_log_folder = '${logrotate-directory:logrotate-backup}/' + slave_reference + "-logs" %}
{# Pass HTTP2 switch #} {# Pass HTTP2 switch #}
{% do slave_instance.__setitem__('enable_http2_by_default', enable_http2_by_default) %} {% do slave_instance.__setitem__('enable_http2_by_default', enable_http2_by_default) %}
...@@ -161,8 +155,7 @@ extra-context = ...@@ -161,8 +155,7 @@ extra-context =
{# Set slave logrotate entry #} {# Set slave logrotate entry #}
[{{slave_logrotate_section}}] [{{slave_logrotate_section}}]
<= logrotate <= logrotate-entry-base
recipe = slapos.cookbook:logrotate.d
name = ${:_buildout_section_name_} name = ${:_buildout_section_name_}
log = {{slave_parameter_dict.get('access_log')}} {{slave_parameter_dict.get('error_log')}} log = {{slave_parameter_dict.get('access_log')}} {{slave_parameter_dict.get('error_log')}}
backup = {{ slave_log_folder }} backup = {{ slave_log_folder }}
...@@ -501,7 +494,10 @@ csr_id-url = https://[${expose-csr_id-configuration:ip}]:${expose-csr_id-configu ...@@ -501,7 +494,10 @@ csr_id-url = https://[${expose-csr_id-configuration:ip}]:${expose-csr_id-configu
csr_id-certificate = ${get-csr_id-certificate:certificate} csr_id-certificate = ${get-csr_id-certificate:certificate}
[buildout] [buildout]
extends = {{ common_profile }} extends =
{{ common_profile }}
{{ logrotate_base_instance }}
parts += parts +=
{% for part in part_list %} {% for part in part_list %}
{{ ' %s' % part }} {{ ' %s' % part }}
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch EXITED T-0:monitor-httpd-{hash}-on-watch EXITED
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch STOPPED ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch STOPPED
T-2:6tunnel-26012-{hash}-on-watch STOPPED T-2:6tunnel-26012-{hash}-on-watch STOPPED
T-2:bootstrap-monitor STOPPED T-2:bootstrap-monitor STOPPED
T-2:certificate_authority-{hash}-on-watch STOPPED T-2:certificate_authority-{hash}-on-watch STOPPED
T-2:crond-{hash} STOPPED T-2:crond-{hash}-on-watch STOPPED
T-2:crond-on-watch STOPPED
T-2:expose-csr_id-{hash}-on-watch STOPPED T-2:expose-csr_id-{hash}-on-watch STOPPED
T-2:frontend-caddy-safe-graceful STOPPED T-2:frontend-caddy-safe-graceful STOPPED
T-2:frontend-nginx-safe-graceful STOPPED T-2:frontend-nginx-safe-graceful STOPPED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
...@@ -36,8 +35,7 @@ T-3:6tunnel-26011-{hash}-on-watch STOPPED ...@@ -36,8 +35,7 @@ T-3:6tunnel-26011-{hash}-on-watch STOPPED
T-3:6tunnel-26012-{hash}-on-watch STOPPED T-3:6tunnel-26012-{hash}-on-watch STOPPED
T-3:bootstrap-monitor STOPPED T-3:bootstrap-monitor STOPPED
T-3:certificate_authority-{hash}-on-watch STOPPED T-3:certificate_authority-{hash}-on-watch STOPPED
T-3:crond-{hash} STOPPED T-3:crond-{hash}-on-watch STOPPED
T-3:crond-on-watch STOPPED
T-3:expose-csr_id-{hash}-on-watch STOPPED T-3:expose-csr_id-{hash}-on-watch STOPPED
T-3:frontend-caddy-safe-graceful STOPPED T-3:frontend-caddy-safe-graceful STOPPED
T-3:frontend-nginx-safe-graceful STOPPED T-3:frontend-nginx-safe-graceful STOPPED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
T-0:bootstrap-monitor EXITED T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash}-on-watch RUNNING T-0:certificate_authority-{hash}-on-watch RUNNING
T-0:crond-{hash} RUNNING T-0:crond-{hash}-on-watch RUNNING
T-0:monitor-httpd-{hash}-on-watch RUNNING T-0:monitor-httpd-{hash}-on-watch RUNNING
T-0:monitor-httpd-graceful EXITED T-0:monitor-httpd-graceful EXITED
T-1:caucase-updater-on-watch RUNNING T-1:caucase-updater-on-watch RUNNING
...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING ...@@ -16,8 +16,7 @@ T-2:6tunnel-26011-{hash}-on-watch RUNNING
T-2:6tunnel-26012-{hash}-on-watch RUNNING T-2:6tunnel-26012-{hash}-on-watch RUNNING
T-2:bootstrap-monitor EXITED T-2:bootstrap-monitor EXITED
T-2:certificate_authority-{hash}-on-watch RUNNING T-2:certificate_authority-{hash}-on-watch RUNNING
T-2:crond-{hash} RUNNING T-2:crond-{hash}-on-watch RUNNING
T-2:crond-on-watch RUNNING
T-2:expose-csr_id-{hash}-on-watch RUNNING T-2:expose-csr_id-{hash}-on-watch RUNNING
T-2:frontend-caddy-safe-graceful EXITED T-2:frontend-caddy-safe-graceful EXITED
T-2:frontend-nginx-safe-graceful EXITED T-2:frontend-nginx-safe-graceful EXITED
......
...@@ -51,7 +51,7 @@ md5sum = f634a5249b773658b7a7bc9fa9bb0368 ...@@ -51,7 +51,7 @@ md5sum = f634a5249b773658b7a7bc9fa9bb0368
[template-frontend] [template-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = cdb690495e9eb007d2b7d2f8e12f5c59 md5sum = 57a4be74e5afb00e378bc726cd7771f8
[template-ansible-promise] [template-ansible-promise]
filename = template/ansible-promise.in filename = template/ansible-promise.in
......
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
############################# #############################
[buildout] [buildout]
parts = parts =
logrotate
# logrotate-entry-frontend
cron
cron-entry-logrotate
ca-frontend ca-frontend
certificate-authority certificate-authority
frontend-promise-ipv6 frontend-promise-ipv6
...@@ -37,12 +33,7 @@ backup = $${rootdirectory:srv}/backup ...@@ -37,12 +33,7 @@ backup = $${rootdirectory:srv}/backup
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
ca-dir = $${rootdirectory:srv}/ssl ca-dir = $${rootdirectory:srv}/ssl
logrotate-backup = $${basedirectory:backup}/logrotate
logrotate-entries = $${rootdirectory:etc}/logrotate.d
[frontend-instance] [frontend-instance]
recipe = slapos.cookbook:kvm.frontend recipe = slapos.cookbook:kvm.frontend
...@@ -103,49 +94,8 @@ wrapper = $${basedirectory:services}/nodejs ...@@ -103,49 +94,8 @@ wrapper = $${basedirectory:services}/nodejs
# Put domain name # Put domain name
name = $${slap-parameter:domain} name = $${slap-parameter:domain}
[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}/cron.log
[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
[slap-parameter] [slap-parameter]
# Default value if no port is specified # Default value if no port is specified
port = 4443 port = 4443
http-redirection = 0 http-redirection = 0
slave_instance_list = slave_instance_list =
# [logrotate-entry-frontend]
# <= logrotate
# recipe = slapos.cookbook:logrotate.d
# name = frontend
# log = $${mariadb-instance:error-log} $${mariadb-instance:slow-query-log}
# post = $${mariadb-instance:mysql-binary} --no-defaults -B --socket=$${mariadb-instance:socket} -e "FLUSH LOGS"
...@@ -9,6 +9,7 @@ extends = ...@@ -9,6 +9,7 @@ extends =
../../component/openssl/buildout.cfg ../../component/openssl/buildout.cfg
../../component/netcat/buildout.cfg ../../component/netcat/buildout.cfg
../../component/pycurl/buildout.cfg ../../component/pycurl/buildout.cfg
../../component/gzip/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/nodejs/buildout.cfg ../../component/nodejs/buildout.cfg
../../stack/resilient/buildout.cfg ../../stack/resilient/buildout.cfg
......
...@@ -72,7 +72,7 @@ class ServicesTestCase(InstanceTestCase): ...@@ -72,7 +72,7 @@ class ServicesTestCase(InstanceTestCase):
] ]
expected_process_names = [ expected_process_names = [
'monitor-httpd-{hash}-on-watch', 'monitor-httpd-{hash}-on-watch',
'crond-{hash}', 'crond-{hash}-on-watch',
] ]
supervisor = self.getSupervisorRPCServer().supervisor supervisor = self.getSupervisorRPCServer().supervisor
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = f0cab61c7b8478afb8b676fc725d50d5 md5sum = c44a7481bb85e3258128afe3fcf23f44
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 7c48c89f33ad243f0dffb3eeef8c56e8 md5sum = 8882bc63d615d8a2cd6de3d32b1013e0
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -26,11 +26,11 @@ md5sum = ed6dc50713c14e2527b9958d98674eed ...@@ -26,11 +26,11 @@ md5sum = ed6dc50713c14e2527b9958d98674eed
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
md5sum = 1ed9526a6e5ac9a80e5b3add2d0a88fe md5sum = 238466e8045096c09534e1d01b1befd6
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
md5sum = 4b19026c50af55c8b7387aeaf624b47c md5sum = b992bb3391de9d6d422bfa8011d8ffc4
[template-resilient] [template-resilient]
filename = instance-resilient.cfg.jinja2 filename = instance-resilient.cfg.jinja2
......
...@@ -76,6 +76,10 @@ instance-configuration = ...@@ -76,6 +76,10 @@ instance-configuration =
httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output} httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output}
configuration-file-path = ${buildout:directory}/knowledge0.cfg configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
# Extends publish section with resilient parameters # Extends publish section with resilient parameters
[publish-connection-information] [publish-connection-information]
<= resilient-publish-connection-parameter <= resilient-publish-connection-parameter
......
...@@ -189,11 +189,11 @@ configuration-file-path = ${buildout:directory}/knowledge0.cfg ...@@ -189,11 +189,11 @@ configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
${directory:logrotate-backup} $${logrotate-directory:logrotate-backup}
[post-notification-run] [post-notification-run]
recipe = slapos.cookbook:wrapper 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} 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 wrapper-path = ${rootdirectory:bin}/post-notification-run
output = ${:wrapper-path} output = ${:wrapper-path}
mode = 0700 mode = 0700
\ No newline at end of file
...@@ -51,7 +51,9 @@ common-runner-parts = ...@@ -51,7 +51,9 @@ common-runner-parts =
template-slapuser-script template-slapuser-script
parts = $${:common-runner-parts} parts = $${:common-runner-parts}
extends = ${monitor2-template:rendered} extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -882,6 +884,10 @@ instance-configuration = ...@@ -882,6 +884,10 @@ instance-configuration =
httpdcors cors-domain $${slaprunner-httpd-cors:location} $${httpd-graceful-wrapper:output} httpdcors cors-domain $${slaprunner-httpd-cors:location} $${httpd-graceful-wrapper:output}
configuration-file-path = $${buildout:directory}/knowledge0.cfg configuration-file-path = $${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
[monitor-check-webrunner-internal-instance] [monitor-check-webrunner-internal-instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${monitor-check-webrunner-internal-instance:location}/${monitor-check-webrunner-internal-instance:filename} template = ${monitor-check-webrunner-internal-instance:location}/${monitor-check-webrunner-internal-instance:filename}
......
...@@ -5,7 +5,8 @@ parts = ...@@ -5,7 +5,8 @@ parts =
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
extends = ${template-resilient-templates:output} extends =
${template-resilient-templates:output}
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
......
...@@ -24,6 +24,7 @@ extends = ...@@ -24,6 +24,7 @@ extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/flask.cfg ../../stack/flask.cfg
../../stack/resilient/buildout.cfg ../../stack/resilient/buildout.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
# stacks are listed from most generic to most specific, # stacks are listed from most generic to most specific,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
extends = extends =
buildout.hash.cfg buildout.hash.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg ../../component/xz-utils/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
parts = parts =
template-logrotate-base template-logrotate-base
...@@ -25,7 +25,7 @@ template = ${:_profile_base_location_}/${:filename} ...@@ -25,7 +25,7 @@ template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-logrotate-base.cfg rendered = ${buildout:directory}/instance-logrotate-base.cfg
context = context =
key dcron_location dcron:location key dcron_location dcron:location
key gzip_location gzip:location key xz_location xz-utils:location
key logrotate_location logrotate:location key logrotate_location logrotate:location
key logrotate_conf_template logrotate-conf-template:target key logrotate_conf_template logrotate-conf-template:target
key logrotate_entry_template logrotate-entry-template:target key logrotate_entry_template logrotate-entry-template:target
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[logrotate-conf-template] [logrotate-conf-template]
filename = logrotate.conf.in filename = logrotate.conf.in
md5sum = 67954c82a8030e5dcac3a8c5d115f624 md5sum = 2fc0ea335969ffab7d8c4f98e3d04ae7
[logrotate-entry-template] [logrotate-entry-template]
filename = logrotate_entry.in filename = logrotate_entry.in
...@@ -22,4 +22,4 @@ md5sum = 117e46af6d9d31c09eeb86089d11407e ...@@ -22,4 +22,4 @@ md5sum = 117e46af6d9d31c09eeb86089d11407e
[template-logrotate-base] [template-logrotate-base]
filename = instance-logrotate-base.cfg.in filename = instance-logrotate-base.cfg.in
md5sum = f56b86a0742afff931a5e972114566e4 md5sum = 338be3ee006c08b26abcc023f398247e
...@@ -28,8 +28,8 @@ wrapper = ${logrotate-directory:bin}/cron_simplelogger ...@@ -28,8 +28,8 @@ wrapper = ${logrotate-directory:bin}/cron_simplelogger
log = ${logrotate-directory:log}/cron.log log = ${logrotate-directory:log}/cron.log
[logrotate-conf-parameter] [logrotate-conf-parameter]
gzip-binary = {{ gzip_location }}/bin/gzip compress-binary = {{ xz_location }}/bin/xz
gunzip-binary = {{ gzip_location }}/bin/gunzip uncompress-binary = {{ xz_location }}/bin/unxz
logrotate-entries = ${logrotate-directory:logrotate-entries} logrotate-entries = ${logrotate-directory:logrotate-entries}
[logrotate-conf] [logrotate-conf]
...@@ -46,11 +46,12 @@ context = ...@@ -46,11 +46,12 @@ context =
# User may override keys: # User may override keys:
# - "post" with commands to execute after rotation # - "post" with commands to execute after rotation
# - "pre" with commands to execute before rotation # - "pre" with commands to execute before rotation
# - "backup" with directory where to store logs
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ logrotate_entry_template }} template = {{ logrotate_entry_template }}
rendered = ${logrotate-conf-parameter:logrotate-entries}/${:name} rendered = ${logrotate-conf-parameter:logrotate-entries}/${:name}
context = context =
key backup logrotate-directory:logrotate-backup key backup :backup
key log :log key log :log
key post :post key post :post
key pre :pre key pre :pre
...@@ -61,6 +62,7 @@ post = ...@@ -61,6 +62,7 @@ post =
pre = pre =
frequency = daily frequency = daily
rotate-num = 3650 rotate-num = 3650
backup = ${logrotate-directory:logrotate-backup}
nocompress = nocompress =
[logrotate] [logrotate]
...@@ -91,5 +93,5 @@ bin = ${buildout:directory}/bin ...@@ -91,5 +93,5 @@ bin = ${buildout:directory}/bin
srv = ${buildout:directory}/srv srv = ${buildout:directory}/srv
backup = ${:srv}/backup backup = ${:srv}/backup
etc = ${buildout:directory}/etc etc = ${buildout:directory}/etc
services = ${:etc}/run services = ${:etc}/service
log = ${buildout:directory}/var/log log = ${buildout:directory}/var/log
compresscmd {{ parameter_dict['gzip-binary'] }} compresscmd {{ parameter_dict['compress-binary'] }}
compressoptions -9 compressoptions -9
uncompresscmd {{ parameter_dict['gunzip-binary'] }} uncompresscmd {{ parameter_dict['uncompress-binary'] }}
include {{ parameter_dict['logrotate-entries'] }} include {{ parameter_dict['logrotate-entries'] }}
...@@ -93,7 +93,6 @@ template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in ...@@ -93,7 +93,6 @@ template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg rendered = ${buildout:directory}/template-monitor.cfg
context = context =
key apache_location apache:location key apache_location apache:location
key gzip_location gzip:location
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:rendered
raw monitor_bin ${buildout:directory}/bin/monitor.bootstrap raw monitor_bin ${buildout:directory}/bin/monitor.bootstrap
raw monitor_collect ${buildout:directory}/bin/monitor.collect raw monitor_collect ${buildout:directory}/bin/monitor.collect
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = 367f8b8a09c3098844739f9b2856b912 md5sum = 516482f89d7a3ebe4458a404eb4a575b
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
...@@ -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 = 57b9b421d233402e6d5177c69cf9567e
[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
...@@ -19,7 +16,9 @@ parts = ...@@ -19,7 +16,9 @@ parts =
monitor-base monitor-base
monitor-check-resilient-feed-file monitor-check-resilient-feed-file
extends = ${monitor2-template:rendered} extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
...@@ -49,8 +48,6 @@ notifier = $${rootdirectory:etc}/notifier ...@@ -49,8 +48,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 +148,13 @@ name = resilient-pbs-status-feed ...@@ -151,69 +148,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
#---------------- #----------------
#-- #--
...@@ -324,7 +265,7 @@ password = $${slap-parameter:monitor-password} ...@@ -324,7 +265,7 @@ password = $${slap-parameter:monitor-password}
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
$${directory:logrotate-backup} $${logrotate-directory:logrotate-backup}
$${basedirectory:log} $${basedirectory:log}
[monitor-check-resilient-feed-file] [monitor-check-resilient-feed-file]
......
...@@ -56,8 +56,6 @@ notifier-status-items = $${basedirectory:notifier}/status-items ...@@ -56,8 +56,6 @@ notifier-status-items = $${basedirectory:notifier}/status-items
cron-entries = $${rootdirectory:etc}/cron.d cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps cronstamps = $${rootdirectory:etc}/cronstamps
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cgi-bin = $${rootdirectory:srv}/cgi-bin cgi-bin = $${rootdirectory:srv}/cgi-bin
monitor-resilient = $${monitor-directory:private}/resilient 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