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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
slapos
Commits
5962ca5c
Commit
5962ca5c
authored
Jun 09, 2015
by
Saurabh
Committed by
Julien Muchembled
Jun 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NEO: new 'sla-dict' instanciation parameter, working like for ERP5
parent
ef1359e6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
software/neoppod/cluster.cfg.in
software/neoppod/cluster.cfg.in
+16
-1
software/neoppod/instance.cfg.in
software/neoppod/instance.cfg.in
+2
-0
software/neoppod/software.cfg
software/neoppod/software.cfg
+2
-2
No files found.
software/neoppod/cluster.cfg.in
View file @
5962ca5c
...
@@ -2,10 +2,14 @@
...
@@ -2,10 +2,14 @@
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set part_list = [] -%}
{% set part_list = [] -%}
{% set section_id_list = [] -%}
{% set section_id_list = [] -%}
{% set sla_dict = {} -%}
{% for sla, ref_list in slapparameter_dict.get('sla-dict', {}).iteritems() -%}
{% do sla_dict.update(dict.fromkeys(ref_list, sla)) -%}
{% endfor -%}
[request-common]
[request-common]
recipe = slapos.cookbook:request.serialised
recipe = slapos.cookbook:request.serialised
software-url = ${slap-connection:software-release-url}
software-url = ${slap-connection:software-release-url}
sla-computer_guid = ${slap-connection:computer-id}
server-url = ${slap-connection:server-url}
server-url = ${slap-connection:server-url}
key-file = ${slap-connection:key-file}
key-file = ${slap-connection:key-file}
cert-file = ${slap-connection:cert-file}
cert-file = ${slap-connection:cert-file}
...
@@ -19,6 +23,16 @@ config-upstream-cluster = {{ dumps(slapparameter_dict.get('upstream-cluster', ''
...
@@ -19,6 +23,16 @@ config-upstream-cluster = {{ dumps(slapparameter_dict.get('upstream-cluster', ''
config-upstream-masters = {{ dumps(slapparameter_dict.get('upstream-masters', '')) }}
config-upstream-masters = {{ dumps(slapparameter_dict.get('upstream-masters', '')) }}
software-type = neo
software-type = neo
{% macro sla(name) -%}
{% if name in sla_dict -%}
{% for k, (v,) in urlparse.parse_qs(sla_dict.pop(name), strict_parsing=1).iteritems() -%}
sla-{{ k }} = {{ v }}
{% endfor -%}
{% else -%}
sla-computer_guid = ${slap-connection:computer-id}
{% endif -%}
{% endmacro -%}
[publish]
[publish]
recipe = slapos.cookbook:publish.serialised
recipe = slapos.cookbook:publish.serialised
masters = ${node-0-final:connection-masters}
masters = ${node-0-final:connection-masters}
...
@@ -35,6 +49,7 @@ name = {{ section_id }}
...
@@ -35,6 +49,7 @@ name = {{ section_id }}
{% for k, v in node.iteritems() -%}
{% for k, v in node.iteritems() -%}
config-{{ k }} = {{ dumps(v) }}
config-{{ k }} = {{ dumps(v) }}
{% endfor -%}
{% endfor -%}
{{ sla(section_id) }}
[{{ section_id }}]
[{{ section_id }}]
<= request-common
<= request-common
...
...
software/neoppod/instance.cfg.in
View file @
5962ca5c
...
@@ -26,6 +26,8 @@ context =
...
@@ -26,6 +26,8 @@ context =
[neo-cluster]
[neo-cluster]
<= jinja2-template-base
<= jinja2-template-base
template = {{ cluster }}
template = {{ cluster }}
extra-context =
import urlparse urlparse
[neo-admin]
[neo-admin]
<= jinja2-template-base
<= jinja2-template-base
...
...
software/neoppod/software.cfg
View file @
5962ca5c
...
@@ -41,7 +41,7 @@ scripts =
...
@@ -41,7 +41,7 @@ scripts =
[cluster]
[cluster]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in
url = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in
md5sum =
5e422ddd4ecfe85daa3e151cde261c75
md5sum =
02d7d576ef30f7d440b703d6fc57866a
# XXX: following mode should be the default
# XXX: following mode should be the default
mode = 644
mode = 644
...
@@ -65,7 +65,7 @@ md5sum = febd3ed58043ce1367b86cf6e4e69700
...
@@ -65,7 +65,7 @@ md5sum = febd3ed58043ce1367b86cf6e4e69700
[template]
[template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
6101da4361793eddde62b6be1639c25
e
md5sum =
e0917a4a4aa102d6fa4274530d56959
e
# XXX: "template.cfg" is hardcoded in instanciation recipe
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
rendered = ${buildout:directory}/template.cfg
context =
context =
...
...
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