Commit 0f71d88f authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Łukasz Nowak

software/slaprunner: Switch to monitor-promise-base

parent ebd1dcee
...@@ -18,7 +18,7 @@ md5sum = c44a7481bb85e3258128afe3fcf23f44 ...@@ -18,7 +18,7 @@ md5sum = c44a7481bb85e3258128afe3fcf23f44
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 19475112d4dccee1263798c67fd2351b md5sum = 304db2322b46041bb227a7dcfc9e12f2
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -26,7 +26,7 @@ md5sum = 3c80e21dda146b4cbee103b0a3f6935b ...@@ -26,7 +26,7 @@ md5sum = 3c80e21dda146b4cbee103b0a3f6935b
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
md5sum = 238466e8045096c09534e1d01b1befd6 md5sum = fed82d7ee6bbc036d58a7b8f60213b55
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -111,7 +111,7 @@ context = ...@@ -111,7 +111,7 @@ context =
raw restore_exit_code_file ${:restore-exit-code-file} raw restore_exit_code_file ${:restore-exit-code-file}
raw restore_error_message_file ${:restore-error-message-file} raw restore_error_message_file ${:restore-error-message-file}
[importer-consistency-promise] [importer-consistency-bin]
# Test that the importer script and "after-import" subscripts # Test that the importer script and "after-import" subscripts
# are not older than 2 days (1 day + some slack), and have succeeded # are not older than 2 days (1 day + some slack), and have succeeded
recipe = collective.recipe.template recipe = collective.recipe.template
...@@ -134,10 +134,16 @@ input = inline: #!/bin/sh ...@@ -134,10 +134,16 @@ input = inline: #!/bin/sh
fi fi
fi fi
exit 1; # Something else went wrong exit 1; # Something else went wrong
output = ${directory:promises}/importer-consistency-promise output = ${directory:bin}/importer-consistency-promise
mode = 755 mode = 755
[software-release-deployment-promise] [importer-consistency-promise]
<= monitor-promise-base
module = check_exectue_command
name = importer_consistency_promise.py
config-command = ${importer-consistency-promise:output}
[software-release-deployment-bin]
recipe = collective.recipe.template recipe = collective.recipe.template
input = inline: #!/bin/sh input = inline: #!/bin/sh
PROJECT_FILE=$(find "${directory:etc}" -maxdepth 1 -name .project) PROJECT_FILE=$(find "${directory:etc}" -maxdepth 1 -name .project)
...@@ -152,9 +158,15 @@ input = inline: #!/bin/sh ...@@ -152,9 +158,15 @@ input = inline: #!/bin/sh
fi fi
fi fi
exit 1 exit 1
output = ${directory:promises}/software-release-deployment-promise output = ${directory:bin}/software-release-deployment-promise
mode = 755 mode = 755
[software-release-deployment-promise]
<= monitor-promise-base
module = check_command_execute
name = software_release_deployment_promise
config-command =${software-release-deployment-bin:output}
[resilient-software-release-information] [resilient-software-release-information]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = {{ software_release_information_template }} url = {{ software_release_information_template }}
......
...@@ -85,20 +85,18 @@ config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }} ...@@ -85,20 +85,18 @@ config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }}
return = site_url domain return = site_url domain
[custom-frontend-promise] [custom-frontend-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = $${directory:promises}/custom_frontend_promise module = check_url_available
url = https://$${request-custom-frontend:connection-domain} name = custom_frontend_promise.py
config-url = https://$${request-custom-frontend:connection-domain}
{% if slapparameter_dict.get('custom-frontend-basic-auth') -%} {% if slapparameter_dict.get('custom-frontend-basic-auth') -%}
check-secure = 1 config-check-secure = 1
{% endif -%} {% endif -%}
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[custom-frontend-url-ready-promise] [custom-frontend-url-ready-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
path = $${directory:promises}/custom_frontend_ready_promise
url = https://$${request-custom-frontend:connection-domain} url = https://$${request-custom-frontend:connection-domain}
rendered = $${directory:promises}/custom_frontend_ready_promise rendered = $${directory:bin}/custom_frontend_ready_promise
template = inline: template = inline:
#!{{ dash_executable_location }} #!{{ dash_executable_location }}
...@@ -110,6 +108,12 @@ template = inline: ...@@ -110,6 +108,12 @@ template = inline:
exit 1 exit 1
fi fi
[custom-frontend-url-ready-promise]
<= monitor-promise-base
module = check_command_execute
name = custom_frontend_ready_promise.py
config-command = $${custom-frontend-url-ready-bin:rendered}
[publish-connection-information] [publish-connection-information]
custom-frontend-url = $${custom-frontend-url-ready-promise:url} custom-frontend-url = $${custom-frontend-url-ready-promise:url}
{% endif %} {% endif %}
...@@ -135,7 +139,6 @@ ssh = $${:etc}/ssh/ ...@@ -135,7 +139,6 @@ ssh = $${:etc}/ssh/
log = $${:var}/log/ log = $${:var}/log/
run = $${:var}/run/ run = $${:var}/run/
backup = $${:srv}/backup/ backup = $${:srv}/backup/
promises = $${:etc}/promise/
test = $${:etc}/test/ test = $${:etc}/test/
nginx-data = $${:srv}/nginx nginx-data = $${:srv}/nginx
ca-dir = $${:srv}/ssl ca-dir = $${:srv}/ssl
...@@ -476,13 +479,12 @@ output = $${directory:scripts}/slaprunner-httpd-graceful ...@@ -476,13 +479,12 @@ output = $${directory:scripts}/slaprunner-httpd-graceful
mode = 700 mode = 700
[apache-httpd-promise] [apache-httpd-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = $${directory:promises}/$${:filename} module = check_url_available
name = $${:filename}
filename = apache-httpd-listening-on-tcp filename = apache-httpd-listening-on-tcp
url = $${apache-httpd:access-url} config-url = $${apache-httpd:access-url}
check-secure = 1 config-check-secure = 1
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[slaprunner-httpd-cors] [slaprunner-httpd-cors]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -579,12 +581,11 @@ config-domain = $${slap-parameter:frontend-domain} ...@@ -579,12 +581,11 @@ config-domain = $${slap-parameter:frontend-domain}
return = site_url domain return = site_url domain
[slaprunner-frontend-promise] [slaprunner-frontend-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = $${directory:promises}/slaprunner_frontend module = check_url_available
url = https://$${request-frontend:connection-domain}/login name = slaprunner_frontend.py
dash_path = ${dash:location}/bin/dash config-url = https://$${request-frontend:connection-domain}/login
curl_path = ${curl:location}/bin/curl config-check-secure = 1
check-secure = 1
[request-httpd-frontend] [request-httpd-frontend]
<= slap-connection <= slap-connection
...@@ -600,12 +601,11 @@ config-domain = ...@@ -600,12 +601,11 @@ config-domain =
return = secure_access domain return = secure_access domain
[httpd-frontend-promise] [httpd-frontend-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = $${directory:promises}/slaprunner-apache-http-frontend module = check_url_available
url = $${request-httpd-frontend:connection-secure_access} name = slaprunner_apache_http_frontend.py
dash_path = {{ dash_executable_location }} config-url = $${request-httpd-frontend:connection-secure_access}
curl_path = {{ curl_executable_location }} config-check-secure = 1
check-secure = 1
{% endif %} {% endif %}
...@@ -667,16 +667,18 @@ monitor-password = $${monitor-publish-parameters:monitor-password} ...@@ -667,16 +667,18 @@ monitor-password = $${monitor-publish-parameters:monitor-password}
#-- Deploy promises scripts #-- Deploy promises scripts
[slaprunner-promise] [slaprunner-promise]
recipe = slapos.cookbook:check_port_listening <= monitor-promise-base
path = $${directory:promises}/slaprunner module = check_port_listening
hostname = $${slaprunner:ipv6} name = slaprunner.py
port = $${slaprunner:runner_port} config-hostname = $${slaprunner:ipv6}
config-port = $${slaprunner:runner_port}
[runner-sshd-promise] [runner-sshd-promise]
recipe = slapos.cookbook:check_port_listening <= monitor-promise-base
path = $${directory:promises}/runner-sshd module = check_port_listening
hostname = $${slap-network-information:global-ipv6} name = runner_sshd.py
port = $${runner-sshd-port:port} config-hostname = $${slap-network-information:global-ipv6}
config-port = $${runner-sshd-port:port}
[symlinks] [symlinks]
recipe = cns.recipe.symlink recipe = cns.recipe.symlink
...@@ -890,10 +892,11 @@ name = slapgrid ...@@ -890,10 +892,11 @@ name = slapgrid
log = $${runnerdirectory:home}/instance/*/.slapgrid/log/instance.log $${runnerdirectory:home}/instance/*/.slapgrid/promise/log/*.log log = $${runnerdirectory:home}/instance/*/.slapgrid/log/instance.log $${runnerdirectory:home}/instance/*/.slapgrid/promise/log/*.log
[supervisord-promise] [supervisord-promise]
recipe = slapos.cookbook:check_port_listening <= monitor-promise-base
path = $${directory:promises}/supervisord module = check_port_listening
hostname = $${slaprunner:ipv4} name = supervisord.py
port = $${supervisord:port} config-hostname = $${slaprunner:ipv4}
config-port = $${supervisord:port}
# XXX Monitor # XXX Monitor
[monitor-instance-parameter] [monitor-instance-parameter]
......
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