Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
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
1
Merge Requests
1
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
nexedi
osie
Commits
9fe1559e
Commit
9fe1559e
authored
Jun 25, 2021
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slaposify
parent
f3398f29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
49 deletions
+8
-49
slapos/software/osie-coupler/buildout.hash.cfg
slapos/software/osie-coupler/buildout.hash.cfg
+1
-1
slapos/software/osie-coupler/instance.cfg.in
slapos/software/osie-coupler/instance.cfg.in
+7
-48
No files found.
slapos/software/osie-coupler/buildout.hash.cfg
View file @
9fe1559e
[instance-profile]
[instance-profile]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
b0efa23802f4fa545eaa4e67c83f0b7d
md5sum =
d9fa99d4090bc686c6d14828fb2321da
slapos/software/osie-coupler/instance.cfg.in
View file @
9fe1559e
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
parts =
parts =
directory
directory
publish-connection-parameter
publish-connection-parameter
coupler
coupler-promise
# Define egg directories to be the one from Software Release
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
# (/opt/slapgrid/...)
...
@@ -14,7 +16,6 @@ parts =
...
@@ -14,7 +16,6 @@ parts =
eggs-directory = {{ buildout['eggs-directory'] }}
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 }}
extends = {{ template_monitor }}
[instance-parameter]
[instance-parameter]
...
@@ -42,7 +43,6 @@ configuration.port = 1502
...
@@ -42,7 +43,6 @@ configuration.port = 1502
# configuration.mail-address =
# configuration.mail-address =
# If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
# If the user doesn't specify it, it won't break and the recipe can handle it (i.e don't send any mail for example).
# Create all needed directories, depending on your needs
# Create all needed directories, depending on your needs
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
@@ -56,22 +56,9 @@ service = ${:etc}/service
...
@@ -56,22 +56,9 @@ service = ${:etc}/service
# 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
[coupler]
# Create a simple web server that says "hello <configuration.name>" to the web.
[helloweb]
# helloworld service is listening on:
# - global IPv6 address, and
# - fixed port
#
# NOTE because every computer partition is allocated its own global IPv6
# address, it is ok to fix the port - different hello-world instances will have
# different IPv6 addresses and they all will be accessible at the same time.
ipv6 = ${instance-parameter:ipv6-random}
# full URL - for convenience
#url = http://[${:ipv6}]:${:port}
# the service will log here
# the service will log here
logfile = ${directory:log}/
helloweb-${:kind}
.log
logfile = ${directory:log}/
coupler
.log
# Actual script that starts the service:
# Actual script that starts the service:
# This recipe will try to "exec" the command-line after separating parameters.
# This recipe will try to "exec" the command-line after separating parameters.
...
@@ -81,43 +68,15 @@ command-line =
...
@@ -81,43 +68,15 @@ command-line =
# Put this shell script in the "etc/service" directory. Each executable of this
# Put this shell script in the "etc/service" directory. Each executable of this
# repository will be started and monitored by supervisord. If a service
# repository will be started and monitored by supervisord. If a service
# exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
# exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
wrapper-path = ${directory:service}/helloweb-${:kind}
wrapper-path = ${directory:service}/coupler
# promise, that checks that helloweb service is alive
# promise, that checks that helloweb service is alive
[
helloweb
-promise]
[
coupler
-promise]
<= monitor-promise-base
<= monitor-promise-base
module = check_port_listening
module = check_port_listening
name = helloweb-${:kind}.py
name = coupler.py
{# macro to instantiate service of `kind` to listen on `port` #}
{% set service_list = [] %}
{% macro hellowebsrv(kind, port) %}
{% do service_list.append(kind) %}
[helloweb-{{ kind }}]
<= helloweb
kind = {{ kind }}
port = {{ port }}
[helloweb-{{ kind }}-promise]
<= helloweb-promise
kind = {{ kind }}
config-hostname= ${instance-parameter:configuration.interface}
config-hostname= ${instance-parameter:configuration.interface}
config-port = ${instance-parameter:configuration.port}
config-port = ${instance-parameter:configuration.port}
{% endmacro %}
# services instantiation
{{ hellowebsrv('python', 7777) }}
# register all services/promises to buildout parts
[buildout]
parts +=
{%- for kind in service_list %}
helloweb-{{ kind }}
helloweb-{{ kind }}-promise
{%- endfor %}
# Publish all the parameters needed for the user to connect to the instance.
# Publish all the parameters needed for the user to connect to the instance.
# It can be anything: URL(s), password(s), or arbitrary parameters.
# It can be anything: URL(s), password(s), or arbitrary parameters.
...
...
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