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
Lukas Niegsch
slapos
Commits
2d4bbe17
Commit
2d4bbe17
authored
Sep 27, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/helloworld: Switch to monitor-promise-base
parent
d5bed15d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
software/helloworld/buildout.hash.cfg
software/helloworld/buildout.hash.cfg
+1
-1
software/helloworld/instance.cfg.in
software/helloworld/instance.cfg.in
+6
-7
software/helloworld/software.cfg
software/helloworld/software.cfg
+2
-0
No files found.
software/helloworld/buildout.hash.cfg
View file @
2d4bbe17
...
@@ -14,4 +14,4 @@
...
@@ -14,4 +14,4 @@
# not need these here).
# not need these here).
[instance-profile]
[instance-profile]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
6567f8dedb5cdd93542dc29e96edb547
md5sum =
cc8902e44c1d50804b570775633b8c2a
software/helloworld/instance.cfg.in
View file @
2d4bbe17
...
@@ -15,6 +15,7 @@ eggs-directory = {{ buildout['eggs-directory'] }}
...
@@ -15,6 +15,7 @@ eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
offline = true
extends = {{ template_monitor }}
[instance-parameter]
[instance-parameter]
# Fetch arbitrary parameters defined by the user in SlapOS Master for his instance.
# Fetch arbitrary parameters defined by the user in SlapOS Master for his instance.
...
@@ -51,9 +52,6 @@ var = ${:home}/var
...
@@ -51,9 +52,6 @@ var = ${:home}/var
script = ${:etc}/run/
script = ${:etc}/run/
# Executables put here will be started and monitored (for daemons)
# Executables put here will be started and monitored (for daemons)
service = ${:etc}/service
service = ${:etc}/service
# Executables put here will be launched after buildout has completed to see
# if instance is running
promise = ${:etc}/promise/
# Path of the log directory used by our service (see [helloweb])
# Path of the log directory used by our service (see [helloweb])
log = ${:var}/log
log = ${:var}/log
...
@@ -88,8 +86,9 @@ wrapper-path = ${directory:service}/helloweb-${:kind}
...
@@ -88,8 +86,9 @@ wrapper-path = ${directory:service}/helloweb-${:kind}
# promise, that checks that helloweb service is alive
# promise, that checks that helloweb service is alive
[helloweb-promise]
[helloweb-promise]
recipe = slapos.cookbook:check_port_listening
<= monitor-promise-base
path = ${directory:promise}/helloweb-${:kind}
module = check_port_listening
name = helloweb-${:kind}.py
{# macro to instantiate service of `kind` to listen on `port` #}
{# macro to instantiate service of `kind` to listen on `port` #}
{% set service_list = [] %}
{% set service_list = [] %}
...
@@ -103,8 +102,8 @@ port = {{ port }}
...
@@ -103,8 +102,8 @@ port = {{ port }}
[helloweb-{{ kind }}-promise]
[helloweb-{{ kind }}-promise]
<= helloweb-promise
<= helloweb-promise
kind = {{ kind }}
kind = {{ kind }}
hostname= ${helloweb-{{ kind }}:ipv6}
config-
hostname= ${helloweb-{{ kind }}:ipv6}
port = {{ port }}
config-
port = {{ port }}
{% endmacro %}
{% endmacro %}
# services instantiation
# services instantiation
...
...
software/helloworld/software.cfg
View file @
2d4bbe17
...
@@ -7,6 +7,7 @@ extends =
...
@@ -7,6 +7,7 @@ extends =
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# Releases
# Releases
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# In this example we extend from helloweb component.
# In this example we extend from helloweb component.
...
@@ -46,6 +47,7 @@ rendered = ${buildout:directory}/instance.cfg
...
@@ -46,6 +47,7 @@ rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
extensions = jinja2.ext.do
context =
context =
section buildout buildout
section buildout buildout
raw template_monitor ${monitor2-template:rendered}
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# calling update-hash
# calling update-hash
...
...
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