Commit 27235c53 authored by Joanne Hugé's avatar Joanne Hugé

software/re6stnet: add community configuration

parent b5dd21aa
......@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5
[template-re6stnet]
filename = instance-re6stnet.cfg.in
md5sum = 98f86d2a10d909215ae88ba6a602da27
md5sum = 31608db21b79a3a7f44057bbe5510b5c
[template-apache-conf]
filename = apache.conf.in
......@@ -26,4 +26,4 @@ md5sum = 3d55f7c9c4fc7279f06bfe6313a78a4b
[template-re6st-registry-conf]
filename = re6st-registry.conf.in
md5sum = feb4b3318f37414d1bf3d16a03aec93d
md5sum = 28ffb7a742e293139814f1324ff003ff
......@@ -84,6 +84,11 @@
"title": "Git backup repository",
"description": "URL of Git repository where backups are pushed. Nothing is pushed if empty.",
"type": "string"
},
"community-conf": {
"title": "Community configuration",
"textarea": true,
"type": "string"
}
}
}
......@@ -83,6 +83,9 @@ hello = {{ slapparameter_dict.get('hello', 15) }}
min-protocol = {{ slapparameter_dict.get('min-protocol', -1) }}
encrypt = {{ slapparameter_dict.get('encrypt', 'False') }}
same-country = {{ slapparameter_dict.get('same-country', '') }}
{% if slapparameter_dict.get('community-conf', '') %}
community-path = ${re6st-community-conf:output}
{% endif %}
[re6st-registry-conf]
recipe = slapos.recipe.template:jinja2
......@@ -90,6 +93,13 @@ template = {{ parameter_dict['template-re6st-registry-conf'] }}
rendered = ${re6stnet-dirs:conf}/registry.conf
context = section parameter_dict re6st-registry-conf-dict
{% if slapparameter_dict.get('community-conf', '') %}
[re6st-community-conf]
recipe = slapos.recipe.template
inline = {{ dumps(slapparameter_dict.get('community-conf', '')) }}
output = ${re6stnet-dirs:conf}/community.conf
{% endif %}
depends = ${re6st-compat:recipe}
[re6st-compat]
recipe = slapos.recipe.build
......
......@@ -30,3 +30,6 @@ max-clients {{ parameter_dict['max-clients'] }}
{% if parameter_dict.get('same-country') -%}
same-country {{ parameter_dict['same-country'] }}
{% endif -%}
{% if parameter_dict.get('community-path') -%}
community {{ parameter_dict['community-path'] }}
{% endif -%}
......@@ -6,6 +6,7 @@
"default": {
"title": "Default",
"description": "Re6st registry",
"serialisation": "json-in-xml",
"request": "instance-re6stnet-input-schema.json",
"response": "instance-re6stnet-output-schema.json",
"index": 0
......
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