Commit 5f8dc534 authored by Levin Zimmermann's avatar Levin Zimmermann

stack/erp5: add global opcua-server configuration

parent c2abc67d
......@@ -226,6 +226,7 @@ context =
key template_postfix_master_cf template-postfix-master-cf:target
key instance_wcfs_cfg_in instance-wcfs.cfg.in:target
key instance_opcua_server_cfg_in instance-opcua-server.cfg.in:target
key opcua_server_config_xml opcua-server-config.xml:target
key template_zeo template-zeo:target
key template_zodb_base template-zodb-base:target
key template_zope template-zope:target
......@@ -301,6 +302,9 @@ fontconfig-includes =
[instance-opcua-server.cfg.in]
<= download-base
[opcua-server-config.xml]
<= download-base
[erp5-bin]
<= erp5
repository = https://lab.nexedi.com/nexedi/erp5-bin.git
......
......@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template]
filename = instance.cfg.in
md5sum = e08141edfda8d4159e26898000e991f3
md5sum = eacf1b6a5ab577100660b441bcccd397
[template-erp5]
filename = instance-erp5.cfg.in
......@@ -106,4 +106,8 @@ md5sum = eb4be2669a9a56187cc4366272e11d18
[instance-opcua-server.cfg.in]
filename = instance-opcua-server.cfg.in
md5sum = 207b458e52de1a038af807274345b5ff
md5sum = 2786edfcd1c720d08dd624dfee4840ff
[opcua-server-config.xml]
filename = opcua-server-config.xml
md5sum = 09f5d87b8bd5b508458ac24e4f541767
{% set ipv4 = (ipv4_set | list)[0] -%}
{# port is hard coded here + in stack/erp5/haproxy.cfg.in #}
{% set port = 2262 %}
{% set opcua_server_config = parameter_dict["opcua_server_config_xml"] %}
[buildout]
extends = {{ template_monitor }}
......@@ -21,5 +22,5 @@ var = ${buildout:directory}/var
[opcua-server]
recipe = slapos.cookbook:wrapper
command-line =
{{ bin_directory }}/opcua-server --ip {{ ipv4 }} --port {{ port }}
{{ bin_directory }}/opcua-server --ip {{ ipv4 }} --port {{ port }} --xml {{ opcua_server_config }}
wrapper-path = ${directory:service-on-watch}/opcua-server
......@@ -209,13 +209,15 @@ extra-context =
import-list =
file instance_zodb_base context:template-zodb-base
[dynamic-template-opcua-server-parameters]
opcua_server_config_xml = {{ opcua_server_config_xml }}
[dynamic-template-opcua-server]
<= jinja2-template-base
url = {{ instance_opcua_server_cfg_in }}
filename = instance_opcua_server.cfg
extra-context =
section parameter_dict dynamic-template-zope-parameters
section parameter_dict dynamic-template-opcua-server-parameters
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
......
<?xml version='1.0' encoding='utf-8'?>
<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd">
<NamespaceUris>
<Uri>http://erp5.com</Uri>
</NamespaceUris>
<Aliases>
<Alias Alias="Int64">i=8</Alias>
<Alias Alias="Organizes">i=35</Alias>
<Alias Alias="HasTypeDefinition">i=40</Alias>
<Alias Alias="HasComponent">i=47</Alias>
</Aliases>
<UAObject NodeId="ns=1;i=1" BrowseName="1:erp5-test-object-0" ParentNodeId="i=85">
<DisplayName>erp5-test-object-0</DisplayName>
<Description>erp5-test-object-0</Description>
<References>
<Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
<Reference ReferenceType="HasTypeDefinition">i=58</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=2</Reference>
</References>
</UAObject>
<UAVariable NodeId="ns=1;i=2" BrowseName="1:erp5-variable" ParentNodeId="ns=1;i=1" DataType="Int64" AccessLevel="3" UserAccessLevel="3">
<DisplayName>erp5-variable</DisplayName>
<Description>erp5-variable</Description>
<References>
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1</Reference>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
</References>
</UAVariable>
<UAObject NodeId="ns=1;i=3" BrowseName="1:erp5-test-object-1" ParentNodeId="i=85">
<DisplayName>erp5-test-object-1</DisplayName>
<Description>erp5-test-object-1</Description>
<References>
<Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
<Reference ReferenceType="HasTypeDefinition">i=58</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=4</Reference>
</References>
</UAObject>
<UAVariable NodeId="ns=1;i=4" BrowseName="1:erp5-variable" ParentNodeId="ns=1;i=3" DataType="Int64" AccessLevel="3" UserAccessLevel="3">
<DisplayName>erp5-variable</DisplayName>
<Description>erp5-variable</Description>
<References>
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=3</Reference>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
</References>
</UAVariable>
<UAObject NodeId="ns=1;i=5" BrowseName="1:erp5-test-object-2" ParentNodeId="i=85">
<DisplayName>erp5-test-object-2</DisplayName>
<Description>erp5-test-object-2</Description>
<References>
<Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
<Reference ReferenceType="HasTypeDefinition">i=58</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=6</Reference>
</References>
</UAObject>
<UAVariable NodeId="ns=1;i=6" BrowseName="1:erp5-variable" ParentNodeId="ns=1;i=5" DataType="Int64" AccessLevel="3" UserAccessLevel="3">
<DisplayName>erp5-variable</DisplayName>
<Description>erp5-variable</Description>
<References>
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5</Reference>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
</References>
</UAVariable>
<UAObject NodeId="ns=1;i=7" BrowseName="1:erp5-test-object-3" ParentNodeId="i=85">
<DisplayName>erp5-test-object-3</DisplayName>
<Description>erp5-test-object-3</Description>
<References>
<Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
<Reference ReferenceType="HasTypeDefinition">i=58</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=8</Reference>
</References>
</UAObject>
<UAVariable NodeId="ns=1;i=8" BrowseName="1:erp5-variable" ParentNodeId="ns=1;i=7" DataType="Int64" AccessLevel="3" UserAccessLevel="3">
<DisplayName>erp5-variable</DisplayName>
<Description>erp5-variable</Description>
<References>
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=7</Reference>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
</References>
</UAVariable>
<UAObject NodeId="ns=1;i=9" BrowseName="1:erp5-test-object-4" ParentNodeId="i=85">
<DisplayName>erp5-test-object-4</DisplayName>
<Description>erp5-test-object-4</Description>
<References>
<Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
<Reference ReferenceType="HasTypeDefinition">i=58</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=10</Reference>
</References>
</UAObject>
<UAVariable NodeId="ns=1;i=10" BrowseName="1:erp5-variable" ParentNodeId="ns=1;i=9" DataType="Int64" AccessLevel="3" UserAccessLevel="3">
<DisplayName>erp5-variable</DisplayName>
<Description>erp5-variable</Description>
<References>
<Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=9</Reference>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
</References>
</UAVariable>
</UANodeSet>
\ No newline at end of file
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