Commit c9767ace authored by Alain Takoudjou's avatar Alain Takoudjou

re6st master: add graceful restart for apache

parent cc2c07b0
......@@ -53,5 +53,5 @@ Listen {{ ipv6 }}:{{ apache_port }}
SSLProxyEngine On
{% endif -%}
ProxyPass / {{ uri_scheme }}://{{ re6st_ipv4 }}:{{ re6st_port }}/
ProxyPass / http://{{ re6st_ipv4 }}:{{ re6st_port }}/
</VirtualHost>
\ No newline at end of file
......@@ -88,6 +88,15 @@ key-file = ${certificate-authority:ca-private}/apache.key
cert-file = ${certificate-authority:ca-certs}/apache.crt
{% endif %}
[apache-httpd-graceful]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-wrapper'] }}
rendered = ${directory:script}/httpd-graceful
mode = 0700
context =
raw content {{ parameter_dict['apache-location'] }}/bin/httpd -Sf ${apache-conf:rendered}; if [ $? -eq 0 ]; then kill -USR1 $(cat ${apache-conf:pid-file}); fi
raw dash {{ dash_binary }}
[logrotate-apache]
< = logrotate-entry-base
name = apache
......@@ -215,6 +224,7 @@ parts =
cron-entry-re6st-drop
cron-entry-re6st-revoke
apache-httpd
apache-httpd-graceful
publish
re6st-registry-promise
......
......@@ -33,6 +33,7 @@ python-executable = {{ python_with_eggs }}
re6st-registry = {{ bin_directory }}/re6st-registry
re6stnet = {{ bin_directory }}/re6stnet
template-apache-conf = {{ template_apache_conf }}
template-wrapper = {{ template_wrapper }}
apache-location = {{ apache_location }}
template-re6st-registry-conf = {{ template_re6st_registry_conf }}
......
......@@ -80,7 +80,7 @@ context =
< = template-jinja2-base
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = ded1faad7f289ffe9ac7aeee3d98413e
md5sum = 1f39ec8d7d91c0ba2b4ad56f27ebac39
extra-context =
key apache_location apache:location
key dash_location dash:location
......@@ -90,12 +90,13 @@ extra-context =
key template_re6stnet template-re6stnet:target
key template_re6st_registry_conf template-re6st-registry-conf:target
key template_logrotate_base template-logrotate-base:rendered
key template_wrapper template-wrapper:target
raw python_with_eggs ${buildout:directory}/bin/${extra-eggs:interpreter}
[template-re6stnet]
< = download-base
filename = instance-re6stnet.cfg.in
md5sum = c83fceedba8a817d49f8cf56bfbc2b83
md5sum = beaeb547aaff591f9961ff295aadb5f5
[template-logrotate-base]
< = template-jinja2-base
......@@ -109,13 +110,18 @@ extra-context =
[template-apache-conf]
< = download-base
filename = apache.conf.in
md5sum = c220229ee37866c8cc404d602edd389d
md5sum = 6fcf417f6b9651b1ed442f00c094f50c
[template-re6st-registry-conf]
< = download-base
filename = re6st-registry.conf.in
md5sum = 7760a213896755e707993d67d8d980bb
[template-wrapper]
< = download-base
filename = wrapper.in
md5sum = 69e63cb58267335e21da772bd867657e
[check-recipe]
recipe = plone.recipe.command
stop-on-error = true
......
#!{{ 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