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