Commit f9d79bd3 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: add configuration promises and use slapos dash for scripts

parent 637eb6bc
......@@ -4,6 +4,7 @@ extends =
../../component/git/buildout.cfg
../../stack/slapos.cfg
../../component/dash/buildout.cfg
../../component/binutils/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/apache/buildout.cfg
......@@ -149,7 +150,8 @@ md5sum = c2314c3a9c3412a38d14b312d3df83c1
mode = 640
[template-wrapper]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/wrapper.in
output = ${buildout:directory}/template-wrapper.cfg
mode = 0644
#md5sum = c2314c3a9c3412a38d14b312d3df83c1
mode = 640
\ No newline at end of file
......@@ -21,6 +21,8 @@ parts =
promise-squid
dynamic-template-default-vh
not-found-html
promise-frontend-apache-configuration
promise-cached-apache-configuration
promise-apache-frontend-v4-https
promise-apache-frontend-v4-http
promise-apache-frontend-v6-https
......@@ -292,8 +294,10 @@ pid-file = $${directory:run}/httpd.pid
protected-path = /
access-control-string = none
cached-rewrite-file = $${directory:etc}/apache_rewrite_cached.txt
frontend-graceful-command = ${apache-2.2:location}/bin/httpd -Sf $${:frontend-configuration}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
cached-graceful-command = ${apache-2.2:location}/bin/httpd -Sf $${:cached-configuration}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${apache-configuration:cache-pid-file}); fi
frontend-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:frontend-configuration}
frontend-graceful-command = $${:frontend-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
cached-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:cached-configuration}
cached-graceful-command = $${:cached-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${apache-configuration:cache-pid-file}); fi
# Apache for cache configuration
cache-access-log = $${directory:log}/frontend-apache-access-cached.log
......@@ -472,9 +476,10 @@ port = $${apache-configuration:cache-port}
# End of Squid part
### Apaches Graceful and promises
[frontend-apache-graceful]
< = jinja2-template-base
template = ${template-wrapper:target}
template = ${template-wrapper:output}
rendered = $${directory:etc-run}/frontend-apache-safe-graceful
mode = 0700
extra-context =
......@@ -482,12 +487,29 @@ extra-context =
[cached-apache-graceful]
< = jinja2-template-base
template = ${template-wrapper:target}
template = ${template-wrapper:output}
rendered = $${directory:etc-run}/cached-apache-safe-graceful
mode = 0700
extra-context =
key content apache-configuration:cached-graceful-command
# Promises checking configuration:
[promise-frontend-apache-configuration]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${directory:promise}/frontend-apache-configuration-promise
mode = 0700
extra-context =
key content apache-configuration:frontend-configuration-verification
[promise-cached-apache-configuration]
< = jinja2-template-base
template = ${template-wrapper:output}
rendered = $${directory:promise}/cached-apache-configuration-promise
mode = 0700
extra-context =
key content apache-configuration:cached-configuration-verification
[promise-apache-frontend-v4-https]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/apache_frontend_ipv4_https
......
#!/bin/sh
#!${dash-output:dash}
{{ content }}
\ No newline at end of file
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