Commit 7fb84f78 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

html5as: Number of node is configurable in replicate

parent 270b7fcb
Pipeline #14925 failed with stage
in 0 seconds
......@@ -17,7 +17,7 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 6ed5d779fd0518ebd574f4629467b43d
md5sum = 0a7aceffa5222e88125b72da42ddedd7
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
......@@ -45,5 +45,4 @@ md5sum = 1c0ee16966e1fcdb3fd11c09f12ee2b2
[template_instance_replicate]
_update_hash_filename_ = instance_replicate.cfg.in
md5sum = c5cf3925503e03334816b0d0d6787eb8
md5sum = 1b3efe4ddd2419ad1858be33d1248a17
......@@ -35,8 +35,18 @@ filename = instance-replicate-html5as.cfg
context =
section buildout buildout
section parameter_list profile-common
key slapparameter_dict slap-parameters:configuration
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${instance-html5as:rendered}
replicate = ${instance-replicate:rendered}
# Section needed to be added manually here to retrieve parameters
[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
{% set replicate_quantity = slapparameter_dict.pop('replicate-quantity', '1') | int %}
[buildout]
parts =
publish-connection-information
......@@ -19,33 +20,27 @@ return = server_url server-cdn-url monitor-setup-url
config-title = ${slap-parameter:title}
config-download_url = ${slap-parameter:download_url}
{% for i in range(1, replicate_quantity + 1) %}
# Request a normal html5as instance
[instance-1]
<= instance-request-base
# Name of the instanc e
name = instance-html5as-1
config-port = ${slap-parameter:port1}
config-title = ${slap-parameter:title1}
[instance-2]
[instance-{{ i }}]
<= instance-request-base
# Name of the instance
name = instance-html5as-2
config-port = ${slap-parameter:port2}
config-title = ${slap-parameter:title2}
name = instance-html5as-{{ i }}
config-port = ${slap-parameter:port-{{ i }}}
config-title = ${slap-parameter:title-{{ i }}}
{% endfor %}
[slap-parameter]
title1 =
title2 =
download_url =
port1 = 8081
port2 = 8082
{% for i in range(1, replicate_quantity + 1) %}
title-{{ i }} =
port-{{ i }} = 808{{ i }}
{% endfor %}
[publish-connection-information]
recipe = slapos.cookbook:publish
instance-1-server_url = ${instance-1:connection-server_url}
instance-1-server-cdn-url = ${instance-1:connection-server-cdn-url}
instance-1-server-monitor-setup-url = ${instance-1:connection-monitor-setup-url}
instance-2-server_url = ${instance-2:connection-server_url}
instance-2-server-cdn-url = ${instance-1:connection-server-cdn-url}
instance-2-server-monitor-setup-url = ${instance-1:connection-monitor-setup-url}
{% for i in range(1, replicate_quantity + 1) %}
instance-{{ i }}-server_url = ${instance-{{ i }}:connection-server_url}
instance-{{ i }}-server-cdn-url = ${instance-{{ i }}:connection-server-cdn-url}
instance-{{ i }}-server-monitor-setup-url = ${instance-{{ i }}:connection-monitor-setup-url}
{% 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