Commit ebc1636d authored by Julien Muchembled's avatar Julien Muchembled

NEO: instanciate a single admin node, by default in the first subpartition

parent 9177c5b2
......@@ -61,19 +61,27 @@ software-type = {{ software_type }}
{% do storage_count.append(node.get('storage-count', 1)) -%}
{% endfor -%}
config-autostart = {{ dumps(sum(storage_count)) }}
{% do assert(replicas < len(node_list)) -%}
{% for i, node in enumerate(node_list) -%}
{% set section_id = prefix ~ i -%}
{% do section_id_list.append(section_id) -%}
{%- do assert(replicas < len(node_list)) %}
{%- set admin_list = [] %}
{%- for i, node in enumerate(node_list) %}
{%- set section_id = prefix ~ i %}
{%- do section_id_list.append(section_id) %}
{%- if admin_list %}
{%- do node.setdefault('admin', 0) %}
{%- endif %}
[{{section_id}}]
<= {{ prefix }}request-common
name = {{ section_id }}
{% for k, v in node.iteritems() -%}
{%- if node.get('admin') != 0 %}
{%- do admin_list.append(node) %}
{%- endif %}
{%- for k, v in node.iteritems() %}
config-{{ k }} = {{ dumps(v) }}
{% endfor -%}
{%- endfor %}
{{ sla(section_id) }}
{% endfor -%}
{%- endfor %}
{%- do assert(len(admin_list) == 1, admin_list) %}
[{{section(prefix ~ 'cluster')}}]
recipe = slapos.cookbook:neoppod.cluster
......
......@@ -112,7 +112,7 @@ adapter-context =
[root-common]
<= download-base-neo
md5sum = 15fa47a59cc3019f59612aaf33bd9ec5
md5sum = 22ae2edfcbc7b7ef2a3128cb75e9f456
[instance-neo-admin]
<= download-base-neo
......
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