instance.cfg.in 1.65 KB
{% 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}

[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}.cfg
extensions = jinja2.ext.do
extra-context =
context =
    key ipv4_set slap-configuration:ipv4
    raw bin_directory {{ bin_directory }}
    key slapparameter_dict slap-configuration:configuration
    raw logrotate_cfg {{ logrotate_base }}
    ${:extra-context}

[neo-cluster]
<= jinja2-template-base
template = {{ cluster }}
extra-context =
    raw admin_software_type {{ admin_software_type }}
    raw mysql_storage_software_type {{ mysql_storage_software_type }}

[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 }}

[switch-softwaretype]
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