instance.cfg.in 1.65 KB
Newer Older
Vincent Pelletier's avatar
Vincent Pelletier committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{% set admin_software_type = 'neo-admin' -%}
{% set mysql_storage_software_type = 'neo-storage-mysql' -%}
[buildout]
parts = switch-softwaretype
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}

16
[jinja2-template-base]
Vincent Pelletier's avatar
Vincent Pelletier committed
17
recipe = slapos.recipe.template:jinja2
18
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}.cfg
Vincent Pelletier's avatar
Vincent Pelletier committed
19
extensions = jinja2.ext.do
20
extra-context =
Vincent Pelletier's avatar
Vincent Pelletier committed
21
context =
22 23
    key ipv4_set slap-configuration:ipv4
    raw bin_directory {{ bin_directory }}
Vincent Pelletier's avatar
Vincent Pelletier committed
24
    key slapparameter_dict slap-configuration:configuration
25
    raw logrotate_cfg {{ logrotate_base }}
26 27 28 29 30 31
    ${:extra-context}

[neo-cluster]
<= jinja2-template-base
template = {{ cluster }}
extra-context =
Vincent Pelletier's avatar
Vincent Pelletier committed
32 33 34
    raw admin_software_type {{ admin_software_type }}
    raw mysql_storage_software_type {{ mysql_storage_software_type }}

35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
[neo-admin]
<= jinja2-template-base
template = {{ neo_admin }}

[neo-master]
<= jinja2-template-base
template = {{ neo_master }}

[neo-storage-mysql]
<= jinja2-template-base
template = {{ neo_storage_mysql }}
extra-context =
    key master_cfg neo-master:rendered
    raw mariadb_location {{ mariadb_location }}

Vincent Pelletier's avatar
Vincent Pelletier committed
50
[switch-softwaretype]
51 52 53 54 55
recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }}
default = neo-cluster:rendered
{{ admin_software_type }} = neo-admin:rendered
{{ mysql_storage_software_type }} = neo-storage-mysql:rendered