Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos
Commits
ebc1636d
Commit
ebc1636d
authored
Jun 14, 2019
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NEO: instanciate a single admin node, by default in the first subpartition
parent
9177c5b2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
software/neoppod/root-common.cfg.in
software/neoppod/root-common.cfg.in
+16
-8
software/neoppod/software-common.cfg
software/neoppod/software-common.cfg
+1
-1
No files found.
software/neoppod/root-common.cfg.in
View file @
ebc1636d
...
...
@@ -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
...
...
software/neoppod/software-common.cfg
View file @
ebc1636d
...
...
@@ -112,7 +112,7 @@ adapter-context =
[root-common]
<= download-base-neo
md5sum =
15fa47a59cc3019f59612aaf33bd9ec5
md5sum =
22ae2edfcbc7b7ef2a3128cb75e9f456
[instance-neo-admin]
<= download-base-neo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment