AAS Registry#

Docker Pulls (log-mem) Docker Pulls (log-mongodb) Docker Pulls (kafka-mem) Docker Pulls (kafka-mongodb) GitHub Metamodel API

The AAS Registry is a server that provides a REST API to register and search for Asset Administration Shells based on their shell descriptors.

The server is based on the Open-API specification of the German Plattform Industrie 4.0 and the IDTA in the specification document Details of the Asset Administration Shell, Part 2.

Features#

basyx.aasregistry-client-native can be used to interact with the backend to register or unregister descriptors and submodels or perform search operations.

basyx.aasregistry-paths generates a builder class that can be used by the registry client to create search requests.

basyx.aasregistry-plugins contains maven plugins used by the other projects.

basyx.aasregistry-service provides the application server to access the AAS descriptor storage and offers an API for REST-based communication.

basyx.aasregistry-service-basemodel provides a base model implementation that should be used if you do not need specific model annotations for your storage. It is used for the in-memory storage implementation and you need to add it explicitly as dependency for your server deployment as it is defined as ‘provided’ dependency in the basyx.aasregistry-service POM.

basyx.aasregistry-service-basetests provides helper classes and abstract test classes that can be extended in storage tests or integration tests. The abstract test classes already define test methods so that you will get a good test coverage without writing any additional test cases.

basyx.aasregistry-service-mongodb-storage provides a registry-storage implementation based on mongoDB that could be used as storage for aasregistry-service. It comes with java-based model classes, annotated with mongoDB annotations.

basyx.aasregistry-service-inmemory-storage provides a non-persistent registry-storage implementation where instances are stored in hash maps. It can be used as storage for aasregistry-service.

basyx.aasregistry-service-kafka-events extends basyx.aasregistry-service with a registry-event-sink implementation that delivers shell descriptor and submodel registration events using Apache Kafka. The default provided by aasregistry-service just logs the events.

basyx.aasregistry-service-release-kafka-mongodb is used to combine the server artifacts to a release image that uses Apache Kafka as event sink and MongoDB as storage.

basyx.aasregistry-service-release-kafka-mem is used to combine the server artifacts to a release image that uses Apache Kafka as event sink and an in-memory storage.

basyx.aasregistry-service-release-log-mongodb is used to combine the server artifacts to a release image that logs registry events and uses MongoDB as data storage.

basyx.aasregistry-service-release-log-mem is used to combine the server artifacts to a release image that logs registry events and an in-memory storage.

A docker-compose file that illustrates the setup can be found in the docker-compose folder.

Server Configuration#

Backend Configuration#

There is no separate configuration for a backend. To use a specific backend, you must use the appropriate storage implementation.

However, if you are using a MongoDB module, you will need to set the connection uri for the MongoDB storage implementation:

spring:
  data:
    mongodb:
      uri: mongodb://mongoAdmin:mongoPassword@mongo:27017

CORS Configuration#

Configure CORS settings to specify allowed origins and methods.

basyx:
  cors:
    allowed-origins: '*'
    allowed-methods: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD

#

Note

A favicon is a small 16×16 or 32×32 pixel icon, symbol or logo used by web browsers to identify a website in a recognizable way

To configure the favicon, mount your favicon to the static directory of the component using Docker:

docker run --name=aas-registry -p:8081:8081 -v C:/path/to/favicon.ico:/application/static/favicon.ico eclipsebasyx/aas-registry-log-mem:2.0.0-SNAPSHOT

or

aas-registry:
    image: eclipsebasyx/aas-registry-log-mem:2.0.0-SNAPSHOT
    container_name: aas-registry
    volumes:
      - ./basyx/aas-registry.properties:/application/application.properties
	  - ./basyx/static/favicon.ico:/application/static/favicon.ico
    ports:
      - '8080:8080'

Docker#

The following example demonstrates how to use the AAS Registry with Docker Compose:

aas-registry:
    image: eclipsebasyx/aas-registry-log-mongodb:2.0.0-SNAPSHOT
    container_name: aas-registry
    ports:
      - '8083:8080'
    environment:
      - SERVER_PORT=8080
    volumes:
      - ./basyx/aas-registry.yml:/workspace/config/application.yml
    restart: always

Warning

When running this component inside Docker, do not modify the internal port configuration.
Changing the port setting may prevent the service from being accessible from outside the container.

Virtual Machine#

Eclipse BaSyx provides the AAS Registry as a virtual machine image for Oracle VirtualBox and VMware Workstation Player. At the moment, only the version that logs registry events and uses an in-memory storage is available as a virtual machine image. So, it is not possible to use Apache Kafka as event sink or MongoDB as storage.

The image can be found here. How to use it is described here.

Build Resources#

To build the images run these commands from this folder or for the parent project pom:

Install maven generate jars:

mvn clean install

In order to build the docker images, you need to specify docker.namespace and docker.password properties (here without running tests):

MAVEN_OPS='-Xmx2048 -Xms1024' mvn clean install -DskipTests -Ddocker.namespace=eclipsebasyx -Ddocker.password=""

You can now check your images from command-line and push the images:

docker images   ...

Or you can directly push them from maven.

MAVEN_OPS='-Xmx2048 -Xms1024' mvn deploy -Ddocker.registry=docker.io -Ddocker.namespace=eclipsebasyx -Ddocker.password=pwd

In addition, maven deploy will also deploy your maven artifacts, so you can do everything in one step.

Have a look at the docker-compose sub-folder to see how the created images could be referenced in docker-compose files.

Consider updating the image name pattern if you want a different image name.

Swagger UI#

In the Swagger UI, you can find the API documentation for the AAS Registry.

You can also execute all the API calls directly from the Swagger UI.

The Aggregated API endpoint documentation is available at:

http://{host}:{port}/v3/api-docs

The Aggregated Swagger UI for the endpoints is available at:

http://{host}:{port}/swagger-ui/index.html