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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
ebc1636d
Commit
ebc1636d
authored
Jun 14, 2019
by
Julien Muchembled
1
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
Hide 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
...
...
@@ -56,24 +56,32 @@ config-upstream-cluster = {{ dumps(parameter_dict.get('upstream-cluster', '')) }
config-upstream-masters = {{ dumps(parameter_dict.get('upstream-masters', '')) }}
software-type = {{ software_type }}
{% set node_list = parameter_dict.get('node-list', ({},)) -%}
{% set storage_count =
[] -%}
{% set storage_count = [] -%}
{% for node in node_list -%}
{% 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
...
...
Julien Muchembled
@jm
mentioned in commit
beb0a3b4
·
Mar 18, 2020
mentioned in commit
beb0a3b4
mentioned in commit beb0a3b4dd9f018ef419e84c5413550ba3f85e19
Toggle commit list
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