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

BaSyx / Documentation / Components / MongoDB

< BaSyx ‎ | Documentation ‎ | Components
Revision as of 11:14, 7 October 2020 by Daniel.Espen.iese.fraunhofer.de (Talk | contribs) (Initial version)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The component's MongoDB configuration can be used to specify the MongoDB database and its used collection names for the containers.

Default Configuration

By default, a MongoDB database is assumed with the default port and credentials:

dbuser			= admin
dbname			= admin
dbconnectionstring	= mongodb://localhost:27017/
dbcollectionRegistry	= registry
dbcollectionAAS		= assetadministrationshells
dbcollectionSubmodels	= submodels

The collection names are used by the AAS Server Component and the Registry Component to specifiy the collection within the MongoDB to store the AAS, submodels and registry entries.

Custom Configuration

For docker components, the mongodb.properties file can be mounted inside of the container using a volume during container startup. E.g., to run the registry component with custom configuration, use

docker run --name=registry -p 8082:4000 -v C:/tmp:/usr/share/config basyx/registry:1.0.0

The mongodb.properties file has to be located in C:/tmp in this example.

In order to change the MongoDB configuration when directly starting the component from the Java executable, you can specifiy the configuration file path via the BASYX_MONGODB parameter. See the following example with the registry:

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

Back to the top