instance-resilient.cfg.jinja2 2.07 KB
Newer Older
1 2
# vim: set ft=cfg:

3 4 5 6
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}

[buildout]
7 8 9
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
10

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

16 17 18 19 20 21
{{ replicated.replicate("apache", "3", "apache-export", "apache-import") }}

# Bubble up the parameters
[request-apache]
return = url ssh-public-key ssh-url notification-id ip url backend_url
# XXX: hardcoded values
22
config = domain number authorized-key notify ip-list namebase postgres1-computer-guid pbs-postgres1-computer-guid postgres2-computer-guid pbs-postgres2-computer-guid postgres3-computer-guid pbs-postgres3-computer-guid maarch-sql-data-file
23 24 25 26 27 28 29
config-postgres1-computer-guid = ${slap-parameter:postgres1-computer-guid}
config-pbs-postgres1-computer-guid = ${slap-parameter:pbs-postgres1-computer-guid}
config-postgres2-computer-guid = ${slap-parameter:postgres2-computer-guid}
config-pbs-postgres2-computer-guid = ${slap-parameter:pbs-postgres2-computer-guid}
config-postgres3-computer-guid = ${slap-parameter:postgres3-computer-guid}
config-pbs-postgres3-computer-guid = ${slap-parameter:pbs-postgres3-computer-guid}
config-domain = ${slap-parameter:domain}
30
config-maarch-sql-data-file = ${slap-parameter:maarch-sql-data-file}
31 32 33 34 35 36 37 38

[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-apache:connection-backend_url}
url = ${request-apache:connection-url}

[slap-parameter]
# Default parameters for distributed deployment
39
# I.e state "backup1 of postgres should go there, ..."
40 41 42 43 44 45 46 47 48
# XXX-Cedric: Hardcoded number of backups. Should be dynamically generated.
postgres1-computer-guid =
pbs-postgres1-computer-guid =
postgres2-computer-guid =
pbs-postgres2-computer-guid =
postgres3-computer-guid =
pbs-postgres3-computer-guid =
# XXX-Cedric: Hardcoded parameters. Should be dynamically generated.
domain =
49
# the following parameters are specific to maarch
50
maarch-sql-data-file =