Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Blinov
moodle_rebase10.1.2
Commits
4300660a
Commit
4300660a
authored
Jun 01, 2018
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Drop not needed apache references
Those kept are backward compatibility variables from the request.
parent
af78aeb3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
119 deletions
+118
-119
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+5
-5
software/caddy-frontend/common.cfg
software/caddy-frontend/common.cfg
+8
-8
software/caddy-frontend/development.cfg
software/caddy-frontend/development.cfg
+1
-1
software/caddy-frontend/instance-apache-frontend.cfg
software/caddy-frontend/instance-apache-frontend.cfg
+74
-75
software/caddy-frontend/instance-apache-replicate.cfg.in
software/caddy-frontend/instance-apache-replicate.cfg.in
+4
-4
software/caddy-frontend/instance.cfg
software/caddy-frontend/instance.cfg
+10
-10
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
.../caddy-frontend/templates/apache-custom-slave-list.cfg.in
+16
-16
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
4300660a
...
...
@@ -14,19 +14,19 @@
# not need these here).
[template]
filename = instance.cfg
md5sum =
f686f765e55d1dce2e55a400f0714b3e
md5sum =
906e5bd66b1265b8109a86b6ab46e91f
[template-apache-frontend]
filename = instance-apache-frontend.cfg
md5sum =
a96106f36e733d447e96236d1c4c69bc
md5sum =
6ed51a3629d8eca72fc58cda652aea19
[template-apache-replicate]
filename = instance-apache-replicate.cfg.in
md5sum =
9e76028df7e93d3e32982884d5dc0913
md5sum =
361054e6566461e728ee62e2835904f9
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
0394ed0e75f5ecb8266449bbf0b338d5
md5sum =
353d68f9ba6a318fd7ce0461d3bbc2c7
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
...
...
@@ -42,7 +42,7 @@ md5sum = a8765b3c3af9f4f4f6437028aa42c58f
[template-custom-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum =
0394ed0e75f5ecb8266449bbf0b338d5
md5sum =
353d68f9ba6a318fd7ce0461d3bbc2c7
[template-not-found-html]
filename = templates/notfound.html
...
...
software/caddy-frontend/common.cfg
View file @
4300660a
...
...
@@ -17,9 +17,9 @@ extends =
parts +=
template
template-
apache
-frontend
template-
apache
-replicate
apache
template-
caddy
-frontend
template-
caddy
-replicate
caddy
dcron
logrotate
...
...
@@ -40,13 +40,13 @@ url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
[template-
apache
-frontend]
[template-
caddy
-frontend]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg
output = ${buildout:directory}/template-
apache
-frontend.cfg
output = ${buildout:directory}/template-
caddy
-frontend.cfg
mode = 0644
[template-
apache
-replicate]
[template-
caddy
-replicate]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in
mode = 0644
...
...
@@ -74,7 +74,7 @@ filename = Caddyfile.in
[template-custom-slave-list]
<=download-template
filename =
apache
-default-slave-list.cfg.in
filename =
caddy
-default-slave-list.cfg.in
[template-not-found-html]
<=download-template
...
...
@@ -133,7 +133,7 @@ url = ${:_profile_base_location_}/templates/nginx.cfg.in
output = ${buildout:directory}/template-nginx.cfg.in
mode = 0644
[template-
apache
-lazy-script-call]
[template-
caddy
-lazy-script-call]
<=download-template
filename = apache-lazy-script-call.sh.in
...
...
software/caddy-frontend/development.cfg
View file @
4300660a
# Development profile of
apache
-frontend.
# Development profile of
caddy
-frontend.
# Exactly the same as software.cfg, but fetch the slapos.cookbook
# from git repository instead of fetching stable version,
# allowing to play with bleeding edge environment.
...
...
software/caddy-frontend/instance-apache-frontend.cfg
View file @
4300660a
...
...
@@ -7,22 +7,22 @@ parts =
cron-entry-logrotate
ca-frontend
certificate-authority
logrotate-entry-
apache
logrotate-entry-
caddy
logrotate-entry-nginx
apache
-frontend
switch-
apache
-softwaretype
caddy
-frontend
switch-
caddy
-softwaretype
frontend-caddy-graceful
frontend-nginx-graceful
not-found-html
promise-frontend-
apache
-configuration
promise-
apache
-frontend-v4-https
promise-
apache
-frontend-v4-http
promise-
apache
-frontend-v6-https
promise-
apache
-frontend-v6-http
promise-
apache
-frontend-cached
promise-
apache
-frontend-ssl-cached
promise-
apache
-is-process-older-than-dependency-set
promise-
apache
-mpm-watchdog
promise-frontend-
caddy
-configuration
promise-
caddy
-frontend-v4-https
promise-
caddy
-frontend-v4-http
promise-
caddy
-frontend-v6-https
promise-
caddy
-frontend-v6-http
promise-
caddy
-frontend-cached
promise-
caddy
-frontend-ssl-cached
promise-
caddy
-is-process-older-than-dependency-set
promise-
caddy
-mpm-watchdog
promise-nginx-frontend-v4-https
promise-nginx-frontend-v4-http
...
...
@@ -44,11 +44,11 @@ parts =
## Nginx
nginx-frontend
## Monitor for
apache
## Monitor for
Caddy
monitor-base
monitor-ats-cache-stats-wrapper
monitor-traffic-summary-last-stats-wrapper
monitor-
apache
-server-status-wrapper
monitor-
caddy
-server-status-wrapper
monitor-verify-re6st-connectivity
extends = ${monitor-template:output}
...
...
@@ -85,7 +85,7 @@ ca-dir = $${:srv}/ssl
varnginx = $${:var}/nginx
[switch-
apache
-softwaretype]
[switch-
caddy
-softwaretype]
recipe = slapos.cookbook:softwaretype
single-default = $${dynamic-custom-personal-template-slave-list:rendered}
single-custom-personal = $${dynamic-custom-personal-template-slave-list:rendered}
...
...
@@ -127,7 +127,7 @@ configuration.mpm-graceful-shutdown-timeout = 5
[frontend-configuration]
template-log-access = ${template-log-access:target}
log-access-configuration = $${directory:etc}/
apache-
log-access.conf
log-access-configuration = $${directory:etc}/log-access.conf
caddy-directory = ${caddy:location}
caddy-ipv6 = $${instance-parameter:ipv6-random}
caddy-https-port = $${instance-parameter:configuration.port}
...
...
@@ -160,9 +160,9 @@ template = ${template-slave-list:target}
filename = custom-personal-instance-slave-list.cfg
extensions = jinja2.ext.do
extra-context =
key
apache
_configuration_directory caddy-directory:slave-configuration
key
caddy
_configuration_directory caddy-directory:slave-configuration
key nginx_configuration_directory caddy-directory:nginx-slave-configuration
key
apache
_cached_configuration_directory caddy-directory:slave-with-cache-configuration
key
caddy
_cached_configuration_directory caddy-directory:slave-with-cache-configuration
key slave_with_cache_configuration_directory caddy-directory:slave-with-cache-configuration
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
...
...
@@ -172,7 +172,7 @@ extra-context =
key slave_instance_list instance-parameter:slave-instance-list
key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
key custom_ssl_directory caddy-directory:vh-ssl
key
apache
_log_directory caddy-directory:slave-log
key
caddy
_log_directory caddy-directory:slave-log
key local_ipv4 instance-parameter:ipv4-random
key local_ipv6 instance-parameter:ipv6-random
key global_ipv6 slap-network-information:global-ipv6
...
...
@@ -187,7 +187,7 @@ extra-context =
key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered
section logrotate_dict logrotate
section frontend_configuration frontend-configuration
section
apache_configuration apache
-configuration
section
caddy_configuration caddy
-configuration
section nginx_configuration nginx-configuration
key monitor_base_url monitor-instance-parameter:monitor-base-url
key promise_directory monitor-directory:promises
...
...
@@ -197,8 +197,8 @@ extra-context =
key login_key ca-frontend:key-file
key login_ca_crt ca-custom-frontend:rendered
key enable_http2_by_default instance-parameter:configuration.enable-http2-by-default
key access_log
apache
-configuration:access-log
key error_log
apache
-configuration:error-log
key access_log
caddy
-configuration:access-log
key error_log
caddy
-configuration:error-log
raw sixtunnel_executable ${6tunnel:location}/bin/6tunnel
raw service_directory $${directory:service}
...
...
@@ -213,11 +213,11 @@ extra-context =
key apache_custom_https instance-parameter:configuration.apache_custom_https
key apache_custom_http instance-parameter:configuration.apache_custom_http
# Deploy
Apache Frontend (new way, no recipe, jinja power)
[dynamic-
apache
-frontend-template]
# Deploy
Caddy Frontend with Jinja power
[dynamic-
caddy
-frontend-template]
< = jinja2-template-base
template = ${template-caddy-frontend-configuration:target}
rendered = $${
apache
-configuration:frontend-configuration}
rendered = $${
caddy
-configuration:frontend-configuration}
extra-context =
key httpd_home software-release-path:caddy-location
key httpd_mod_ssl_cache_directory caddy-directory:mod-ssl
...
...
@@ -229,17 +229,17 @@ extra-context =
key login_ca_crt ca-custom-frontend:rendered
key ca_dir certificate-authority:ca-dir
key ca_crl certificate-authority:ca-crl
key access_log
apache
-configuration:access-log
key access_log
caddy
-configuration:access-log
key slave_configuration_directory caddy-directory:slave-configuration
key cached_port
apache
-configuration:cache-through-port
key ssl_cached_port
apache
-configuration:ssl-cache-through-port
key cached_port
caddy
-configuration:cache-through-port
key ssl_cached_port
caddy
-configuration:ssl-cache-through-port
key slave_with_cache_configuration_directory caddy-directory:slave-with-cache-configuration
section frontend_configuration frontend-configuration
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
key local_ipv4 instance-parameter:ipv4-random
key global_ipv6 slap-network-information:global-ipv6
key error_log
apache
-configuration:error-log
key error_log
caddy
-configuration:error-log
key username slap-parameter:monitor-username
key password slap-parameter:monitor-password
...
...
@@ -250,11 +250,11 @@ rendered = $${directory:bin}/caddy-wrapper
mode = 0700
extra-context =
raw caddy ${caddy:output}
key conf dynamic-
apache
-frontend-template:rendered
key log
apache
-configuration:error-log
key conf dynamic-
caddy
-frontend-template:rendered
key log
caddy
-configuration:error-log
key grace instance-parameter:configuration.mpm-graceful-shutdown-timeout
[
apache
-frontend]
[
caddy
-frontend]
recipe = slapos.cookbook:wrapper
command-line = $${caddy-wrapper:rendered} -pidfile $${caddy-configuration:pid-file}
wrapper-path = $${directory:service}/frontend_caddy
...
...
@@ -279,10 +279,10 @@ vh-ssl = $${:slave-configuration}/ssl
slave-log = $${directory:log}/httpd
nginx-slave-configuration = $${directory:etc}/nginx-slave-conf.d/
[
apache
-configuration]
[
caddy
-configuration]
frontend-configuration = $${directory:etc}/Caddyfile
access-log = $${directory:log}/frontend-a
pache-a
ccess.log
error-log = $${directory:log}/frontend-
apache-
error.log
access-log = $${directory:log}/frontend-access.log
error-log = $${directory:log}/frontend-error.log
pid-file = $${directory:run}/httpd.pid
frontend-configuration-verification = $${caddy-wrapper:rendered} -validate > /dev/null
frontend-graceful-command = $${:frontend-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
...
...
@@ -292,7 +292,6 @@ cache-port = $${trafficserver-variable:input-port}
cache-through-port = 26011
ssl-cache-through-port = 26012
# Create wrapper for "apachectl conftest" in bin
[configtest]
recipe = slapos.cookbook:wrapper
command-line = $${caddy-wrapper:rendered} -validate
...
...
@@ -320,8 +319,8 @@ crl = $${directory:ca-dir}/crl/
[ca-frontend]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = $${cadirectory:certs}/
apache_
frontend.key
cert-file = $${cadirectory:certs}/
apache_
frontend.crt
key-file = $${cadirectory:certs}/frontend.key
cert-file = $${cadirectory:certs}/frontend.crt
executable = $${directory:service}/frontend_caddy
wrapper = $${directory:service}/frontend_caddy
key-content = $${instance-parameter:configuration.apache-key}
...
...
@@ -332,7 +331,7 @@ name = $${instance-parameter:configuration.domain}
[ca-custom-frontend]
< = jinja2-template-base
template = ${template-empty:target}
rendered = $${cadirectory:certs}/
apache_
frontend.ca.crt
rendered = $${cadirectory:certs}/frontend.ca.crt
extra-context =
key content instance-parameter:configuration.apache-ca-certificate
...
...
@@ -371,11 +370,11 @@ logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${directory:srv}/logrotate.status
[logrotate-entry-
apache
]
[logrotate-entry-
caddy
]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name =
apache
log = $${
apache-configuration:error-log} $${apache
-configuration:access-log}
name =
caddy
log = $${
caddy-configuration:error-log} $${caddy
-configuration:access-log}
frequency = daily
rotatep-num = 30
post = $${frontend-caddy-lazy-graceful:rendered} &
...
...
@@ -386,7 +385,7 @@ create = true
[logrotate-entry-nginx]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name =
apache
-nginx
name =
caddy
-nginx
log = $${nginx-configuration:error_log} $${nginx-configuration:access_log}
frequency = daily
rotatep-num = 30
...
...
@@ -412,8 +411,8 @@ reload-path = $${directory:etc-run}/trafficserver-reload
local-ip = $${instance-parameter:ipv4-random}
input-port = 23432
hostname = $${instance-parameter:configuration.frontend-name}
remap = map /HTTPS/ http://$${instance-parameter:ipv4-random}:$${
apache
-configuration:ssl-cache-through-port}
map / http://$${instance-parameter:ipv4-random}:$${
apache
-configuration:cache-through-port}
remap = map /HTTPS/ http://$${instance-parameter:ipv4-random}:$${
caddy
-configuration:ssl-cache-through-port}
map / http://$${instance-parameter:ipv4-random}:$${
caddy
-configuration:cache-through-port}
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
cache-path = $${trafficserver-directory:cache-path}
...
...
@@ -504,14 +503,14 @@ mode = 700
### End of ATS sections
###
Apaches
Graceful and promises
###
Caddy
Graceful and promises
[frontend-caddy-graceful-bin]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${directory:bin}/frontend-caddy-safe-graceful
mode = 0700
extra-context =
key content
apache
-configuration:frontend-graceful-command
key content
caddy
-configuration:frontend-graceful-command
[frontend-caddy-graceful]
< = jinja2-template-base
...
...
@@ -522,73 +521,73 @@ extra-context =
key directory_run directory:run
key directory_etc directory:etc
key directory_bin directory:bin
key caddy_graceful_reload_command
apache
-configuration:frontend-graceful-command
key caddy_graceful_reload_command
caddy
-configuration:frontend-graceful-command
[frontend-caddy-lazy-graceful]
< = jinja2-template-base
template = ${template-
apache
-lazy-script-call:target}
template = ${template-
caddy
-lazy-script-call:target}
rendered = $${directory:bin}/frontend-caddy-lazy-graceful
mode = 0700
pid-file = $${directory:run}/lazy-graceful.pid
extra-context =
key pid_file :pid-file
raw wait_time 60
key lazy_command
apache
-configuration:frontend-graceful-command
key lazy_command
caddy
-configuration:frontend-graceful-command
# Promises checking configuration:
[promise-frontend-
apache
-configuration]
[promise-frontend-
caddy
-configuration]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${directory:promise}/frontend-
apache
-configuration-promise
rendered = $${directory:promise}/frontend-
caddy
-configuration-promise
mode = 0700
extra-context =
key content
apache
-configuration:frontend-configuration-verification
key content
caddy
-configuration:frontend-configuration-verification
[promise-
apache
-frontend-v4-https]
[promise-
caddy
-frontend-v4-https]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_frontend_ipv4_https
path = $${directory:promise}/
caddy
_frontend_ipv4_https
hostname = $${instance-parameter:ipv4-random}
port = $${instance-parameter:configuration.port}
[promise-
apache
-frontend-v4-http]
[promise-
caddy
-frontend-v4-http]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_frontend_ipv4_http
path = $${directory:promise}/
caddy
_frontend_ipv4_http
hostname = $${instance-parameter:ipv4-random}
port = $${instance-parameter:configuration.plain_http_port}
[promise-
apache
-frontend-v6-https]
[promise-
caddy
-frontend-v6-https]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_frontend_ipv6_https
path = $${directory:promise}/
caddy
_frontend_ipv6_https
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:configuration.port}
[promise-
apache
-frontend-v6-http]
[promise-
caddy
-frontend-v6-http]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_frontend_ipv6_http
path = $${directory:promise}/
caddy
_frontend_ipv6_http
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:configuration.plain_http_port}
[promise-
apache
-frontend-cached]
[promise-
caddy
-frontend-cached]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_cached
path = $${directory:promise}/
caddy
_cached
hostname = $${instance-parameter:ipv4-random}
port = $${
apache
-configuration:cache-through-port}
port = $${
caddy
-configuration:cache-through-port}
[promise-
apache
-frontend-ssl-cached]
[promise-
caddy
-frontend-ssl-cached]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_ssl_cached
path = $${directory:promise}/
caddy
_ssl_cached
hostname = $${instance-parameter:ipv4-random}
port = $${
apache
-configuration:ssl-cache-through-port}
port = $${
caddy
-configuration:ssl-cache-through-port}
[promise-
apache
-is-process-older-than-dependency-set]
[promise-
caddy
-is-process-older-than-dependency-set]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/is-process-older-than-dependency-set $${
apache
-configuration:pid-file}
wrapper-path = $${directory:promise}/
apache
-frontend-is-running-actual-software-release
command-line = ${buildout:bin-directory}/is-process-older-than-dependency-set $${
caddy
-configuration:pid-file}
wrapper-path = $${directory:promise}/
caddy
-frontend-is-running-actual-software-release
[promise-
apache
-mpm-watchdog]
[promise-
caddy
-mpm-watchdog]
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/apache-mpm-watchdog --url http://$${instance-parameter:ipv4-random}:$${instance-parameter:configuration.plain_http_port}/server-status -u admin -p $${monitor-htpasswd:passwd} -d $${directory:run}/apache-mpm-watchdog.json
wrapper-path = $${directory:promise}/
apache
-mpm-watchdog
wrapper-path = $${directory:promise}/
caddy
-mpm-watchdog
[slap_connection]
...
...
@@ -656,14 +655,14 @@ command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:
extra-context =
key content monitor-ats-cache-stats-wrapper:command
[monitor-
apache
-server-status-wrapper]
[monitor-
caddy
-server-status-wrapper]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${monitor-directory:reports}/monitor-
apache
-server-status-wrapper
rendered = $${monitor-directory:reports}/monitor-
caddy
-server-status-wrapper
mode = 0700
command = ${curl:location}/bin/curl -s http://$${instance-parameter:ipv4-random}:$${instance-parameter:configuration.plain_http_port}/server-status -u $${monitor-instance-parameter:username}:$${monitor-htpasswd:passwd} 2>&1
extra-context =
key content monitor-
apache
-server-status-wrapper:command
key content monitor-
caddy
-server-status-wrapper:command
[monitor-ats-cache-stats-config]
< = jinja2-template-base
...
...
software/caddy-frontend/instance-apache-replicate.cfg.in
View file @
4300660a
...
...
@@ -26,11 +26,11 @@ context =
{% set frontend_list = [] %}
{% set frontend_section_list = [] %}
{% set request_dict = {} %}
{% set namebase = '
apache
-frontend' -%}
{% set namebase = '
caddy
-frontend' -%}
# XXX Dirty hack, not possible to define default value before
{% set sla_computer_
apache
_1_key = '-sla-1-computer_guid' -%}
{% if not sla_computer_
apache
_1_key in slapparameter_dict -%}
{% do slapparameter_dict.__setitem__(sla_computer_
apache
_1_key, '${slap-connection:computer-id}') -%}
{% set sla_computer_
caddy
_1_key = '-sla-1-computer_guid' -%}
{% if not sla_computer_
caddy
_1_key in slapparameter_dict -%}
{% do slapparameter_dict.__setitem__(sla_computer_
caddy
_1_key, '${slap-connection:computer-id}') -%}
{% endif -%}
# Here we request individualy each frontend.
...
...
software/caddy-frontend/instance.cfg
View file @
4300660a
[buildout]
parts =
dynamic-template-
apache
-replicate
dynamic-template-
caddy
-replicate
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
...
...
@@ -30,17 +30,17 @@ context =
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${dynamic-template-
apache
-replicate:rendered}
RootSoftwareInstance = $${dynamic-template-
apache
-replicate:rendered}
custom-personal = $${dynamic-template-
apache
-replicate:rendered}
single-default = ${template-
apache
-frontend:output}
single-custom-personal = ${template-
apache
-frontend:output}
replicate = $${dynamic-template-
apache
-replicate:rendered}
default = $${dynamic-template-
caddy
-replicate:rendered}
RootSoftwareInstance = $${dynamic-template-
caddy
-replicate:rendered}
custom-personal = $${dynamic-template-
caddy
-replicate:rendered}
single-default = ${template-
caddy
-frontend:output}
single-custom-personal = ${template-
caddy
-frontend:output}
replicate = $${dynamic-template-
caddy
-replicate:rendered}
[dynamic-template-
apache
-replicate]
[dynamic-template-
caddy
-replicate]
< = jinja2-template-base
template = ${template-
apache
-replicate:target}
filename = instance-
apache
-replicate.cfg
template = ${template-
caddy
-replicate:target}
filename = instance-
caddy
-replicate.cfg
extensions = jinja2.ext.do
extra-context =
raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
...
...
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
4300660a
...
...
@@ -2,9 +2,9 @@
{% set cached_server_dict = {} -%}
{% set part_list = [] -%}
{% set cache_port =
apache
_configuration.get('cache-port') %}
{% set cached_port =
apache
_configuration.get('cache-through-port') %}
{% set ssl_cached_port =
apache
_configuration.get('ssl-cache-through-port') %}
{% set cache_port =
caddy
_configuration.get('cache-port') %}
{% set cached_port =
caddy
_configuration.get('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 ssl_cache_access = "http://%s:%s/HTTPS" % (local_ipv4, cache_port) -%}
{% set TRUE_VALUES = ['y', 'yes', '1', 'true'] -%}
...
...
@@ -64,8 +64,8 @@ crl = {{ custom_ssl_directory }}/crl/
{% set slave_log_folder = logrotate_dict.get('backup') + '/' + slave_reference + "-logs" -%}
{# 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__('error_log', '/'.join([
apache
_log_directory, '%s_error_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([
caddy
_log_directory, '%s_error_log' % slave_reference])) -%}
{% do slave_instance.__setitem__('access_log', slave_parameter_dict.get('access_log')) -%}
{% do slave_instance.__setitem__('error_log', slave_parameter_dict.get('error_log')) -%}
...
...
@@ -124,12 +124,12 @@ backup = {{ slave_log_folder }}
[{{slave_ln_section}}]
recipe = plone.recipe.command
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 #}
[{{slave_password_section}}]
recipe = slapos.cookbook:generate.password
storage-path = {{
apache
_configuration_directory}}/.{{slave_reference}}.passwd
storage-path = {{
caddy
_configuration_directory}}/.{{slave_reference}}.passwd
bytes = 8
{# ################################################## #}
...
...
@@ -207,7 +207,7 @@ apache_custom_https = {{ dumps(apache_custom_https) }}
{% if slave_type in NGINX_TYPE_LIST %}
rendered = {{ nginx_configuration_directory }}/${:filename}
{% else %}
rendered = {{
apache
_configuration_directory }}/${:filename}
rendered = {{
caddy
_configuration_directory }}/${:filename}
{% endif %}
...
...
@@ -236,7 +236,7 @@ extra-context =
{% do part_list.append(check_error_log_section_title) -%}
[{{ check_error_log_section_title }}]
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 }}
wrapper-path = {{ promise_directory }}/${:filename}
...
...
@@ -310,7 +310,7 @@ recipe = slapos.cookbook:publish
< = jinja2-template-base
template = {{ template_cached_slave_configuration }}
filename = {{ '%s.conf' % slave_reference }}
rendered = {{
apache
_cached_configuration_directory }}/${:filename}
rendered = {{
caddy
_cached_configuration_directory }}/${:filename}
extensions = jinja2.ext.do
extra-context =
section slave_parameter {{ slave_configuration_section_name }}
...
...
@@ -363,15 +363,15 @@ ipv4-port = {{ nginx_https_port }}
ipv6-port = {{ nginx_https_port }}
{# Define log access #}
[
apache
-log-access]
[
caddy
-log-access]
< = jinja2-template-base
template = {{frontend_configuration.get('template-log-access')}}
rendered = {{frontend_configuration.get('log-access-configuration')}}
extra-context =
section slave_log_directory slave-log-directory-dict
section slave_password slave-password
raw
apache_log_directory {{apache
_log_directory}}
raw
apache_configuration_directory {{apache
_configuration_directory}}
raw
caddy_log_directory {{caddy
_log_directory}}
raw
caddy_configuration_directory {{caddy
_configuration_directory}}
raw local_ipv4 {{ local_ipv4 }}
raw global_ipv6 {{ global_ipv6 }}
raw https_port {{ https_port }}
...
...
@@ -382,7 +382,7 @@ extra-context =
raw error_log {{ error_log }}
{# Publish information for the instance #}
[publish-
apache
-information]
[publish-
caddy
-information]
recipe = slapos.cookbook:publish
public-ipv4 = {{ public_ipv4 }}
private-ipv4 = {{ local_ipv4 }}
...
...
@@ -397,8 +397,8 @@ parts +=
{% for part in part_list -%}
{{ ' %s' % part }}
{% endfor %}
publish-
apache
-information
apache
-log-access
publish-
caddy
-information
caddy
-log-access
tunnel-6to4-base-http_port
tunnel-6to4-base-https_port
tunnel-6to4-base-cached_port
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment