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 ...@@ -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-error-log = ${directory:log}/frontend-apache-error-cached.log
cache-pid-file = ${directory:run}/httpd-cached.pid cache-pid-file = ${directory:run}/httpd-cached.pid
[configtest] ####
recipe = slapos.cookbook:wrapper # Certificates
command-line = {{ build_path.get('apache-location') }}/bin/httpd -f ${directory:etc}/apache_frontend.conf -t
wrapper-path = ${directory:bin}/apache-configtest
[certificate-authority] [certificate-authority]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:certificate_authority
...@@ -381,6 +379,26 @@ context = ...@@ -381,6 +379,26 @@ context =
key this_file :filename key this_file :filename
raw python_executable ${buildout:executable} 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 # Buidout elements
...@@ -391,7 +409,8 @@ parts = ...@@ -391,7 +409,8 @@ parts =
publish-slave-information publish-slave-information
publish-information publish-information
dynamic-apache-frontend-template dynamic-apache-frontend-template
configtest frontend-apache-configuration
promise-frontend-apache-configuration
dynamic-template-default-vh dynamic-template-default-vh
{% for part in part_list -%} {% for part in part_list -%}
{{ ' %s' % part }} {{ ' %s' % part }}
......
...@@ -70,3 +70,4 @@ template-default-virtualhost = ${template-default-virtualhost:target} ...@@ -70,3 +70,4 @@ template-default-virtualhost = ${template-default-virtualhost:target}
template-empty = ${template-empty:target} template-empty = ${template-empty:target}
template-slave-configuration = ${template-slave-configuration:target} template-slave-configuration = ${template-slave-configuration:target}
template-slave-control-interface = ${template-slave-control-interface:location}/${template-slave-control-interface:filename} 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