Commit 3cc216c8 authored by Ivan Tyagov's avatar Ivan Tyagov

Add Beremiz' runtime.

parent 2f864667
[instance-profile]
filename = instance.cfg.in
md5sum = ed202dc7d69f517e325f01dc3ac4fe32
#############################
#
# Deploy beremiz' runtime instance
#
#############################
[buildout]
parts =
directory
publish-connection-parameter
download-plc
beremiz-runtime
# beremiz-runtime-promise
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
extends = {{ template_monitor }}
[download-plc]
recipe = plone.recipe.command
update-command = ${:command}
url = ${instance-parameter:configuration.runtime_plc_url}
md5sum = ${instance-parameter:configuration.runtime_plc_md5sum}
# XXX: do check md5sum !
command =
wget ${:url} -O plc.tgz
tar zxvf plc.tgz
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
configuration.runtime_plc_url =
configuration.runtime_plc_md5sum =
# XXX: we can get rid of plc_name in future
configuration.runtime_plc_name =
configuration.autostart = 1
configuration.interface = 0.0.0.0
# XXX: randomly generated one on slap's interface?
configuration.port = 61248
configuration.plc_runtime_path = ${directory:home}/${:configuration.runtime_plc_name}
# Create all needed directories, depending on your needs
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
log = ${:var}/log
[beremiz-runtime]
logfile = ${directory:log}/beremiz-runtime.log
recipe = slapos.cookbook:wrapper
command-line =
{{ buildout['bin-directory'] }}/pythonwitheggs {{ buildout['directory'] }}/src/beremiz/Beremiz_service.py -a ${instance-parameter:configuration.autostart} -p ${instance-parameter:configuration.port} -i ${instance-parameter:configuration.interface} -x 1 ${directory:home}/${instance-parameter:configuration.runtime_plc_name}
wrapper-path = ${directory:service}/beremiz-runtime
[beremiz-runtime-promise]
<= monitor-promise-base
module = check_port_listening
name = beremiz-runtime.py
config-hostname= ${instance-parameter:configuration.interface}
config-port = ${instance-parameter:configuration.port}
[publish-connection-parameter]
recipe = slapos.cookbook:publish
port = ${instance-parameter:configuration.port}
interface = ${instance-parameter:configuration.interface}
# the default SlapOs profile which setup a modbus server instance usually over OSIE's coupler
[buildout]
allow-picked-versions = true
extensions = mr.developer
auto-checkout = beremiz
extends =
buildout.hash.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/stack/monitor/buildout.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/stack/slapos.cfg
https://lab.nexedi.com/nexedi/slapos/raw/master/component/python3/buildout.cfg
parts =
python-interpreter
slapos-cookbook
instance-profile
# fix for pypi: https://mail.python.org/pipermail/distutils-sig/2017-October/031712.html
index = https://pypi.python.org/simple/
[sources]
beremiz = git https://github.com/beremiz/beremiz.git branch=default
[beremiz]
recipe = zc.recipe.egg:develop
egg = beremiz
setup = ${buildout:directory}/src/beremiz
[Twisted]
recipe = zc.recipe.egg:custom
egg = Twisted
setup-eggs =
six
pathlib
[python-interpreter]
recipe = zc.recipe.egg
interpreter = pythonwitheggs
eggs = click
prompt_toolkit
pygments
bitarray
future
six
Pyro
zeroconf-py2compat
pathlib
Nevow
msgpack
autobahn
${beremiz:egg}
${Twisted:egg}
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
mode = 0644
rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
section buildout buildout
raw template_monitor ${monitor2-template:rendered}
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# calling update-hash
[versions]
Twisted = 20.3.0
attrs = 19.2.0
Automat = 0.3.0
zope.interface = 4.4.2
Nevow = 0.14.5
PyHamcrest = 2.0.2
Pygments = 2.9.0
Pyro = 3.16
bitarray = 2.1.3
constantly = 15.1.0
future = 0.18.2
hyperlink = 21.0.0
incremental = 21.3.0
pathlib = 1.0.1
prompt-toolkit = 3.0.19
zeroconf-py2compat = 0.19.10
# Required by:
# Automat==0.3.0
characteristic = 14.3.0
# Required by:
# zeroconf-py2compat==0.19.10
ifcfg = 0.21
# Required by:
# hyperlink==21.0.0
typing = 3.10.0.0
autobahn = 19.11.2
txaio = 18.8.1
idna = 2.10
mr.developer = 2.0.1
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