Commit dbc0f387 authored by Ivan Tyagov's avatar Ivan Tyagov

Cleanup.

parent f51b3243
...@@ -26,13 +26,6 @@ command-line = ...@@ -26,13 +26,6 @@ command-line =
wrapper-path = ${directory:service}/coupler-opc-ua wrapper-path = ${directory:service}/coupler-opc-ua
[instance-parameter] [instance-parameter]
# Fetch arbitrary parameters defined by the user in SlapOS Master for his instance.
# We use the slapconfiguration recipe with a few parameters (partition id,
# computer id, certificate, etc).
# It will then authenticate to SlapOS Master and fetch the instance parameters.
# The parameters are accessible from ${instance-parameter:configuration.name-of-parameter}
# Always the same. Just copy/paste.
# See docstring of slapos.cookbook:slapconfiguration for more information.
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id} computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id} partition = ${slap-connection:partition-id}
...@@ -44,16 +37,8 @@ configuration.coupler_block_device = /dev/i2c-1 ...@@ -44,16 +37,8 @@ configuration.coupler_block_device = /dev/i2c-1
configuration.coupler_i2c_slave_list = 0x58 configuration.coupler_i2c_slave_list = 0x58
configuration.username = configuration.username =
configuration.password = configuration.password =
# Define default parameter(s) that will be used later, in case user didn't
# specify it.
# All possible parameters should have a default.
# In our use case, we are expecting from the user to specify one (optional) parameter: "name". We put the default value here if he doesn't specify it, so that it doesn't crash.
configuration.interface = 0.0.0.0 configuration.interface = 0.0.0.0
configuration.opc_ua_port = 4840 configuration.opc_ua_port = 4840
# If our use case requires that the user can specify a mail address so that his instance can mail to him (for example), we can do:
# 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).
# Create all needed directories, depending on your needs # Create all needed directories, depending on your needs
[directory] [directory]
...@@ -61,16 +46,10 @@ recipe = slapos.cookbook:mkdirectory ...@@ -61,16 +46,10 @@ recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory} home = ${buildout:directory}
etc = ${:home}/etc etc = ${:home}/etc
var = ${:home}/var var = ${:home}/var
# Executables put here will be started but not monitored (for startup scripts)
script = ${:etc}/run/ script = ${:etc}/run/
# Executables put here will be started and monitored (for daemons)
service = ${:etc}/service service = ${:etc}/service
# Path of the log directory used by our service (see [helloweb])
log = ${:var}/log log = ${:var}/log
# Publish all the parameters needed for the user to connect to the instance.
# It can be anything: URL(s), password(s), or arbitrary parameters.
# Here we'll just echo back the entered name as instance parameter
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
opc_ua_port = ${instance-parameter:configuration.opc_ua_port} opc_ua_port = ${instance-parameter:configuration.opc_ua_port}
......
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