Commit cc540b34 authored by Eric Zheng's avatar Eric Zheng

software/html5as: add parameter for monitor port

This avoids having multiple monitors trying to listen on the same port
when using replicate instances.
parent 6bdc1062
Pipeline #16547 failed with stage
in 0 seconds
......@@ -17,11 +17,11 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 1b6d628b3a04497f525f860dd0003d84
md5sum = 924ea0270c118e3470c04f32da979888
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = 2aee5fede6e804c1b9c1400f41f2f51e
md5sum = 7d438ca356aea0b2ace7378de91e7587
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
......@@ -45,4 +45,4 @@ md5sum = 1c0ee16966e1fcdb3fd11c09f12ee2b2
[template_instance_replicate]
_update_hash_filename_ = instance_replicate.cfg.in
md5sum = aef3b91f4cbaf6f7a14986bc8d1aba65
md5sum = 2dd03eb194641fbc560122d04b67e212
......@@ -34,7 +34,8 @@ default-parameters =
{
"title": "",
"download_url": "",
"port": 8081
"port": 8081,
"monitor-httpd-port": 8197
}
[instance-replicate]
......
......@@ -176,7 +176,7 @@ config-port = ${html5as:port}
# Use a port different from the default one in order to be able to
# use it in a SlapOS webrunner or a Theia SlapOS Runner
[monitor-instance-parameter]
monitor-httpd-port = 8197
monitor-httpd-port = {{ parameter_dict['monitor-httpd-port'] }}
# Monitor Stack also provides logrotate stack. We only need to extend
# the logrotate-entry-base defined in instance-logrotate-base.cfg.in .
......@@ -205,7 +205,7 @@ server-cdn-url = ${html5as-frontend-promise:url}
<= slap-connection
# Recipe used to make requests
recipe = slapos.cookbook:requestoptional
name = HTM5AS frontend
name = HTML5AS frontend
# Specify the software url of the frontend software release
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
# It is not a dedicated instance but an instance allocated on a shared instance
......
......@@ -4,6 +4,7 @@
{%- for i in range(1, replicate_quantity + 1) %}
{%- do parameter_dict.setdefault("title-%d" % i, "") %}
{%- do parameter_dict.setdefault("port-%d" % i, 8081 + i) %}
{%- do parameter_dict.setdefault("monitor-httpd-port-%d" % i, 8197 + i) %}
{%- endfor %}
# Standard buildout section
......@@ -41,6 +42,7 @@ config-download_url = {{ parameter_dict['download_url'] }}
name = instance-html5as-{{ i }}
config-port = {{ parameter_dict["port-%s" % i] }}
config-title = {{ parameter_dict["title-%s" % i] }}
config-monitor-httpd-port = {{ parameter_dict["monitor-httpd-port-%s" % i] }}
{% if "sla-%s-computer-guid" % i in parameter_dict -%}
sla-computer_guid = {{ parameter_dict["sla-%s-computer-guid" % i] }}
{% endif -%}
......
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