instance-resilient.cfg.jinja2 1.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# vim: set ft=cfg:

{% import 'parts' as parts %}
{% import 'replicated' as replicated %}

[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
  {{ parts.replicate("runner", "3") }}
  publish-connection-informations

16
{{ replicated.replicate("runner", "3", "runner-export", "runner-import", slapparameter_dict=slapparameter_dict) }}
17 18 19

# Bubble up the parameters
[request-runner]
20
return = url ssh-public-key ssh-url notification-id ip backend_url url ssh_command password_recovery_code shell_password access_url 1_info 2_info control_url monitor_url IMPORTANT_monitor_info
21 22 23

[publish-connection-informations]
recipe = slapos.cookbook:publish
24
1_info = ${request-runner:connection-1_info}
25
2_info = ${request-runner:connection-2_info}
26
backend_url = ${request-runner:connection-backend_url}
27
access_url = ${request-runner:connection-access_url}
28 29
url = ${request-runner:connection-url}
ssh_command = ${request-runner:connection-ssh_command}
30 31 32
control_url = ${request-runner:connection-control_url}
monitor_url = ${request-runner:connection-monitor_url}
IMPORTANT_monitor_info = ${request-runner:connection-IMPORTANT_monitor_info}
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

[slap-parameter]
# Default parameters for distributed deployment
# I.e state "backup1 of maria should go there, ..."
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
runner1-computer-guid =
pbs-runner1-computer-guid =
runner2-computer-guid =
pbs-runner2-computer-guid =
runner3-computer-guid =
pbs-runner3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
authorized-key =
instance-amount = 10
48
debug = false