Commit 406bf60c authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

software/beremiz-runtime: correctly use IPv4 partition

THis is a fixup of 4df39d83.
parent 4174b297
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 011fd9ba538b291545f4e021224357b2 md5sum = eafb0d0c2137516e884cde56b7016270
...@@ -29,9 +29,6 @@ key = ${slap-connection:key-file} ...@@ -29,9 +29,6 @@ key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file} cert = ${slap-connection:cert-file}
configuration.runtime_plc_url = configuration.runtime_plc_url =
configuration.runtime_plc_md5sum = configuration.runtime_plc_md5sum =
configuration.autostart = 1
configuration.interface = ${:ipv4-random}
configuration.port = 8009
# Create all needed directories, depending on your needs # Create all needed directories, depending on your needs
[directory] [directory]
...@@ -47,6 +44,10 @@ log = ${:var}/log ...@@ -47,6 +44,10 @@ log = ${:var}/log
[beremiz-runtime] [beremiz-runtime]
logfile = ${directory:log}/beremiz-runtime.log logfile = ${directory:log}/beremiz-runtime.log
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# default webport in Beremiz
webport = 8009
# adding BEREMIZPYTHONPATH is needed so we can override the Beremiz' # adding BEREMIZPYTHONPATH is needed so we can override the Beremiz'
# internal code which tries to use sys.executable to spawn processes # internal code which tries to use sys.executable to spawn processes
# and in the context of SlapOS it's a plain Python without needed modules # and in the context of SlapOS it's a plain Python without needed modules
...@@ -56,6 +57,7 @@ environment = ...@@ -56,6 +57,7 @@ environment =
BEREMIZPYTHONPATH = {{ buildout['bin-directory'] }}/pythonwitheggs BEREMIZPYTHONPATH = {{ buildout['bin-directory'] }}/pythonwitheggs
PATH={{ gcc_location }}/bin PATH={{ gcc_location }}/bin
LIBRARY_PATH={{ openssl_location }}/lib LIBRARY_PATH={{ openssl_location }}/lib
BEREMIZ_LOCAL_HOST=${instance-parameter:ipv4-random}
command-line = command-line =
{{ buildout['bin-directory'] }}/pythonwitheggs {{ buildout['directory'] }}/parts/beremiz-source/Beremiz_cli.py -k --project-home ${directory:home}/parts/download-plc/ build transfer run {{ buildout['bin-directory'] }}/pythonwitheggs {{ buildout['directory'] }}/parts/beremiz-source/Beremiz_cli.py -k --project-home ${directory:home}/parts/download-plc/ build transfer run
...@@ -64,10 +66,9 @@ wrapper-path = ${directory:service}/beremiz-runtime ...@@ -64,10 +66,9 @@ wrapper-path = ${directory:service}/beremiz-runtime
[http-promise] [http-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/${:_buildout_section_name_} path = ${directory:promise}/${:_buildout_section_name_}
hostname = ${instance-parameter:configuration.interface} hostname = ${instance-parameter:ipv4-random}
port = ${instance-parameter:configuration.port} port = ${beremiz-runtime:webport}
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
port = ${instance-parameter:configuration.port} beremiz_runtime_url = http://${instance-parameter:ipv4-random}:${beremiz-runtime:webport}
interface = ${instance-parameter:configuration.interface}
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