Commit 41b35baa authored by Alain Takoudjou's avatar Alain Takoudjou

stack/supervisord: add option to enable inet http server instead of unix socket

parent c60f6369
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
# not need these here). # not need these here).
[supervisord-library] [supervisord-library]
_update_hash_filename_ = supervisord.jinja2.in _update_hash_filename_ = supervisord.jinja2.in
md5sum = 69b73a768ae017072d252e6e71109204 md5sum = 8a88dfc33515da2cc51a9a6d865dc2d4
[supervisord-conf] [supervisord-conf]
_update_hash_filename_ = supervisord.conf.in _update_hash_filename_ = supervisord.conf.in
md5sum = d624f65151233493c6dbdafa83ae8cbd md5sum = 9a01551241cab7b3fd34d0f5325fccb6
{% set server_url = "unix://" ~ parameter_dict['socket-path'] -%}
{% if parameter_dict['ipv4'] and parameter_dict['port'] -%}
{% set server_url = "http://" ~ parameter_dict['ipv4'] ~ ":" ~ parameter_dict['port'] -%}
[inet_http_server]
port={{ parameter_dict['ipv4'] }}:{{ parameter_dict['port'] }}
{% else-%}
[unix_http_server] [unix_http_server]
file = {{ parameter_dict['socket-path'] }} file = {{ parameter_dict['socket-path'] }}
chmod=0700 chmod=0700
{% endif %}
[include] [include]
files = {{ parameter_dict['include-dir'] }}/*.conf files = {{ parameter_dict['include-dir'] }}/*.conf
[supervisorctl] [supervisorctl]
serverurl = unix://{{ parameter_dict['socket-path'] }} serverurl = {{ server_url }}
[supervisord] [supervisord]
loglevel = {{ parameter_dict['log-level'] }} loglevel = {{ parameter_dict['log-level'] }}
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
name, name,
buildout_bin_directory, buildout_bin_directory,
supervisord_conf, supervisord_conf,
use_service_hash=False use_service_hash=False,
ipv4='',
port=''
) -%} ) -%}
[controller-directory] [controller-directory]
...@@ -19,6 +21,8 @@ include-dir = ${controller-directory:supervisord} ...@@ -19,6 +21,8 @@ include-dir = ${controller-directory:supervisord}
log-file = ${controller-directory:log}/supervisord-{{ name }}.log log-file = ${controller-directory:log}/supervisord-{{ name }}.log
log-level = info log-level = info
pid-file = ${controller-directory:run}/supervisord-{{ name }}.pid pid-file = ${controller-directory:run}/supervisord-{{ name }}.pid
ipv4 = {{ ipv4 }}
port = {{ port }}
[supervisord-controller-conf] [supervisord-controller-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
......
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