Commit cd779a2a authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Implement custom Caddy

It requires a bit of changes into the template logic, as more
information has to be passed to each slave.
parent 7016f2d7
...@@ -27,11 +27,11 @@ md5sum = 9e76028df7e93d3e32982884d5dc0913 ...@@ -27,11 +27,11 @@ md5sum = 9e76028df7e93d3e32982884d5dc0913
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = c4d65c0e32e611083e4d63cded10431f md5sum = 181631c2acd06dc79508711123ea3b82
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
md5sum = ab322884ae45085c6468bd4556a5b4ba md5sum = 74275ad73b03114c69f80c8f8ae73374
[template-replicate-publish-slave-information] [template-replicate-publish-slave-information]
filename = templates/replicate-publish-slave-information.cfg.in filename = templates/replicate-publish-slave-information.cfg.in
...@@ -43,7 +43,7 @@ md5sum = d1a7a759aa2801c96ecf4445a33203f2 ...@@ -43,7 +43,7 @@ md5sum = d1a7a759aa2801c96ecf4445a33203f2
[template-custom-slave-list] [template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = c4d65c0e32e611083e4d63cded10431f md5sum = 181631c2acd06dc79508711123ea3b82
[template-not-found-html] [template-not-found-html]
filename = templates/notfound.html filename = templates/notfound.html
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{% set ssl_cache_access = "http://%s:%s/HTTPS" % (local_ipv4, cache_port) -%} {% set ssl_cache_access = "http://%s:%s/HTTPS" % (local_ipv4, cache_port) -%}
{% set TRUE_VALUES = ['y', 'yes', '1', 'true'] -%} {% set TRUE_VALUES = ['y', 'yes', '1', 'true'] -%}
{% set NGINX_TYPE_LIST = ['eventsource', 'notebook'] -%} {% set NGINX_TYPE_LIST = ['eventsource', 'notebook'] -%}
{% set generic_instance_parameter_dict = {'cache_access': cache_access,} -%} {% set generic_instance_parameter_dict = { 'cache_access': cache_access, 'local_ipv4': local_ipv4, 'http_port': http_port, 'https_port': https_port} %}
{% set slave_log_dict = {} -%} {% set slave_log_dict = {} -%}
{% if extra_slave_instance_list -%} {% if extra_slave_instance_list -%}
{% set slave_instance_information_list = [] -%} {% set slave_instance_information_list = [] -%}
...@@ -166,6 +166,8 @@ value = {{ dumps(slave_instance.get(cert_name)) }} ...@@ -166,6 +166,8 @@ value = {{ dumps(slave_instance.get(cert_name)) }}
{%- do slave_instance.__setitem__('login_certificate', login_certificate) %} {%- do slave_instance.__setitem__('login_certificate', login_certificate) %}
{%- do slave_instance.__setitem__('login_key', login_key) %} {%- do slave_instance.__setitem__('login_key', login_key) %}
{%- do slave_instance.__setitem__('login_ca_crt', login_ca_crt) %} {%- do slave_instance.__setitem__('login_ca_crt', login_ca_crt) %}
{%- do slave_parameter_dict.__setitem__('ssl_crt', login_certificate) %}
{%- do slave_parameter_dict.__setitem__('ssl_key', login_key) %}
{% if 'ssl_key' in slave_instance and 'ssl_crt' in slave_instance -%} {% if 'ssl_key' in slave_instance and 'ssl_crt' in slave_instance -%}
{% set cert_title = '%s-crt' % (slave_reference) -%} {% set cert_title = '%s-crt' % (slave_reference) -%}
{% set key_title = '%s-key' % (slave_reference) -%} {% set key_title = '%s-key' % (slave_reference) -%}
......
# TODO-Caddy <VirtualHost *:{{ https_port }}> {{ slave_parameter.get('apache_custom_https', '') }}
# TODO-Caddy {{ slave_parameter.get('apache_custom_https', '') }} {{ slave_parameter.get('apache_custom_http', '') }}
# TODO-Caddy </VirtualHost> \ No newline at end of file
# TODO-Caddy
# TODO-Caddy <VirtualHost *:{{ http_port }}>
# TODO-Caddy {{ slave_parameter.get('apache_custom_https', '') }}
# TODO-Caddy </VirtualHost>
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