Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "BaSyx / Documentation / Components / Registry"

m (Updates image version)
m
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{| class="wikitable"
 
{| class="wikitable"
| [[BaSyx_/_Documentation_/_Registry | Overview]]  <nowiki>|</nowiki>  [[BaSyx_/_Documentation_/_API_/_Registry| Interface]]  <nowiki>|</nowiki>  [[BaSyx_/_Documentation_/_Components_/_Registry | Component]]
+
| [[BaSyx_/_Documentation_/_Registry | Overview]]  <nowiki>|</nowiki>  [[BaSyx_/_Documentation_/_API_/_Registry| Interface]]  <nowiki>|</nowiki>  [[BaSyx_/_Documentation_/_Components_/_Registry | Component]] <nowiki>|</nowiki>  [[BaSyx_/_Documentation_/_Components_/_Registry_/_Features | Features]]  
 
|}
 
|}
  
Line 11: Line 11:
 
The registry image is made available via [https://hub.docker.com/repository/docker/eclipsebasyx/aas-registry Docker Hub] and can be pulled by:
 
The registry image is made available via [https://hub.docker.com/repository/docker/eclipsebasyx/aas-registry Docker Hub] and can be pulled by:
  
  docker pull eclipsebasyx/aas-registry:1.2.0
+
  docker pull eclipsebasyx/aas-registry:1.5.1
  
 
Alternatively, the command described in Startup section will download the image.
 
Alternatively, the command described in Startup section will download the image.
Line 19: Line 19:
 
To easily start the registry component, you can use the following command:
 
To easily start the registry component, you can use the following command:
  
  docker run --name=registry -p 8082:4000 eclipsebasyx/aas-registry:1.2.0
+
  docker run --name=registry -p 8082:4000 eclipsebasyx/aas-registry:1.5.1
  
 
Next, the HTTP/REST endpoint of the Registry is accessible via  
 
Next, the HTTP/REST endpoint of the Registry is accessible via  
Line 37: Line 37:
 
As with the other components, the registry's context can be customized using the [[BaSyx_/_Documentation_/_Components_/_Context | context configuration]].
 
As with the other components, the registry's context can be customized using the [[BaSyx_/_Documentation_/_Components_/_Context | context configuration]].
  
== Backend Configuration ==  
+
== AAS Registry Configuration ==
  
By default, the registry uses the non-persistent InMemory-"backend". This can be changed by providing a registry configuration file when starting the container. The configuration file contains a single property '''registry.properties''' and looks like this:
+
For the AAS Registry component, a multitude of features can be configured via the registry.properties file. By default, this configuration file is assumed to be located at ''"/usr/share/config/registry.properties"'' within the container.
  
registry.backend=SQL
 
 
Eventing via MQTT can be enabled in the property file as well. This will publish events for every action to a separately specified server:
 
 
registry.events=MQTT
 
 
Together with '''SQL''', the values '''InMemory''' and '''MongoDB''' are also allowed.
 
By default, this configuration file is assumed to be located at ''"/usr/share/config/registry.properties"'' within the container.
 
 
Thus, another configuration file can be set by mounting a local configuration file into the container during startup. As an example, a local folder containing the configuration files can be mounted using:
 
Thus, another configuration file can be set by mounting a local configuration file into the container during startup. As an example, a local folder containing the configuration files can be mounted using:
  
  docker run --name=registry -p 8082:4000 -v C:/tmp:/usr/share/config eclipsebasyx/aas-registry:1.2.0
+
  docker run --name=registry -p 8082:4000 -v C:/tmp:/usr/share/config eclipsebasyx/aas-registry:1.5.1
 
+
In this example, the '''registry.properties''' file is located in C:/tmp/.
+
 
+
Authorization is disabled by default. Basic authorization can be configured in the registry.properties:
+
 
+
registry.authorization=Enabled
+
registry.authorization=Disabled
+
 
+
The TaggedDirectory is disabled by default. It can be configured in the registry.properties:
+
 
+
  registry.taggedDirectory=Enabled
+
  registry.taggedDirectory=Disabled
+
 
+
== SQL Backend ==
+
 
+
Uses an SQL backend, e.g. postgres to persist registry entries. The connector to the SQL database can be configured with its own [[BaSyx_/_Documentation_/_Components_/_SQL | configuration file]].
+
 
+
== MongoDB Backend ==
+
 
+
Uses a MongoDB backend. Both, the SQL and the MongoDB variants can be configured using the .properties files in ''src/main/resources'' of the components. Similar to the SQL backend, for the MongoDB backend, another [[BaSyx_/_Documentation_/_Components_/_MongoDB | configuration file]] can be specified.
+
 
+
== InMemory ==
+
 
+
Stores the Registry entries in RAM. ''!!Please be aware that this is not persistent and therefore only for testing! After component restart, all entries are lost. Use this only for testing!!''
+
 
+
== Tagged Directory ==
+
 
+
''[Disclaimer: In development branch]''
+
A tagged directory is an implementation of the registry that allows to associate AAS with tags. When in use, AAS can be retrieved based on tags. <blockquote>
+
'''Disclaimer:''' Currently only works with an InMemory backend. Persistent backends (SQL and MondoDB), as well as combination with Authorization, or MQTT is yet to be supported.
+
</blockquote>
+
 
+
== Authorized AAS Registry ==
+
 
+
As stated above in [[BaSyx_/_Documentation_/_Components_/_Context | context configuration]] there are some properties stated related to JWT based Authorization. This Authorization
+
mechanism makes authorized access to the AAS Registry. Read and write authorization is enabled. In order to read from the registry or write to the registry there is a need of
+
authorization token.
+
 
+
Example demonstrating above scenario is here [[BaSyx_/_Scenarios_/_Authorization | Authorized AAS Registry]].
+
 
+
== Eventing with MQTT ==
+
  
Additionally, to the '''registry.properties''' file, you need to edit the [[BaSyx_/_Documentation_/_Components_/_MQTT | '''mqtt.properties''' file]] in order to connect to the right MQTT broker. The MQTT configuration file can be found in the same folder as the backend configuration. It allows you to add credentials and a Quality of Service level (default: 1) besides the mandatory server address.
+
In this example, the '''registry.properties''' file is located in C:/tmp/
  
Information about what events will be published can be found in the [[BaSyx_/_Developer_/_Extensions_/_Eventing | eventing extension]].
+
The features of the AAS Registry component are documented on their own page:
 +
[[BaSyx_/_Documentation_/_Components_/_Registry_/_Features | Features]]
  
 
== Java Implementation ==
 
== Java Implementation ==

Latest revision as of 03:47, 5 February 2024

Overview | Interface | Component | Features

Registry Component

The Registry is a central component to the Asset Administration Shell (AAS) infrastructure for looking up available AAS and their contained submodels. Hence, it is realized as a separate component that can also be containerized. Currently, there exists a single Registry component that can be configured to utilize different types of backends.

Download

The registry image is made available via Docker Hub and can be pulled by:

docker pull eclipsebasyx/aas-registry:1.5.1

Alternatively, the command described in Startup section will download the image.

Startup

To easily start the registry component, you can use the following command:

docker run --name=registry -p 8082:4000 eclipsebasyx/aas-registry:1.5.1

Next, the HTTP/REST endpoint of the Registry is accessible via

http://localhost:8082/registry/api/v1/registry

If no AAS/SM is registered, an empty JSON list "[]" will be returned.

And the container can be stopped, started and removed using its name (see --name):

docker stop registry
docker start registry
docker rm registry

Context Configuration

As with the other components, the registry's context can be customized using the context configuration.

AAS Registry Configuration

For the AAS Registry component, a multitude of features can be configured via the registry.properties file. By default, this configuration file is assumed to be located at "/usr/share/config/registry.properties" within the container.

Thus, another configuration file can be set by mounting a local configuration file into the container during startup. As an example, a local folder containing the configuration files can be mounted using:

docker run --name=registry -p 8082:4000 -v C:/tmp:/usr/share/config eclipsebasyx/aas-registry:1.5.1

In this example, the registry.properties file is located in C:/tmp/

The features of the AAS Registry component are documented on their own page: Features

Java Implementation

Within the project, the component can be found in the Java repository at Java. In this project, the executable can take the parameter BASYX_REGISTRY to configure the path of the registry configuration file. For example, you can specify the path of the registry configuration file via

java -jar -DBASYX_REGISTRY="C:/tmp/registry.properties" registry.jar

Back to the top