KVM: new parameter: number of resiliency backups.

parent df549ffb
...@@ -100,7 +100,7 @@ on-update = true ...@@ -100,7 +100,7 @@ on-update = true
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
mode = 644 mode = 644
md5sum = a07c96b53fe9145278cd64a3b27a459a md5sum = 43f2eca698f25f72481f89d82403b991
download-only = true download-only = true
on-update = true on-update = true
......
...@@ -34,6 +34,12 @@ ...@@ -34,6 +34,12 @@
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.", "description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string", "type": "string",
"default": "3B" "default": "3B"
},
"resiliency-backup-amount": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 2
} }
} }
} }
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
{% import 'parts' as parts %} {% import 'parts' as parts %}
{% import 'replicated' as replicated with context %} {% import 'replicated' as replicated with context %}
{% set backup_amount = slapparameter_dict.pop('resiliency-backup-amount', "2")|int + 1 -%}
[buildout] [buildout]
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
...@@ -10,12 +12,12 @@ offline = true ...@@ -10,12 +12,12 @@ offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended # += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts += parts +=
{{ parts.replicate("kvm", "3") }} {{ parts.replicate("kvm", backup_amount) }}
publish-connection-informations publish-connection-informations
kvm-frontend-url-promise kvm-frontend-url-promise
kvm-backend-url-promise kvm-backend-url-promise
{{ replicated.replicate("kvm", "3", "kvm-export", "kvm-import", slapparameter_dict=slapparameter_dict) }} {{ replicated.replicate("kvm", backup_amount, "kvm-export", "kvm-import", slapparameter_dict=slapparameter_dict) }}
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
......
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