Commit 4300660a authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Drop not needed apache references

Those kept are backward compatibility variables from the request.
parent af78aeb3
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = f686f765e55d1dce2e55a400f0714b3e md5sum = 906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend] [template-apache-frontend]
filename = instance-apache-frontend.cfg filename = instance-apache-frontend.cfg
md5sum = a96106f36e733d447e96236d1c4c69bc md5sum = 6ed51a3629d8eca72fc58cda652aea19
[template-apache-replicate] [template-apache-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 9e76028df7e93d3e32982884d5dc0913 md5sum = 361054e6566461e728ee62e2835904f9
[template-slave-list] [template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in filename = templates/apache-custom-slave-list.cfg.in
md5sum = 0394ed0e75f5ecb8266449bbf0b338d5 md5sum = 353d68f9ba6a318fd7ce0461d3bbc2c7
[template-slave-configuration] [template-slave-configuration]
filename = templates/custom-virtualhost.conf.in filename = templates/custom-virtualhost.conf.in
...@@ -42,7 +42,7 @@ md5sum = a8765b3c3af9f4f4f6437028aa42c58f ...@@ -42,7 +42,7 @@ md5sum = a8765b3c3af9f4f4f6437028aa42c58f
[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 = 0394ed0e75f5ecb8266449bbf0b338d5 md5sum = 353d68f9ba6a318fd7ce0461d3bbc2c7
[template-not-found-html] [template-not-found-html]
filename = templates/notfound.html filename = templates/notfound.html
......
...@@ -17,9 +17,9 @@ extends = ...@@ -17,9 +17,9 @@ extends =
parts += parts +=
template template
template-apache-frontend template-caddy-frontend
template-apache-replicate template-caddy-replicate
apache caddy
dcron dcron
logrotate logrotate
...@@ -40,13 +40,13 @@ url = ${:_profile_base_location_}/instance.cfg ...@@ -40,13 +40,13 @@ url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[template-apache-frontend] [template-caddy-frontend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg url = ${:_profile_base_location_}/instance-apache-frontend.cfg
output = ${buildout:directory}/template-apache-frontend.cfg output = ${buildout:directory}/template-caddy-frontend.cfg
mode = 0644 mode = 0644
[template-apache-replicate] [template-caddy-replicate]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in
mode = 0644 mode = 0644
...@@ -74,7 +74,7 @@ filename = Caddyfile.in ...@@ -74,7 +74,7 @@ filename = Caddyfile.in
[template-custom-slave-list] [template-custom-slave-list]
<=download-template <=download-template
filename = apache-default-slave-list.cfg.in filename = caddy-default-slave-list.cfg.in
[template-not-found-html] [template-not-found-html]
<=download-template <=download-template
...@@ -133,7 +133,7 @@ url = ${:_profile_base_location_}/templates/nginx.cfg.in ...@@ -133,7 +133,7 @@ url = ${:_profile_base_location_}/templates/nginx.cfg.in
output = ${buildout:directory}/template-nginx.cfg.in output = ${buildout:directory}/template-nginx.cfg.in
mode = 0644 mode = 0644
[template-apache-lazy-script-call] [template-caddy-lazy-script-call]
<=download-template <=download-template
filename = apache-lazy-script-call.sh.in filename = apache-lazy-script-call.sh.in
......
# Development profile of apache-frontend. # Development profile of caddy-frontend.
# Exactly the same as software.cfg, but fetch the slapos.cookbook # Exactly the same as software.cfg, but fetch the slapos.cookbook
# from git repository instead of fetching stable version, # from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment. # allowing to play with bleeding edge environment.
......
...@@ -26,11 +26,11 @@ context = ...@@ -26,11 +26,11 @@ context =
{% set frontend_list = [] %} {% set frontend_list = [] %}
{% set frontend_section_list = [] %} {% set frontend_section_list = [] %}
{% set request_dict = {} %} {% set request_dict = {} %}
{% set namebase = 'apache-frontend' -%} {% set namebase = 'caddy-frontend' -%}
# XXX Dirty hack, not possible to define default value before # XXX Dirty hack, not possible to define default value before
{% set sla_computer_apache_1_key = '-sla-1-computer_guid' -%} {% set sla_computer_caddy_1_key = '-sla-1-computer_guid' -%}
{% if not sla_computer_apache_1_key in slapparameter_dict -%} {% if not sla_computer_caddy_1_key in slapparameter_dict -%}
{% do slapparameter_dict.__setitem__(sla_computer_apache_1_key, '${slap-connection:computer-id}') -%} {% do slapparameter_dict.__setitem__(sla_computer_caddy_1_key, '${slap-connection:computer-id}') -%}
{% endif -%} {% endif -%}
# Here we request individualy each frontend. # Here we request individualy each frontend.
......
[buildout] [buildout]
parts = parts =
dynamic-template-apache-replicate dynamic-template-caddy-replicate
switch-softwaretype switch-softwaretype
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
...@@ -30,17 +30,17 @@ context = ...@@ -30,17 +30,17 @@ context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = $${dynamic-template-apache-replicate:rendered} default = $${dynamic-template-caddy-replicate:rendered}
RootSoftwareInstance = $${dynamic-template-apache-replicate:rendered} RootSoftwareInstance = $${dynamic-template-caddy-replicate:rendered}
custom-personal = $${dynamic-template-apache-replicate:rendered} custom-personal = $${dynamic-template-caddy-replicate:rendered}
single-default = ${template-apache-frontend:output} single-default = ${template-caddy-frontend:output}
single-custom-personal = ${template-apache-frontend:output} single-custom-personal = ${template-caddy-frontend:output}
replicate = $${dynamic-template-apache-replicate:rendered} replicate = $${dynamic-template-caddy-replicate:rendered}
[dynamic-template-apache-replicate] [dynamic-template-caddy-replicate]
< = jinja2-template-base < = jinja2-template-base
template = ${template-apache-replicate:target} template = ${template-caddy-replicate:target}
filename = instance-apache-replicate.cfg filename = instance-caddy-replicate.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw template_publish_slave_information ${template-replicate-publish-slave-information:target} raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
{% set cached_server_dict = {} -%} {% set cached_server_dict = {} -%}
{% set part_list = [] -%} {% set part_list = [] -%}
{% set cache_port = apache_configuration.get('cache-port') %} {% set cache_port = caddy_configuration.get('cache-port') %}
{% set cached_port = apache_configuration.get('cache-through-port') %} {% set cached_port = caddy_configuration.get('cache-through-port') %}
{% set ssl_cached_port = apache_configuration.get('ssl-cache-through-port') %} {% set ssl_cached_port = caddy_configuration.get('ssl-cache-through-port') %}
{% set cache_access = "http://%s:%s" % (local_ipv4, cache_port) -%} {% set cache_access = "http://%s:%s" % (local_ipv4, cache_port) -%}
{% 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'] -%}
...@@ -64,8 +64,8 @@ crl = {{ custom_ssl_directory }}/crl/ ...@@ -64,8 +64,8 @@ crl = {{ custom_ssl_directory }}/crl/
{% set slave_log_folder = logrotate_dict.get('backup') + '/' + slave_reference + "-logs" -%} {% set slave_log_folder = logrotate_dict.get('backup') + '/' + slave_reference + "-logs" -%}
{# Set Up log files #} {# Set Up log files #}
{% do slave_parameter_dict.__setitem__('access_log', '/'.join([apache_log_directory, '%s_access_log' % slave_reference])) -%} {% do slave_parameter_dict.__setitem__('access_log', '/'.join([caddy_log_directory, '%s_access_log' % slave_reference])) -%}
{% do slave_parameter_dict.__setitem__('error_log', '/'.join([apache_log_directory, '%s_error_log' % slave_reference])) -%} {% do slave_parameter_dict.__setitem__('error_log', '/'.join([caddy_log_directory, '%s_error_log' % slave_reference])) -%}
{% do slave_instance.__setitem__('access_log', slave_parameter_dict.get('access_log')) -%} {% do slave_instance.__setitem__('access_log', slave_parameter_dict.get('access_log')) -%}
{% do slave_instance.__setitem__('error_log', slave_parameter_dict.get('error_log')) -%} {% do slave_instance.__setitem__('error_log', slave_parameter_dict.get('error_log')) -%}
...@@ -124,12 +124,12 @@ backup = {{ slave_log_folder }} ...@@ -124,12 +124,12 @@ backup = {{ slave_log_folder }}
[{{slave_ln_section}}] [{{slave_ln_section}}]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = false stop-on-error = false
command = ln -s {{slave_parameter_dict.get('error_log')}} {{ slave_log_folder }}/apache-error.log && ln -s {{slave_parameter_dict.get('access_log')}} {{ slave_log_folder }}/apache-access.log command = ln -s {{slave_parameter_dict.get('error_log')}} {{ slave_log_folder }}/error.log && ln -s {{slave_parameter_dict.get('access_log')}} {{ slave_log_folder }}/access.log
{# Set password for slave #} {# Set password for slave #}
[{{slave_password_section}}] [{{slave_password_section}}]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
storage-path = {{apache_configuration_directory}}/.{{slave_reference}}.passwd storage-path = {{caddy_configuration_directory}}/.{{slave_reference}}.passwd
bytes = 8 bytes = 8
{# ################################################## #} {# ################################################## #}
...@@ -207,7 +207,7 @@ apache_custom_https = {{ dumps(apache_custom_https) }} ...@@ -207,7 +207,7 @@ apache_custom_https = {{ dumps(apache_custom_https) }}
{% if slave_type in NGINX_TYPE_LIST %} {% if slave_type in NGINX_TYPE_LIST %}
rendered = {{ nginx_configuration_directory }}/${:filename} rendered = {{ nginx_configuration_directory }}/${:filename}
{% else %} {% else %}
rendered = {{ apache_configuration_directory }}/${:filename} rendered = {{ caddy_configuration_directory }}/${:filename}
{% endif %} {% endif %}
...@@ -236,7 +236,7 @@ extra-context = ...@@ -236,7 +236,7 @@ extra-context =
{% do part_list.append(check_error_log_section_title) -%} {% do part_list.append(check_error_log_section_title) -%}
[{{ check_error_log_section_title }}] [{{ check_error_log_section_title }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/check-error-on-apache-log -l {{ slave_instance.get('error_log') }} -d 3600 command-line = {{ bin_directory }}/check-error-on-apache-log -l {{ slave_instance.get('error_log') }} -d 3600
filename = {{ check_error_log_section_title }} filename = {{ check_error_log_section_title }}
wrapper-path = {{ promise_directory }}/${:filename} wrapper-path = {{ promise_directory }}/${:filename}
...@@ -310,7 +310,7 @@ recipe = slapos.cookbook:publish ...@@ -310,7 +310,7 @@ recipe = slapos.cookbook:publish
< = jinja2-template-base < = jinja2-template-base
template = {{ template_cached_slave_configuration }} template = {{ template_cached_slave_configuration }}
filename = {{ '%s.conf' % slave_reference }} filename = {{ '%s.conf' % slave_reference }}
rendered = {{ apache_cached_configuration_directory }}/${:filename} rendered = {{ caddy_cached_configuration_directory }}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
section slave_parameter {{ slave_configuration_section_name }} section slave_parameter {{ slave_configuration_section_name }}
...@@ -363,15 +363,15 @@ ipv4-port = {{ nginx_https_port }} ...@@ -363,15 +363,15 @@ ipv4-port = {{ nginx_https_port }}
ipv6-port = {{ nginx_https_port }} ipv6-port = {{ nginx_https_port }}
{# Define log access #} {# Define log access #}
[apache-log-access] [caddy-log-access]
< = jinja2-template-base < = jinja2-template-base
template = {{frontend_configuration.get('template-log-access')}} template = {{frontend_configuration.get('template-log-access')}}
rendered = {{frontend_configuration.get('log-access-configuration')}} rendered = {{frontend_configuration.get('log-access-configuration')}}
extra-context = extra-context =
section slave_log_directory slave-log-directory-dict section slave_log_directory slave-log-directory-dict
section slave_password slave-password section slave_password slave-password
raw apache_log_directory {{apache_log_directory}} raw caddy_log_directory {{caddy_log_directory}}
raw apache_configuration_directory {{apache_configuration_directory}} raw caddy_configuration_directory {{caddy_configuration_directory}}
raw local_ipv4 {{ local_ipv4 }} raw local_ipv4 {{ local_ipv4 }}
raw global_ipv6 {{ global_ipv6 }} raw global_ipv6 {{ global_ipv6 }}
raw https_port {{ https_port }} raw https_port {{ https_port }}
...@@ -382,7 +382,7 @@ extra-context = ...@@ -382,7 +382,7 @@ extra-context =
raw error_log {{ error_log }} raw error_log {{ error_log }}
{# Publish information for the instance #} {# Publish information for the instance #}
[publish-apache-information] [publish-caddy-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
public-ipv4 = {{ public_ipv4 }} public-ipv4 = {{ public_ipv4 }}
private-ipv4 = {{ local_ipv4 }} private-ipv4 = {{ local_ipv4 }}
...@@ -397,8 +397,8 @@ parts += ...@@ -397,8 +397,8 @@ parts +=
{% for part in part_list -%} {% for part in part_list -%}
{{ ' %s' % part }} {{ ' %s' % part }}
{% endfor %} {% endfor %}
publish-apache-information publish-caddy-information
apache-log-access caddy-log-access
tunnel-6to4-base-http_port tunnel-6to4-base-http_port
tunnel-6to4-base-https_port tunnel-6to4-base-https_port
tunnel-6to4-base-cached_port tunnel-6to4-base-cached_port
......
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