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