Commit 494dfc30 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5: make mariadb monitor friendly

parent eae6c06c
......@@ -147,7 +147,7 @@ mode = 755
[template-mariadb]
<= download-base
filename = instance-mariadb.cfg.in
md5sum = 4d46ab5aa651a39c4021de6f647e8be9
md5sum = 843e59e4151ab37a2c7bfd1ea9dafd98
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
......@@ -225,7 +225,7 @@ recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 4d043c96d70b35d1fbbd8120d8edee7c
md5sum = 708a721558f9bbe8856482e60891b4c7
mode = 640
context =
key mariadb_link_binary template-mariadb:link-binary
......@@ -291,6 +291,7 @@ context =
key template_kumofs template-kumofs:target
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_monitor monitor-template:rendered
key template_my_cnf template-my-cnf:target
key template_postfix template-postfix:target
key template_postfix_aliases template-postfix-aliases:target
......@@ -306,6 +307,15 @@ context =
key xfixes_location xfixes:location
key zlib_location zlib:location
[monitor-template-dummy]
<= download-base
# This is a placeholder, to be overriden by extending monitor SR
filename = dummy.cfg
md5sum = d41d8cd98f00b204e9800998ecf8427e
[monitor-template]
rendered = ${monitor-template-dummy:target}
[template-erp5]
<= download-base
filename = instance-erp5.cfg.in
......
......@@ -17,7 +17,7 @@
{% set ip = (ipv4_set | list)[0] -%}
{% endif -%}
[publish-mariadb-url]
[publish]
recipe = slapos.cookbook:publish.serialised
{% macro render_database_list(database_list) -%}
{% set publish_database_list = [] -%}
......@@ -232,10 +232,17 @@ command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened"
wrapper-path = ${directory:promise}/mariadb
parameters-extra = true
[monitor-instance-parameter]
monitor-httpd-ipv6 = {{ (ipv6_set | list)[0] }}
monitor-httpd-port = {{ port + 1 }}
monitor-title = Mariadb monitor
[buildout]
extends = {{ logrotate_cfg }}
extends =
{{ logrotate_cfg }}
{{ paremeter_dict['template-monitor'] }}
parts +=
publish-mariadb-url
publish
logrotate-entry-mariadb
binary-link
update-mysql
......
......@@ -150,6 +150,7 @@ template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
bin-directory = {{ bin_directory }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
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