Commit 516d7322 authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Use section() in mariadb instance

parent 36d8e662
......@@ -19,7 +19,7 @@ md5sum = 844d62cd6f9d6e3d1d78d52de2b72a49
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 1ce6e9008d3ed0701b85a2e3cd9d59b6
md5sum = 806c31145f1f30bfbb11aef625541f15
[template-kumofs]
filename = instance-kumofs.cfg.in
......
......@@ -18,7 +18,7 @@
{% endif -%}
{% set dash = parameter_dict['dash-location'] ~ '/bin/dash' %}
[publish]
[{{ section('publish') }}]
recipe = slapos.cookbook:publish.serialised
-extends = publish-early
{% macro render_database_list(database_list) -%}
......@@ -164,7 +164,7 @@ rendered = ${directory:etc}/mariadb_initial_setup.sql
template = {{ parameter_dict['template-mariadb-initial-setup'] }}
context = section parameter_dict init-script-parameters
[update-mysql]
[{{ section('update-mysql') }}]
recipe = slapos.cookbook:generic.mysql.wrap_update_mysql
output = ${directory:services}/mariadb_update
binary = ${binary-wrap-mysql_upgrade:wrapper-path}
......@@ -189,13 +189,13 @@ template = inline:#!{{ dash }}
"$@"
rendered = ${directory:services}/mariadb
[logrotate-entry-mariadb]
[{{ section('logrotate-entry-mariadb') }}]
< = logrotate-entry-base
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:wrapper-path}" -B -u root -e "FLUSH LOGS"
[binary-link]
[{{ section('binary-link') }}]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:bin}
link-binary = {{ dumps(parameter_dict['link-binary']) }}
......@@ -246,7 +246,7 @@ var = ${buildout:directory}/var
log = ${:var}/log
run = ${:var}/run
[resiliency-exclude-file]
[{{ section('resiliency-exclude-file') }}]
# Generate rdiff exclude file in case of resiliency
< = jinja2-template-base
template = {{ 'inline:{{ "${directory:mariadb-data}/**\\n" }}' }}
......@@ -271,7 +271,7 @@ context =
key server_executable mysqld:rendered
key update_executable update-mysql:output
[promise]
[{{ section('promise') }}]
recipe = slapos.cookbook:wrapper
command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "${my-cnf-parameters:ip}" "${my-cnf-parameters:port}"
wrapper-path = ${directory:promise}/mariadb
......@@ -287,11 +287,4 @@ extends =
{{ logrotate_cfg }}
{{ parameter_dict['template-monitor'] }}
parts +=
publish
logrotate-entry-mariadb
binary-link
update-mysql
resiliency-exclude-file
resiliency-after-import-script
promise
{{ part_list | join('\n ') }}
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