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

apache-frontend/Root: add monitor script to test deployed slaves

parent fed32c89
......@@ -322,10 +322,8 @@ cache-access-log = ${directory:log}/frontend-apache-access-cached.log
cache-error-log = ${directory:log}/frontend-apache-error-cached.log
cache-pid-file = ${directory:run}/httpd-cached.pid
[configtest]
recipe = slapos.cookbook:wrapper
command-line = {{ build_path.get('apache-location') }}/bin/httpd -f ${directory:etc}/apache_frontend.conf -t
wrapper-path = ${directory:bin}/apache-configtest
####
# Certificates
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
......@@ -381,6 +379,26 @@ context =
key this_file :filename
raw python_executable ${buildout:executable}
####
# Check configuration
[frontend-apache-configuration]
< = jinja2-template-base
template = {{ build_path.get('template-wrapper') }}
rendered = ${monitor-directory:monitoring-cgi}/front-httpd-configuration
mode = 0700
command = echo "<pre>$(${apache-configuration:frontend-configuration-verification})</pre>"
extra-context =
key content :command
[promise-frontend-apache-configuration]
< = jinja2-template-base
template = {{ build_path.get('template-wrapper') }}
rendered = ${monitor-directory:monitor-custom-scripts}/frontend-apache-configuration-promise
mode = 0700
extra-context =
key content apache-configuration:frontend-configuration-verification
#####################
# Buidout elements
......@@ -391,7 +409,8 @@ parts =
publish-slave-information
publish-information
dynamic-apache-frontend-template
configtest
frontend-apache-configuration
promise-frontend-apache-configuration
dynamic-template-default-vh
{% for part in part_list -%}
{{ ' %s' % part }}
......
......@@ -69,4 +69,5 @@ template-default-slave-virtualhost = ${template-default-slave-virtualhost:target
template-default-virtualhost = ${template-default-virtualhost:target}
template-empty = ${template-empty:target}
template-slave-configuration = ${template-slave-configuration:target}
template-slave-control-interface = ${template-slave-control-interface:location}/${template-slave-control-interface:filename}
\ No newline at end of file
template-slave-control-interface = ${template-slave-control-interface:location}/${template-slave-control-interface:filename}
template-wrapper = ${template-wrapper:output}
\ 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