Commit 639afae8 authored by Nirina Malard's avatar Nirina Malard

software/html5as-base: add graceful restart

parent f693b1d9
......@@ -18,11 +18,11 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 9da3d36e19b15fce5413afa96d596599
md5sum = 680a17ef7864474a1b3def51c3c8265a
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = 03742c8c59cb8bade39b5932a0c2f6d2
md5sum = 38a9b3b93053cf47691674c3db6beaae
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
......@@ -39,3 +39,7 @@ md5sum = 4ef94a7b458d885cd79ba0b930a5727e
[template_index_html]
_update_hash_filename_ = templates/index.html.in
md5sum = d57cb01df5941e139b02a2f7bdabcdc8
[template_graceful]
_update_hash_filename_ = templates/graceful.in
md5sum = 1c0ee16966e1fcdb3fd11c09f12ee2b2
......@@ -15,6 +15,7 @@ template_nginx_conf = {{ template_nginx_conf_target }}
template_mime_types = {{ template_mime_types_target }}
template_launcher = {{ template_launcher_target }}
template_index_html = {{ template_index_html_target }}
template_graceful = {{ template_graceful_target }}
[instance-html5as]
recipe = slapos.recipe.template:jinja2
......@@ -32,7 +33,8 @@ context =
default-parameters =
{
"title": "Tutorial html5as",
"download_url": ""
"download_url": "",
"port": 8081
}
[switch-softwaretype]
......
......@@ -13,6 +13,7 @@ parts =
downloader
mime_types
launcher
nginx-graceful
publish-connection-information
# Define egg directories to be the one from Software Release
......@@ -75,7 +76,7 @@ nb_workers = 2
# Network
ip = {{ partition_ipv6 }}
port = 8081
port = {{ parameter_dict['port'] }}
access_url = http://[${:ip}]:${:port}
# Paths
......@@ -157,6 +158,14 @@ title = {{ parameter_dict['title'] }}
context =
key title :title
### Nginx Graceful
[nginx-graceful]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_graceful'] }}
rendered = ${basedirectory:script}/nginx-graceful
context =
section param_html5as html5as
# Publish nginx address
[publish-connection-information]
recipe = slapos.cookbook:publish
......
......@@ -41,6 +41,7 @@ context =
key template_launcher_target template_launcher:target
key template_instance_html5as_target instance_html5as:target
key template_index_html_target template_index_html:target
key template_graceful_target template_graceful:target
[download-base]
recipe = slapos.recipe.build:download
......@@ -62,6 +63,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template_index_html]
<= download-base
[template_graceful]
<= download-base
[extra-eggs]
recipe = zc.recipe.egg
eggs =
......
#! {{ param_html5as['path_shell'] }}
# BEWARE: This file is operated by slapos node
# BEWARE: It will be overwritten automatically
# Run graceful
exec kill -s SIGHUP $(cat {{ param_html5as['path_pid'] }})
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