Commit 267870d6 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 3e8439b3
......@@ -17,11 +17,11 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 1b6d628b3a04497f525f860dd0003d84
md5sum = 146b81107081b77ba207102a3237fdef
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = 2aee5fede6e804c1b9c1400f41f2f51e
md5sum = 82ce09b079a030bd8f7723f4f89697cb
[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 .
......
......@@ -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