Commit a34444e2 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5: open access to mariadb logs

Add a monitor in port 3380
parent 454b5026
......@@ -198,7 +198,7 @@ mode = 0644
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum = 4ec38e3b2e37028a2350b0606cac9281
md5sum = 2cb6513a4bc57ebfcb4f847ea610ccad
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
......@@ -251,7 +251,7 @@ md5sum = ba1b23177e101b5b9f03e1c5009c81fc
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = c11d617e7b829f9a5844a7eebc4edb0e
md5sum = 72d211256a4c2672369fc32861d821cc
extra-context =
key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary
......
......@@ -32,6 +32,7 @@ recipe = slapos.cookbook:publish.serialised
{% endmacro -%}
database-list = {{ render_database_list(database_list) }}
test-database-list = {{ render_database_list(test_database_list) }}
monitor-url = ${publish-connection-informations:monitor_url}
[simplefile]
recipe = slapos.recipe.template:jinja2
......@@ -218,9 +219,21 @@ path = ${directory:promise}/mariadb
hostname = ${my-cnf-parameters:ip}
port = ${my-cnf-parameters:port}
[{{ section('monitor-current-log-access') }}]
< = monitor-directory-access
source = ${directory:log}
[{{ section('monitor-backup-log-access') }}]
< = monitor-directory-access
source = ${logrotate-entry-mariadb:backup}
[monitor-parameters]
port = 3380
[buildout]
extends =
{{ parameter_dict['instance-logrotate-cfg'] }}
{{ parameter_dict['template-monitor'] }}
parts +=
publish-mariadb-url
logrotate-entry-mariadb
......@@ -228,6 +241,25 @@ parts +=
update-mysql
mysqld
promise
# Access to mariadb logs
certificate-authority
cron-entry-monitor
cron-entry-rss
deploy-index
# deploy-settings-cgi
# deploy-status-cgi
# deploy-status-history-cgi
setup-static-files
certificate-authority
zero-parameters
public-symlink
cgi-httpd-wrapper
cgi-httpd-graceful-wrapper
monitor-promise
monitor-instance-log-access
# Complete parts with sections
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
......
......@@ -186,6 +186,7 @@ template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
instance-logrotate-cfg = {{ template_logrotate_base }}
template-monitor = {{ template_monitor }}
[dynamic-template-mariadb]
< = jinja2-template-base
......
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