Commit 4fd11571 authored by Łukasz Nowak's avatar Łukasz Nowak

XXX caddy-frontend: Prepare JSON information for the nodes

parent 81b09255
Pipeline #22781 running with stage
in 0 seconds
...@@ -26,7 +26,7 @@ md5sum = 75db32dd9b17c923b16420784dfba581 ...@@ -26,7 +26,7 @@ md5sum = 75db32dd9b17c923b16420784dfba581
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 11a52389bf0afa85eaf9772c8fe62d87 md5sum = b0fe561fd5ba42142a30d7d8f8259994
[profile-slave-list] [profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
......
...@@ -980,6 +980,29 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -980,6 +980,29 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
key_len=2048 key_len=2048
)}} )}}
[generate-exposed-node-json]
recipe = slapos.recipe.template:jinja2
slave_list = {{ dumps(authorized_slave_list) }}
context =
import json_module json
key slave_list :slave_list
inline =
{%- raw %}
{{ json_module.dumps(slave_list, sort_keys=True, indent=2) }}
{%- endraw %}
output = ${directory:srv}/exposed-node.json
[generate-exposed-node-kedifa-json]
<= generate-exposed-node-json
slave_list = ${request-kedifa:connection-slave-kedifa-information}
output = ${directory:srv}/exposed-node-kedifa.json
[generate-kedifa-node-json]
<= generate-exposed-node-json
output = ${directory:srv}/kedifa-node.json
[buildout] [buildout]
extends = extends =
{{ software_parameter_dict['profile_common'] }} {{ software_parameter_dict['profile_common'] }}
...@@ -996,6 +1019,9 @@ parts = ...@@ -996,6 +1019,9 @@ parts =
master-key-upload-url-ready-promise master-key-upload-url-ready-promise
master-key-generate-auth-url-ready-promise master-key-generate-auth-url-ready-promise
master-key-download-url-ready-promise master-key-download-url-ready-promise
generate-exposed-node-json
generate-exposed-node-kedifa-json
generate-kedifa-node-json
{% for part in part_list %} {% for part in part_list %}
{{ ' %s' % part }} {{ ' %s' % part }}
{% endfor %} {% endfor %}
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