Commit 63a2c965 authored by Łukasz Nowak's avatar Łukasz Nowak

Revert "software/slaprunner: Switch to monitor-promise-base"

This reverts commit dcd2f8d6.

It has to be redone with proper test coverage.
parent ba6a7aa5
...@@ -18,7 +18,7 @@ md5sum = 317c49bf451e80bf0f9d44baa603861e ...@@ -18,7 +18,7 @@ md5sum = 317c49bf451e80bf0f9d44baa603861e
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 85ea0b78fd18428c242438ebe95f980b md5sum = bacb2d1a38d3a512025e861debdc75b2
[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 = fc22e2d2f03ce58631f157a5b4943e15 ...@@ -26,7 +26,7 @@ md5sum = fc22e2d2f03ce58631f157a5b4943e15
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
md5sum = ce067aee4a727830304a8407af293477 md5sum = 1f1c62f2bc09a6ab3a2f96eacdf99492
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -112,7 +112,7 @@ context = ...@@ -112,7 +112,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-bin] [importer-consistency-promise]
# 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
...@@ -135,16 +135,10 @@ input = inline: #!/bin/sh ...@@ -135,16 +135,10 @@ input = inline: #!/bin/sh
fi fi
fi fi
exit 1; # Something else went wrong exit 1; # Something else went wrong
output = ${directory:bin}/importer-consistency-promise output = ${directory:promises}/importer-consistency-promise
mode = 755 mode = 755
[importer-consistency-promise] [software-release-deployment-promise]
<= monitor-promise-base
module = check_command_execute
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)
...@@ -159,15 +153,9 @@ input = inline: #!/bin/sh ...@@ -159,15 +153,9 @@ input = inline: #!/bin/sh
fi fi
fi fi
exit 1 exit 1
output = ${directory:bin}/software-release-deployment-promise output = ${directory:promises}/software-release-deployment-promise
mode = 755 mode = 755
[software-release-deployment-promise]
<= monitor-promise-base
module = check_command_execute
name = software-release-deployment-promise.py
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,18 +85,20 @@ config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }} ...@@ -85,18 +85,20 @@ config-url = {{ slapparameter_dict.get('custom-frontend-backend-url') }}
return = site_url domain return = site_url domain
[custom-frontend-promise] [custom-frontend-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_url_available
module = check_url_available path = $${directory:promises}/custom_frontend_promise
name = custom_frontend_promise.py url = https://$${request-custom-frontend:connection-domain}
config-url = https://$${request-custom-frontend:connection-domain}
{% if slapparameter_dict.get('custom-frontend-basic-auth') -%} {% if slapparameter_dict.get('custom-frontend-basic-auth') -%}
config-check-secure = 1 check-secure = 1
{% endif -%} {% endif -%}
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[custom-frontend-url-ready-promise-bin] [custom-frontend-url-ready-promise]
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:bin}/custom_frontend_ready_promise rendered = $${directory:promises}/custom_frontend_ready_promise
template = inline: template = inline:
#!{{ dash_executable_location }} #!{{ dash_executable_location }}
...@@ -108,12 +110,6 @@ template = inline: ...@@ -108,12 +110,6 @@ 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-promise-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 %}
...@@ -139,6 +135,7 @@ ssh = $${:etc}/ssh/ ...@@ -139,6 +135,7 @@ 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
...@@ -479,12 +476,13 @@ output = $${directory:scripts}/slaprunner-httpd-graceful ...@@ -479,12 +476,13 @@ output = $${directory:scripts}/slaprunner-httpd-graceful
mode = 700 mode = 700
[apache-httpd-promise] [apache-httpd-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_url_available
module = check_url_available path = $${directory:promises}/$${:filename}
name = $${:filename}.py
filename = apache-httpd-listening-on-tcp filename = apache-httpd-listening-on-tcp
config-url = $${apache-httpd:access-url} url = $${apache-httpd:access-url}
config-check-secure = 1 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
...@@ -581,11 +579,12 @@ config-domain = $${slap-parameter:frontend-domain} ...@@ -581,11 +579,12 @@ config-domain = $${slap-parameter:frontend-domain}
return = site_url domain return = site_url domain
[slaprunner-frontend-promise] [slaprunner-frontend-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_url_available
module = check_url_available path = $${directory:promises}/slaprunner_frontend
name = slaprunner_frontend.py url = https://$${request-frontend:connection-domain}/login
config-url = https://$${request-frontend:connection-domain}/login dash_path = ${dash:location}/bin/dash
config-check-secure = 1 curl_path = ${curl:location}/bin/curl
check-secure = 1
[request-httpd-frontend] [request-httpd-frontend]
<= slap-connection <= slap-connection
...@@ -601,11 +600,12 @@ config-domain = ...@@ -601,11 +600,12 @@ config-domain =
return = secure_access domain return = secure_access domain
[httpd-frontend-promise] [httpd-frontend-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_url_available
module = check_url_available path = $${directory:promises}/slaprunner-apache-http-frontend
name = slaprunner-apache-http-frontend.py url = $${request-httpd-frontend:connection-secure_access}
config-url = $${request-httpd-frontend:connection-secure_access} dash_path = {{ dash_executable_location }}
config-check-secure = 1 curl_path = {{ curl_executable_location }}
check-secure = 1
{% endif %} {% endif %}
...@@ -667,18 +667,16 @@ monitor-password = $${monitor-publish-parameters:monitor-password} ...@@ -667,18 +667,16 @@ monitor-password = $${monitor-publish-parameters:monitor-password}
#-- Deploy promises scripts #-- Deploy promises scripts
[slaprunner-promise] [slaprunner-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_port_listening
module = check_port_listening path = $${directory:promises}/slaprunner
name = slaprunner.py hostname = $${slaprunner:ipv6}
config-hostname = $${slaprunner:ipv6} port = $${slaprunner:runner_port}
config-port = $${slaprunner:runner_port}
[runner-sshd-promise] [runner-sshd-promise]
<= monitor-promise-base recipe = slapos.cookbook:check_port_listening
module = check_port_listening path = $${directory:promises}/runner-sshd
name = runner-sshd.py hostname = $${slap-network-information:global-ipv6}
config-hostname = $${slap-network-information:global-ipv6} port = $${runner-sshd-port:port}
config-port = $${runner-sshd-port:port}
[symlinks] [symlinks]
recipe = cns.recipe.symlink recipe = cns.recipe.symlink
...@@ -893,11 +891,10 @@ name = slapgrid ...@@ -893,11 +891,10 @@ 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]
<= monitor-promise-base recipe = slapos.cookbook:check_port_listening
module = check_port_listening path = $${directory:promises}/supervisord
name = supervisord.py hostname = $${slaprunner:ipv4}
config-hostname = $${slaprunner:ipv4} port = $${supervisord:port}
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