Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
410152ca
Commit
410152ca
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
f0aeb4f3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
120 additions
and
122 deletions
+120
-122
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+6
-6
software/caddy-frontend/common.cfg
software/caddy-frontend/common.cfg
+7
-7
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
+76
-77
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/Caddyfile.in
software/caddy-frontend/templates/Caddyfile.in
+0
-1
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 @
410152ca
...
@@ -15,19 +15,19 @@
...
@@ -15,19 +15,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 =
ebe6c743cdb7ee986eb4a78dec000403
md5sum =
a657a0d40ba17d1f8a55602eacdb6c76
[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 =
062cc103aa7f2b458bfea2002ca6a329
md5sum =
5e625fd08713d01184e8665aae6759fc
[template-slave-configuration]
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
filename = templates/custom-virtualhost.conf.in
...
@@ -39,11 +39,11 @@ md5sum = 665e83d660c9b779249b2179d7ce4b4e
...
@@ -39,11 +39,11 @@ md5sum = 665e83d660c9b779249b2179d7ce4b4e
[template-caddy-frontend-configuration]
[template-caddy-frontend-configuration]
filename = templates/Caddyfile.in
filename = templates/Caddyfile.in
md5sum =
70aa99bcab47d0c19737fc62d5c3dedf
md5sum =
134b768249f6067d29e82added7f8cea
[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 =
062cc103aa7f2b458bfea2002ca6a329
md5sum =
5e625fd08713d01184e8665aae6759fc
[template-not-found-html]
[template-not-found-html]
filename = templates/notfound.html
filename = templates/notfound.html
...
...
software/caddy-frontend/common.cfg
View file @
410152ca
...
@@ -17,8 +17,8 @@ extends =
...
@@ -17,8 +17,8 @@ extends =
parts +=
parts +=
template
template
template-
apache
-frontend
template-
caddy
-frontend
template-
apache
-replicate
template-
caddy
-replicate
caddy
caddy
dcron
dcron
...
@@ -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
...
...
software/caddy-frontend/development.cfg
View file @
410152ca
# 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.
...
...
software/caddy-frontend/instance-apache-frontend.cfg
View file @
410152ca
...
@@ -7,22 +7,22 @@ parts =
...
@@ -7,22 +7,22 @@ parts =
cron-entry-logrotate
cron-entry-logrotate
ca-frontend
ca-frontend
certificate-authority
certificate-authority
logrotate-entry-
apache
logrotate-entry-
caddy
logrotate-entry-nginx
logrotate-entry-nginx
apache
-frontend
caddy
-frontend
switch-
apache
-softwaretype
switch-
caddy
-softwaretype
frontend-caddy-graceful
frontend-caddy-graceful
frontend-nginx-graceful
frontend-nginx-graceful
not-found-html
not-found-html
promise-frontend-
apache
-configuration
promise-frontend-
caddy
-configuration
promise-
apache
-frontend-v4-https
promise-
caddy
-frontend-v4-https
promise-
apache
-frontend-v4-http
promise-
caddy
-frontend-v4-http
promise-
apache
-frontend-v6-https
promise-
caddy
-frontend-v6-https
promise-
apache
-frontend-v6-http
promise-
caddy
-frontend-v6-http
promise-
apache
-frontend-cached
promise-
caddy
-frontend-cached
promise-
apache
-frontend-ssl-cached
promise-
caddy
-frontend-ssl-cached
promise-
apache
-is-process-older-than-dependency-set
promise-
caddy
-is-process-older-than-dependency-set
promise-
apache
-mpm-watchdog
promise-
caddy
-mpm-watchdog
promise-nginx-frontend-v4-https
promise-nginx-frontend-v4-https
promise-nginx-frontend-v4-http
promise-nginx-frontend-v4-http
...
@@ -44,11 +44,11 @@ parts =
...
@@ -44,11 +44,11 @@ parts =
## Nginx
## Nginx
nginx-frontend
nginx-frontend
## Monitor for
apache
## Monitor for
Caddy
monitor-base
monitor-base
monitor-ats-cache-stats-wrapper
monitor-ats-cache-stats-wrapper
monitor-traffic-summary-last-stats-wrapper
monitor-traffic-summary-last-stats-wrapper
monitor-
apache
-server-status-wrapper
monitor-
caddy
-server-status-wrapper
monitor-verify-re6st-connectivity
monitor-verify-re6st-connectivity
extends = ${monitor-template:output}
extends = ${monitor-template:output}
...
@@ -85,7 +85,7 @@ ca-dir = $${:srv}/ssl
...
@@ -85,7 +85,7 @@ ca-dir = $${:srv}/ssl
varnginx = $${:var}/nginx
varnginx = $${:var}/nginx
[switch-
apache
-softwaretype]
[switch-
caddy
-softwaretype]
recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:softwaretype
single-default = $${dynamic-custom-personal-template-slave-list:rendered}
single-default = $${dynamic-custom-personal-template-slave-list:rendered}
single-custom-personal = $${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
...
@@ -127,7 +127,7 @@ configuration.mpm-graceful-shutdown-timeout = 5
[frontend-configuration]
[frontend-configuration]
template-log-access = ${template-log-access:target}
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-directory = ${caddy:location}
caddy-ipv6 = $${instance-parameter:ipv6-random}
caddy-ipv6 = $${instance-parameter:ipv6-random}
caddy-https-port = $${instance-parameter:configuration.port}
caddy-https-port = $${instance-parameter:configuration.port}
...
@@ -160,9 +160,9 @@ template = ${template-slave-list:target}
...
@@ -160,9 +160,9 @@ template = ${template-slave-list:target}
filename = custom-personal-instance-slave-list.cfg
filename = custom-personal-instance-slave-list.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
extra-context =
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 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 slave_with_cache_configuration_directory caddy-directory:slave-with-cache-configuration
key http_port instance-parameter:configuration.plain_http_port
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
key https_port instance-parameter:configuration.port
...
@@ -172,7 +172,7 @@ extra-context =
...
@@ -172,7 +172,7 @@ extra-context =
key slave_instance_list instance-parameter:slave-instance-list
key slave_instance_list instance-parameter:slave-instance-list
key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
key custom_ssl_directory caddy-directory:vh-ssl
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_ipv4 instance-parameter:ipv4-random
key local_ipv6 instance-parameter:ipv6-random
key local_ipv6 instance-parameter:ipv6-random
key global_ipv6 slap-network-information:global-ipv6
key global_ipv6 slap-network-information:global-ipv6
...
@@ -187,7 +187,7 @@ extra-context =
...
@@ -187,7 +187,7 @@ extra-context =
key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered
key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered
section logrotate_dict logrotate
section logrotate_dict logrotate
section frontend_configuration frontend-configuration
section frontend_configuration frontend-configuration
section
apache_configuration apache
-configuration
section
caddy_configuration caddy
-configuration
section nginx_configuration nginx-configuration
section nginx_configuration nginx-configuration
key monitor_base_url monitor-instance-parameter:monitor-base-url
key monitor_base_url monitor-instance-parameter:monitor-base-url
key promise_directory monitor-directory:promises
key promise_directory monitor-directory:promises
...
@@ -199,8 +199,8 @@ extra-context =
...
@@ -199,8 +199,8 @@ extra-context =
raw sixtunnel_executable ${6tunnel:location}/bin/6tunnel
raw sixtunnel_executable ${6tunnel:location}/bin/6tunnel
raw service_directory $${directory:service}
raw service_directory $${directory:service}
key enable_http2_by_default instance-parameter:configuration.enable-http2-by-default
key enable_http2_by_default instance-parameter:configuration.enable-http2-by-default
key access_log
apache
-configuration:access-log
key access_log
caddy
-configuration:access-log
key error_log
apache
-configuration:error-log
key error_log
caddy
-configuration:error-log
[dynamic-virtualhost-template-slave]
[dynamic-virtualhost-template-slave]
<= jinja2-template-base
<= jinja2-template-base
...
@@ -213,35 +213,35 @@ extra-context =
...
@@ -213,35 +213,35 @@ extra-context =
key apache_custom_https instance-parameter:configuration.apache_custom_https
key apache_custom_https instance-parameter:configuration.apache_custom_https
key apache_custom_http instance-parameter:configuration.apache_custom_http
key apache_custom_http instance-parameter:configuration.apache_custom_http
# Deploy
Apache Frontend (new way, no recipe, jinja power)
# Deploy
Caddy Frontend with Jinja power
[dynamic-
apache
-frontend-template]
[dynamic-
caddy
-frontend-template]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-caddy-frontend-configuration:target}
template = ${template-caddy-frontend-configuration:target}
rendered = $${
apache
-configuration:frontend-configuration}
rendered = $${
caddy
-configuration:frontend-configuration}
extra-context =
extra-context =
key httpd_home software-release-path:caddy-location
key httpd_home software-release-path:caddy-location
key httpd_mod_ssl_cache_directory caddy-directory:mod-ssl
key httpd_mod_ssl_cache_directory caddy-directory:mod-ssl
key document_root caddy-directory:document-root
key document_root caddy-directory:document-root
key instance_home buildout:directory
key instance_home buildout:directory
key server_admin instance-parameter:configuration.server-admin
key server_admin instance-parameter:configuration.server-admin
key protected_path
apache
-configuration:protected-path
key protected_path
caddy
-configuration:protected-path
key access_control_string
apache
-configuration:access-control-string
key access_control_string
caddy
-configuration:access-control-string
key login_certificate ca-frontend:cert-file
key login_certificate ca-frontend:cert-file
key login_key ca-frontend:key-file
key login_key ca-frontend:key-file
key login_ca_crt ca-custom-frontend:rendered
key login_ca_crt ca-custom-frontend:rendered
key ca_dir certificate-authority:ca-dir
key ca_dir certificate-authority:ca-dir
key ca_crl certificate-authority:ca-crl
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 slave_configuration_directory caddy-directory:slave-configuration
key cached_port
apache
-configuration:cache-through-port
key cached_port
caddy
-configuration:cache-through-port
key ssl_cached_port
apache
-configuration:ssl-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
key slave_with_cache_configuration_directory caddy-directory:slave-with-cache-configuration
section frontend_configuration frontend-configuration
section frontend_configuration frontend-configuration
key http_port instance-parameter:configuration.plain_http_port
key http_port instance-parameter:configuration.plain_http_port
key https_port instance-parameter:configuration.port
key https_port instance-parameter:configuration.port
key local_ipv4 instance-parameter:ipv4-random
key local_ipv4 instance-parameter:ipv4-random
key global_ipv6 slap-network-information:global-ipv6
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 username slap-parameter:monitor-username
key password slap-parameter:monitor-password
key password slap-parameter:monitor-password
...
@@ -252,11 +252,11 @@ rendered = $${directory:bin}/caddy-wrapper
...
@@ -252,11 +252,11 @@ rendered = $${directory:bin}/caddy-wrapper
mode = 0700
mode = 0700
extra-context =
extra-context =
raw caddy ${caddy:output}
raw caddy ${caddy:output}
key conf dynamic-
apache
-frontend-template:rendered
key conf dynamic-
caddy
-frontend-template:rendered
key log
apache
-configuration:error-log
key log
caddy
-configuration:error-log
key grace instance-parameter:configuration.mpm-graceful-shutdown-timeout
key grace instance-parameter:configuration.mpm-graceful-shutdown-timeout
[
apache
-frontend]
[
caddy
-frontend]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line = $${caddy-wrapper:rendered} -pidfile $${caddy-configuration:pid-file}
command-line = $${caddy-wrapper:rendered} -pidfile $${caddy-configuration:pid-file}
wrapper-path = $${directory:service}/frontend_caddy
wrapper-path = $${directory:service}/frontend_caddy
...
@@ -281,10 +281,10 @@ vh-ssl = $${:slave-configuration}/ssl
...
@@ -281,10 +281,10 @@ vh-ssl = $${:slave-configuration}/ssl
slave-log = $${directory:log}/httpd
slave-log = $${directory:log}/httpd
nginx-slave-configuration = $${directory:etc}/nginx-slave-conf.d/
nginx-slave-configuration = $${directory:etc}/nginx-slave-conf.d/
[
apache
-configuration]
[
caddy
-configuration]
frontend-configuration = $${directory:etc}/Caddyfile
frontend-configuration = $${directory:etc}/Caddyfile
access-log = $${directory:log}/frontend-a
pache-a
ccess.log
access-log = $${directory:log}/frontend-access.log
error-log = $${directory:log}/frontend-
apache-
error.log
error-log = $${directory:log}/frontend-error.log
pid-file = $${directory:run}/httpd.pid
pid-file = $${directory:run}/httpd.pid
protected-path = /
protected-path = /
access-control-string = none
access-control-string = none
...
@@ -296,7 +296,6 @@ cache-port = $${trafficserver-variable:input-port}
...
@@ -296,7 +296,6 @@ cache-port = $${trafficserver-variable:input-port}
cache-through-port = 26011
cache-through-port = 26011
ssl-cache-through-port = 26012
ssl-cache-through-port = 26012
# Create wrapper for "apachectl conftest" in bin
[configtest]
[configtest]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line = $${caddy-wrapper:rendered} -validate
command-line = $${caddy-wrapper:rendered} -validate
...
@@ -324,8 +323,8 @@ crl = $${directory:ca-dir}/crl/
...
@@ -324,8 +323,8 @@ crl = $${directory:ca-dir}/crl/
[ca-frontend]
[ca-frontend]
<= certificate-authority
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
recipe = slapos.cookbook:certificate_authority.request
key-file = $${cadirectory:certs}/
apache_
frontend.key
key-file = $${cadirectory:certs}/frontend.key
cert-file = $${cadirectory:certs}/
apache_
frontend.crt
cert-file = $${cadirectory:certs}/frontend.crt
executable = $${directory:service}/frontend_caddy
executable = $${directory:service}/frontend_caddy
wrapper = $${directory:service}/frontend_caddy
wrapper = $${directory:service}/frontend_caddy
key-content = $${instance-parameter:configuration.apache-key}
key-content = $${instance-parameter:configuration.apache-key}
...
@@ -336,7 +335,7 @@ name = $${instance-parameter:configuration.domain}
...
@@ -336,7 +335,7 @@ name = $${instance-parameter:configuration.domain}
[ca-custom-frontend]
[ca-custom-frontend]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-empty:target}
template = ${template-empty:target}
rendered = $${cadirectory:certs}/
apache_
frontend.ca.crt
rendered = $${cadirectory:certs}/frontend.ca.crt
extra-context =
extra-context =
key content instance-parameter:configuration.apache-ca-certificate
key content instance-parameter:configuration.apache-ca-certificate
...
@@ -375,11 +374,11 @@ logrotate-entries = $${directory:logrotate-entries}
...
@@ -375,11 +374,11 @@ logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
backup = $${directory:logrotate-backup}
state-file = $${directory:srv}/logrotate.status
state-file = $${directory:srv}/logrotate.status
[logrotate-entry-
apache
]
[logrotate-entry-
caddy
]
<= logrotate
<= logrotate
recipe = slapos.cookbook:logrotate.d
recipe = slapos.cookbook:logrotate.d
name =
apache
name =
caddy
log = $${
apache-configuration:error-log} $${apache
-configuration:access-log}
log = $${
caddy-configuration:error-log} $${caddy
-configuration:access-log}
frequency = daily
frequency = daily
rotatep-num = 30
rotatep-num = 30
post = $${frontend-caddy-lazy-graceful:rendered} &
post = $${frontend-caddy-lazy-graceful:rendered} &
...
@@ -390,7 +389,7 @@ create = true
...
@@ -390,7 +389,7 @@ create = true
[logrotate-entry-nginx]
[logrotate-entry-nginx]
<= logrotate
<= logrotate
recipe = slapos.cookbook:logrotate.d
recipe = slapos.cookbook:logrotate.d
name =
apache
-nginx
name =
caddy
-nginx
log = $${nginx-configuration:error_log} $${nginx-configuration:access_log}
log = $${nginx-configuration:error_log} $${nginx-configuration:access_log}
frequency = daily
frequency = daily
rotatep-num = 30
rotatep-num = 30
...
@@ -416,8 +415,8 @@ reload-path = $${directory:etc-run}/trafficserver-reload
...
@@ -416,8 +415,8 @@ reload-path = $${directory:etc-run}/trafficserver-reload
local-ip = $${instance-parameter:ipv4-random}
local-ip = $${instance-parameter:ipv4-random}
input-port = 23432
input-port = 23432
hostname = $${instance-parameter:configuration.frontend-name}
hostname = $${instance-parameter:configuration.frontend-name}
remap = map /HTTPS/ http://$${instance-parameter:ipv4-random}:$${
apache
-configuration:ssl-cache-through-port}
remap = map /HTTPS/ http://$${instance-parameter:ipv4-random}:$${
caddy
-configuration:ssl-cache-through-port}
map / http://$${instance-parameter:ipv4-random}:$${
apache
-configuration:cache-through-port}
map / http://$${instance-parameter:ipv4-random}:$${
caddy
-configuration:cache-through-port}
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
cache-path = $${trafficserver-directory:cache-path}
cache-path = $${trafficserver-directory:cache-path}
...
@@ -508,14 +507,14 @@ mode = 700
...
@@ -508,14 +507,14 @@ mode = 700
### End of ATS sections
### End of ATS sections
###
Apaches
Graceful and promises
###
Caddy
Graceful and promises
[frontend-caddy-graceful-bin]
[frontend-caddy-graceful-bin]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-wrapper:output}
template = ${template-wrapper:output}
rendered = $${directory:bin}/frontend-caddy-safe-graceful
rendered = $${directory:bin}/frontend-caddy-safe-graceful
mode = 0700
mode = 0700
extra-context =
extra-context =
key content
apache
-configuration:frontend-graceful-command
key content
caddy
-configuration:frontend-graceful-command
[frontend-caddy-graceful]
[frontend-caddy-graceful]
< = jinja2-template-base
< = jinja2-template-base
...
@@ -526,73 +525,73 @@ extra-context =
...
@@ -526,73 +525,73 @@ extra-context =
key directory_run directory:run
key directory_run directory:run
key directory_etc directory:etc
key directory_etc directory:etc
key directory_bin directory:bin
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]
[frontend-caddy-lazy-graceful]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-
apache
-lazy-script-call:target}
template = ${template-
caddy
-lazy-script-call:target}
rendered = $${directory:bin}/frontend-caddy-lazy-graceful
rendered = $${directory:bin}/frontend-caddy-lazy-graceful
mode = 0700
mode = 0700
pid-file = $${directory:run}/lazy-graceful.pid
pid-file = $${directory:run}/lazy-graceful.pid
extra-context =
extra-context =
key pid_file :pid-file
key pid_file :pid-file
raw wait_time 60
raw wait_time 60
key lazy_command
apache
-configuration:frontend-graceful-command
key lazy_command
caddy
-configuration:frontend-graceful-command
# Promises checking configuration:
# Promises checking configuration:
[promise-frontend-
apache
-configuration]
[promise-frontend-
caddy
-configuration]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-wrapper:output}
template = ${template-wrapper:output}
rendered = $${directory:promise}/frontend-
apache
-configuration-promise
rendered = $${directory:promise}/frontend-
caddy
-configuration-promise
mode = 0700
mode = 0700
extra-context =
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
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}
hostname = $${instance-parameter:ipv4-random}
port = $${instance-parameter:configuration.port}
port = $${instance-parameter:configuration.port}
[promise-
apache
-frontend-v4-http]
[promise-
caddy
-frontend-v4-http]
recipe = slapos.cookbook:check_port_listening
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}
hostname = $${instance-parameter:ipv4-random}
port = $${instance-parameter:configuration.plain_http_port}
port = $${instance-parameter:configuration.plain_http_port}
[promise-
apache
-frontend-v6-https]
[promise-
caddy
-frontend-v6-https]
recipe = slapos.cookbook:check_port_listening
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}
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:configuration.port}
port = $${instance-parameter:configuration.port}
[promise-
apache
-frontend-v6-http]
[promise-
caddy
-frontend-v6-http]
recipe = slapos.cookbook:check_port_listening
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}
hostname = $${instance-parameter:ipv6-random}
port = $${instance-parameter:configuration.plain_http_port}
port = $${instance-parameter:configuration.plain_http_port}
[promise-
apache
-frontend-cached]
[promise-
caddy
-frontend-cached]
recipe = slapos.cookbook:check_port_listening
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_cached
path = $${directory:promise}/
caddy
_cached
hostname = $${instance-parameter:ipv4-random}
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
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/
apache
_ssl_cached
path = $${directory:promise}/
caddy
_ssl_cached
hostname = $${instance-parameter:ipv4-random}
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
recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/is-process-older-than-dependency-set $${
apache
-configuration:pid-file}
command-line = ${buildout:bin-directory}/is-process-older-than-dependency-set $${
caddy
-configuration:pid-file}
wrapper-path = $${directory:promise}/
apache
-frontend-is-running-actual-software-release
wrapper-path = $${directory:promise}/
caddy
-frontend-is-running-actual-software-release
[promise-
apache
-mpm-watchdog]
[promise-
caddy
-mpm-watchdog]
recipe = slapos.cookbook:wrapper
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
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]
[slap_connection]
...
@@ -660,14 +659,14 @@ command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:
...
@@ -660,14 +659,14 @@ command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:
extra-context =
extra-context =
key content monitor-ats-cache-stats-wrapper:command
key content monitor-ats-cache-stats-wrapper:command
[monitor-
apache
-server-status-wrapper]
[monitor-
caddy
-server-status-wrapper]
< = jinja2-template-base
< = jinja2-template-base
template = ${template-wrapper:output}
template = ${template-wrapper:output}
rendered = $${monitor-directory:reports}/monitor-
apache
-server-status-wrapper
rendered = $${monitor-directory:reports}/monitor-
caddy
-server-status-wrapper
mode = 0700
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
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 =
extra-context =
key content monitor-
apache
-server-status-wrapper:command
key content monitor-
caddy
-server-status-wrapper:command
[monitor-ats-cache-stats-config]
[monitor-ats-cache-stats-config]
< = jinja2-template-base
< = jinja2-template-base
...
...
software/caddy-frontend/instance-apache-replicate.cfg.in
View file @
410152ca
...
@@ -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.
...
...
software/caddy-frontend/instance.cfg
View file @
410152ca
[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}
...
...
software/caddy-frontend/templates/Caddyfile.in
View file @
410152ca
# Apache configuration file for Zope
# Automatically generated
# Automatically generated
# Basic server configuration
# Basic server configuration
...
...
software/caddy-frontend/templates/apache-custom-slave-list.cfg.in
View file @
410152ca
...
@@ -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 %}
...
@@ -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
...
...
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