Commit 36d8e662 authored by Vincent Pelletier's avatar Vincent Pelletier

stack.erp5: Use consistent templating language in mariadb instance

parent 756c70eb
......@@ -15,11 +15,11 @@
# not need these here).
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum = af0ef3e5e3ca0a2671e5eb65eb3faea6
md5sum = 844d62cd6f9d6e3d1d78d52de2b72a49
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 9ada4abfc0177ea9e315636ac5621e49
md5sum = 1ce6e9008d3ed0701b85a2e3cd9d59b6
[template-kumofs]
filename = instance-kumofs.cfg.in
......
#!${dash:dash}
#!{{ dash }}
# DO NOT RUN THIS SCRIPT ON PRODUCTION INSTANCE
# OR MYSQL DATA WILL BE ERASED.
......@@ -12,14 +12,14 @@
set -e
mysql_executable='${binary-wrap-mysql:wrapper-path}'
mariadb_data_directory='${directory:mariadb-data}'
mariadb_backup_directory='${directory:mariadb-backup-full}'
instance_directory='${buildout:directory}'
pid_file='${my-cnf-parameters:pid-file}'
binlog_path='${my-cnf-parameters:binlog-path}'
server_executable='${mysqld:rendered}'
update_executable='${update-mysql:output}'
mysql_executable='{{ mysql_executable }}'
mariadb_data_directory='{{ mariadb_data_directory }}'
mariadb_backup_directory='{{ mariadb_backup_directory }}'
instance_directory='{{ instance_directory }}'
pid_file='{{ pid_file }}'
binlog_path='{{ binlog_path }}'
server_executable='{{ server_executable }}'
update_executable='{{ update_executable }}'
# Make sure mariadb is not already running
if [ -e "$pid_file" ]; then
......
......@@ -257,10 +257,19 @@ dash = {{ dumps(dash) }}
[resiliency-after-import-script]
# Generate after import script used by importer instance of webrunner
recipe = collective.recipe.template
input = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
output = ${directory:srv}/runner-import-restore
mode = 755
< = jinja2-template-executable
template = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
rendered = ${directory:srv}/runner-import-restore
context =
key dash dash:dash
key mysql_executable binary-wrap-mysql:wrapper-path
key mariadb_data_directory directory:mariadb-data
key mariadb_backup_directory directory:mariadb-backup-full
key instance_directory buildout:directory
key pid_file my-cnf-parameters:pid-file
key binlog_path my-cnf-parameters:binlog-path
key server_executable mysqld:rendered
key update_executable update-mysql:output
[promise]
recipe = slapos.cookbook:wrapper
......
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