Commit 38d5a509 authored by Ivan Tyagov's avatar Ivan Tyagov

Use proper recipe for download.

Adjust paths.
Cleanup.
parent 987ddaf7
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = ed202dc7d69f517e325f01dc3ac4fe32 md5sum = a438aa4126feb2e609a082935acbb625
...@@ -5,27 +5,20 @@ ...@@ -5,27 +5,20 @@
############################# #############################
[buildout] [buildout]
parts = parts =
directory
publish-connection-parameter publish-connection-parameter
download-plc download-plc
beremiz-runtime beremiz-runtime
# beremiz-runtime-promise #beremiz-runtime-promise
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 }}
[download-plc] [download-plc]
recipe = plone.recipe.command recipe = slapos.recipe.build:download-unpacked
update-command = ${:command} offline = false
url = ${instance-parameter:configuration.runtime_plc_url} 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] [instance-parameter]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
...@@ -42,7 +35,6 @@ configuration.autostart = 1 ...@@ -42,7 +35,6 @@ configuration.autostart = 1
configuration.interface = 0.0.0.0 configuration.interface = 0.0.0.0
# XXX: randomly generated one on slap's interface? # XXX: randomly generated one on slap's interface?
configuration.port = 61248 configuration.port = 61248
configuration.plc_runtime_path = ${directory:home}/${:configuration.runtime_plc_name}
# Create all needed directories, depending on your needs # Create all needed directories, depending on your needs
[directory] [directory]
...@@ -50,7 +42,7 @@ recipe = slapos.cookbook:mkdirectory ...@@ -50,7 +42,7 @@ recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory} home = ${buildout:directory}
etc = ${:home}/etc etc = ${:home}/etc
var = ${:home}/var var = ${:home}/var
script = ${:etc}/run/ script = ${:etc}/run
service = ${:etc}/service service = ${:etc}/service
log = ${:var}/log log = ${:var}/log
...@@ -58,7 +50,7 @@ log = ${:var}/log ...@@ -58,7 +50,7 @@ log = ${:var}/log
logfile = ${directory:log}/beremiz-runtime.log logfile = ${directory:log}/beremiz-runtime.log
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = 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} {{ buildout['bin-directory'] }}/pythonwitheggs {{ buildout['directory'] }}/parts/beremiz-source/Beremiz_service.py -a ${instance-parameter:configuration.autostart} -p ${instance-parameter:configuration.port} -i ${instance-parameter:configuration.interface} -x 1 ${directory:home}/parts/download-plc
wrapper-path = ${directory:service}/beremiz-runtime wrapper-path = ${directory:service}/beremiz-runtime
[beremiz-runtime-promise] [beremiz-runtime-promise]
......
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