Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aurel
slapos
Commits
d91a00ec
Commit
d91a00ec
authored
Feb 05, 2019
by
Alain Takoudjou
Committed by
Łukasz Nowak
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: migrate promises to new python format
parent
6270a40b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
39 deletions
+32
-39
stack/monitor/buildout.hash.cfg
stack/monitor/buildout.hash.cfg
+1
-1
stack/monitor/instance-monitor.cfg.jinja2.in
stack/monitor/instance-monitor.cfg.jinja2.in
+31
-38
No files found.
stack/monitor/buildout.hash.cfg
View file @
d91a00ec
...
@@ -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
stack/monitor/instance-monitor.cfg.jinja2.in
View file @
d91a00ec
...
@@ -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:
file
name}
${monitor-httpd-promise:name}
${monitor-bootstrap-promise:
fil
e}
${monitor-bootstrap-promise:
nam
e}
${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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment