Commit aedf00a9 authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Rafael Monnerat

software/kvm: auto-restart services on SR upgrade.

parent 45ad5918
...@@ -180,6 +180,7 @@ ipv4 = ${slap-network-information:local-ipv4} ...@@ -180,6 +180,7 @@ ipv4 = ${slap-network-information:local-ipv4}
ipv6 = ${slap-network-information:global-ipv6} ipv6 = ${slap-network-information:global-ipv6}
wrapper-path = ${directory:services}/6tunnel-${:ipv6-port} wrapper-path = ${directory:services}/6tunnel-${:ipv6-port}
command-line = {{ sixtunnel_executable_location }} -6 -4 -d -l ${:ipv6} ${:ipv6-port} ${:ipv4} ${:ipv4-port} command-line = {{ sixtunnel_executable_location }} -6 -4 -d -l ${:ipv6} ${:ipv6-port} ${:ipv4} ${:ipv4-port}
hash-files = ${buildout:directory}/software_release/buildout.cfg
{% if use_nat == 'true' and nat_rule_list -%} {% if use_nat == 'true' and nat_rule_list -%}
{% for port in nat_rule_list.split(' ') -%} {% for port in nat_rule_list.split(' ') -%}
...@@ -199,6 +200,7 @@ socket-path = ${kvm-controller-parameter-dict:socket-path} ...@@ -199,6 +200,7 @@ socket-path = ${kvm-controller-parameter-dict:socket-path}
wrapper-path = ${directory:services}/kvm wrapper-path = ${directory:services}/kvm
command-line = ${kvm-run:rendered} command-line = ${kvm-run:rendered}
kvm-controller = ${kvm-controller-wrapper:wrapper-path} kvm-controller = ${kvm-controller-wrapper:wrapper-path}
hash-files = ${buildout:directory}/software_release/buildout.cfg
[kvm-controller-wrapper] [kvm-controller-wrapper]
...@@ -267,20 +269,32 @@ ssl-cert-path = ${ca-novnc:cert-file} ...@@ -267,20 +269,32 @@ ssl-cert-path = ${ca-novnc:cert-file}
[websockify-sighandler] [websockify-sighandler]
recipe = slapos.cookbook:signalwrapper recipe = slapos.cookbook:signalwrapper
wrapper-path = ${directory:services}/websockify wrapper-path = ${directory:bin}/websockify-sighandler
wrapped-path = ${novnc-instance:path} wrapped-path = ${novnc-instance:path}
[websockify-sighandler-service]
recipe = slapos.cookbook:wrapper
command-line = ${websockify-sighandler:wrapper-path}
wrapper-path = ${directory:services}/websockify
hash-files = ${buildout:directory}/software_release/buildout.cfg
[certificate-authority] [certificate-authority]
recipe = slapos.cookbook:certificate_authority recipe = slapos.cookbook:certificate_authority
openssl-binary = {{ openssl_executable_location }} openssl-binary = {{ openssl_executable_location }}
ca-dir = ${directory:ca-dir} ca-dir = ${directory:ca-dir}
requests-directory = ${cadirectory:requests} requests-directory = ${cadirectory:requests}
wrapper = ${directory:services}/certificate_authority wrapper = ${directory:bin}/certificate_authority
ca-private = ${cadirectory:private} ca-private = ${cadirectory:private}
ca-certs = ${cadirectory:certs} ca-certs = ${cadirectory:certs}
ca-newcerts = ${cadirectory:newcerts} ca-newcerts = ${cadirectory:newcerts}
ca-crl = ${cadirectory:crl} ca-crl = ${cadirectory:crl}
[certificate-authority-service]
recipe = slapos.cookbook:wrapper
command-line = ${certificate-authority:wrapper}
wrapper-path = ${directory:services}/certificate_authority
hash-files = ${buildout:directory}/software_release/buildout.cfg
[cadirectory] [cadirectory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
requests = ${directory:ca-dir}/requests/ requests = ${directory:ca-dir}/requests/
...@@ -315,7 +329,13 @@ cron-entries = ${directory:cron-entries} ...@@ -315,7 +329,13 @@ cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs} crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps} cronstamps = ${directory:cronstamps}
catcher = ${cron-simplelogger:wrapper} catcher = ${cron-simplelogger:wrapper}
binary = ${directory:services}/crond binary = ${directory:bin}/crond_raw
[cron-service]
recipe = slapos.cookbook:wrapper
command-line = ${cron:binary}
wrapper-path = ${directory:services}/crond
hash-files = ${buildout:directory}/software_release/buildout.cfg
[cron-simplelogger] [cron-simplelogger]
recipe = slapos.cookbook:simplelogger recipe = slapos.cookbook:simplelogger
...@@ -356,10 +376,16 @@ recipe = slapos.cookbook:simplehttpserver ...@@ -356,10 +376,16 @@ recipe = slapos.cookbook:simplehttpserver
host = ${slap-network-information:local-ipv4} host = ${slap-network-information:local-ipv4}
port = ${slap-parameter:httpd-port} port = ${slap-parameter:httpd-port}
base-path = ${directory:public} base-path = ${directory:public}
wrapper = ${directory:services}/http-server wrapper = ${directory:bin}/http-server
log-file = ${directory:log}/httpd.log log-file = ${directory:log}/httpd.log
use-hash-url = false use-hash-url = false
[httpd-service]
recipe = slapos.cookbook:wrapper
command-line = ${httpd:wrapper}
wrapper-path = ${directory:services}/http-server
hash-files = ${buildout:directory}/software_release/buildout.cfg
[httpd-promise] [httpd-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/httpd path = ${directory:promises}/httpd
...@@ -526,7 +552,13 @@ ipv6-port = {{ slapparameter_dict.get('document-port', '') }} ...@@ -526,7 +552,13 @@ ipv6-port = {{ slapparameter_dict.get('document-port', '') }}
ipv4-port = 16936 ipv4-port = 16936
shell-path = {{ dash_executable_location }} shell-path = {{ dash_executable_location }}
6tunnel-path = {{ sixtunnel_executable_location }} 6tunnel-path = {{ sixtunnel_executable_location }}
runner-path = ${directory:services}/6tunnel-cluster runner-path = ${directory:bin}/6tunnel-cluster
[tunnel-cluster-service]
recipe = slapos.cookbook:wrapper
command-line = ${tunnel-cluster-url:runner-path}
wrapper-path = ${directory:services}/6tunnel-cluster
hash-files = ${buildout:directory}/software_release/buildout.cfg
[ansible-vm-promise] [ansible-vm-promise]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -617,7 +649,7 @@ keyboard-layout-language = fr ...@@ -617,7 +649,7 @@ keyboard-layout-language = fr
{% do part_list.append('cluster-url-path') -%} {% do part_list.append('cluster-url-path') -%}
{% endif -%} {% endif -%}
{% if enable_http == 'true' %} {% if enable_http == 'true' %}
{% do part_list.extend(['httpd', 'httpd-promise', 'publish-host-config']) -%} {% do part_list.extend(['httpd', 'httpd-service', 'httpd-promise', 'publish-host-config']) -%}
{% if slapparameter_dict.get('data-to-vm', '') %} {% if slapparameter_dict.get('data-to-vm', '') %}
{% do part_list.append('vm-data-content') -%} {% do part_list.append('vm-data-content') -%}
{% endif -%} {% endif -%}
...@@ -630,6 +662,9 @@ keyboard-layout-language = fr ...@@ -630,6 +662,9 @@ keyboard-layout-language = fr
{% if slapparameter_dict.get('bootstrap-script-url', '') -%} {% if slapparameter_dict.get('bootstrap-script-url', '') -%}
{% do part_list.append('download-bootstrap-script') -%} {% do part_list.append('download-bootstrap-script') -%}
{% endif -%} {% endif -%}
{% if slapparameter_dict.get('document-port', '') -%}
{% do part_list.append('tunnel-cluster-service') -%}
{% endif -%}
{% endif -%} {% endif -%}
...@@ -650,15 +685,18 @@ context = ...@@ -650,15 +685,18 @@ context =
[buildout] [buildout]
parts = parts =
certificate-authority certificate-authority
certificate-authority-service
publish-connection-information publish-connection-information
kvm-instance kvm-instance
kvm-controller-wrapper kvm-controller-wrapper
kvm-vnc-promise kvm-vnc-promise
kvm-disk-image-corruption-promise kvm-disk-image-corruption-promise
websockify-sighandler websockify-sighandler
websockify-sighandler-service
novnc-promise novnc-promise
kvm-started-promise kvm-started-promise
cron cron
cron-service
cron-entry-logrotate cron-entry-logrotate
frontend-promise frontend-promise
# monitor parts # monitor parts
......
...@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download ...@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644 mode = 644
md5sum = 0fd548b8cac9278496d9d83dde26d09c md5sum = 149df1bc788ce68c86a5fda4872e008e
download-only = true download-only = true
on-update = true on-update = true
......
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