fixup! erp5: add periodicity for tidstorage/mariadb backup.

parent 0328542d
...@@ -156,7 +156,7 @@ mode = 755 ...@@ -156,7 +156,7 @@ mode = 755
[template-mariadb] [template-mariadb]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-mariadb.cfg.in url = ${:_profile_base_location_}/instance-mariadb.cfg.in
md5sum = 48e8816d7d0c9e17585398fcf8e70347 md5sum = c78c8a6445a5f67dca35c427ae370d84
mode = 640 mode = 640
[template-zope] [template-zope]
...@@ -199,7 +199,7 @@ mode = 640 ...@@ -199,7 +199,7 @@ mode = 640
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 9ced9ebba770ba0b4e6ffe74c65770f5 md5sum = 78aeabeb306178e4716b44ad6605c59c
extra-context = extra-context =
key apache_location apache:location key apache_location apache:location
key aspell_location aspell:location key aspell_location aspell:location
......
{% if software_type == slap_software_type -%} {% if software_type == slap_software_type -%}
{% set json = json_module.loads(parameter_dict.get('mariadb-json', '{}')) -%} {% set json = json_module.loads(slapparameter_dict.get('mariadb-json', '{}')) -%}
{% set backup_periodicity = json.get('backup-periodicity', '0 22 * * *') -%} {% set backup_periodicity = json.get('backup-periodicity', '0 22 * * *') -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%} {% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
...@@ -42,7 +42,7 @@ command = mysqldump ...@@ -42,7 +42,7 @@ command = mysqldump
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = mariadb-backup name = mariadb-backup
frequency = ${slap-parameter:backup-periodicity} frequency = {{ backup_periodicity }}
{# When binlogs are enabled: {# When binlogs are enabled:
# flush-logs: used so no manipulation on binlogs is needed to restore from # flush-logs: used so no manipulation on binlogs is needed to restore from
# full + binlogs. The first binlog after a dump starts from dump snapshot and # full + binlogs. The first binlog after a dump starts from dump snapshot and
......
...@@ -124,11 +124,15 @@ extra-context = ...@@ -124,11 +124,15 @@ extra-context =
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type varnish raw software_type varnish
[dynamic-template-mariadb-parameters]
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-mariadb] [dynamic-template-mariadb]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_mariadb }} template = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-mariadb-parameters
raw coreutils_location {{ coreutils_location }} raw coreutils_location {{ coreutils_location }}
raw dcron_location {{ dcron_location }} raw dcron_location {{ dcron_location }}
raw findutils_location {{ findutils_location }} raw findutils_location {{ findutils_location }}
...@@ -142,7 +146,6 @@ extra-context = ...@@ -142,7 +146,6 @@ extra-context =
raw perl_siteprefix {{ perl_siteprefix }} raw perl_siteprefix {{ perl_siteprefix }}
raw sed_location {{ sed_location }} raw sed_location {{ sed_location }}
raw xtrabackup_location {{ xtrabackup_location }} raw xtrabackup_location {{ xtrabackup_location }}
raw buildout-bin-directory {{ buildout_bin_directory }}
import json_module json import json_module json
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type mariadb raw software_type mariadb
......
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