Commit d91a00ec authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Łukasz Nowak

monitor: migrate promises to new python format

parent 6270a40b
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = 74bc641e97aa07a0cb1fb442c5ede183 md5sum = 8ba788b85f2649d8e0f8b9905edcf8a0
...@@ -304,14 +304,21 @@ rotate-num = 0 ...@@ -304,14 +304,21 @@ rotate-num = 0
frequency = weekly frequency = weekly
pre = {{ monitor_statistic }} --history_folder ${monitor-directory:public} pre = {{ monitor_statistic }} --history_folder ${monitor-directory:public}
[monitor-promise-base]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
content =
from slapos.promise.plugin.${:module} import RunPromise
mode = 600
output = ${directory:plugins}/${:name}
[monitor-httpd-promise] [monitor-httpd-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = ${directory:promises}/${:filename} module = check_url_available
filename = monitor-httpd-listening-on-tcp name = monitor-httpd-listening-on-tcp.py
url = ${monitor-httpd-conf-parameter:url} config-url = ${monitor-httpd-conf-parameter:url}
check-secure = 1 config-check-secure = 1
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
[monitor-publish-parameters] [monitor-publish-parameters]
# XXX depends on monitor-base section # XXX depends on monitor-base section
...@@ -356,48 +363,34 @@ config-https-only = true ...@@ -356,48 +363,34 @@ config-https-only = true
return = domain secure_access return = domain secure_access
[monitor-frontend-promise] [monitor-frontend-promise]
recipe = slapos.cookbook:check_url_available <= monitor-promise-base
path = ${directory:promises}/monitor-http-frontend module = check_url_available
name = monitor-http-frontend.py
url = ${monitor-frontend:connection-secure_access} url = ${monitor-frontend:connection-secure_access}
dash_path = {{ dash_executable_location }} config-url = ${:url}
curl_path = {{ curl_executable_location }} config-check-secure = 1
check-secure = 1
[monitor-bootstrap-promise] [monitor-bootstrap-promise]
recipe = slapos.cookbook:promise.plugin <= monitor-promise-base
eggs = module = monitor_bootstrap_status
slapos.toolbox name = monitor-bootstrap-status.py
file = ${monitor-conf-parameters:promise-output-file}
content =
from slapos.promise.plugin.monitor_bootstrap_status import RunPromise
output = ${directory:plugins}/monitor-bootstrap-status.py
mode = 600
config-process-pid-file = ${monitor-conf-parameters:pid-file} config-process-pid-file = ${monitor-conf-parameters:pid-file}
config-process-name = ${start-monitor:name} config-process-name = ${start-monitor:name}
config-status-file = ${:file} config-status-file = ${monitor-conf-parameters:promise-output-file}
[promise-check-slapgrid] [promise-check-slapgrid]
recipe = slapos.cookbook:promise.plugin <= monitor-promise-base
eggs = module = check_partition_deployment_state
slapos.toolbox name = buildout-${slap-connection:partition-id}-status.py
output = ${directory:plugins}/buildout-${slap-connection:partition-id}-status.py
content =
from slapos.promise.plugin.check_partition_deployment_state import RunPromise
config-monitor-url = ${monitor-instance-parameter:monitor-base-url} config-monitor-url = ${monitor-instance-parameter:monitor-base-url}
mode = 600
[promise-check-free-disk-space] [promise-check-free-disk-space]
recipe = slapos.cookbook:promise.plugin <= monitor-promise-base
eggs = module = check_free_disk_space
slapos.toolbox name = check-free-disk-space.py
output = ${directory:plugins}/check-free-disk-space.py
content =
from slapos.promise.plugin.check_free_disk_space import RunPromise
mode = 600
config-collectordb = ${monitor-instance-parameter:collector-db} config-collectordb = ${monitor-instance-parameter:collector-db}
config-threshold-file = ${directory:etc}/min-free-disk-size config-threshold-file = ${directory:etc}/min-free-disk-size
[monitor-base] [monitor-base]
# create dependencies between required monitor parts # create dependencies between required monitor parts
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -414,8 +407,8 @@ depends = ...@@ -414,8 +407,8 @@ depends =
${monitor-conf:rendered} ${monitor-conf:rendered}
${start-monitor:wrapper-path} ${start-monitor:wrapper-path}
${ca-monitor-httpd-service:wrapper-path} ${ca-monitor-httpd-service:wrapper-path}
${monitor-httpd-promise:filename} ${monitor-httpd-promise:name}
${monitor-bootstrap-promise:file} ${monitor-bootstrap-promise:name}
${monitor-symlink:recipe} ${monitor-symlink:recipe}
${promise-check-slapgrid:recipe} ${promise-check-slapgrid:recipe}
${promise-monitor-httpd-is-process-older-than-dependency-set:wrapper-path} ${promise-monitor-httpd-is-process-older-than-dependency-set:wrapper-path}
......
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