Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "BaSyx / Documentation / Components / MongoDB"
(Initial version) |
m |
||
Line 18: | Line 18: | ||
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 | 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 | + | docker run --name=registry -p 8082:4000 -v C:/tmp:/usr/share/config eclipsebasyx/aas-registry:latest |
The '''mongodb.properties''' file has to be located in C:/tmp in this example. | The '''mongodb.properties''' file has to be located in C:/tmp in this example. |
Latest revision as of 11:17, 7 October 2020
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 eclipsebasyx/aas-registry:latest
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