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 / Environment Variables"

Line 95: Line 95:
  
 
=== BaSyxMqttConfiguration.java ===
 
=== BaSyxMqttConfiguration.java ===
When configuring BSyx MQTT, always put the prefix "basyxmqtt_" at begin of an environment variable.
+
When configuring BaSyx MQTT, always put the prefix "basyxmqtt_" at begin of an environment variable.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 107: Line 107:
 
| basyxmqtt_user
 
| basyxmqtt_user
 
| basyxmqtt_user=
 
| basyxmqtt_user=
 +
|-
 +
| pass
 +
| basyxmqtt_pass
 +
| basyxmqtt_pass=
 +
|-
 +
| server
 +
| basyxmqtt_server
 +
| basyxmqtt_server=http://localhost:1883/
 +
|-
 +
| qos
 +
| basyxmqtt_qos
 +
| basyxmqtt_qos=1
 +
|}
 +
 +
=== BaSyxSQLConfiguration.java ===
 +
When configuring BaSyx SQL, always put the prefix "basyxsql_" at begin of an environment variable.
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" | Configuration using Environment variables
 +
|-
 +
! Variable name
 +
! Written as an environment variable
 +
! Example
 +
|-
 +
| dbuser
 +
| basyxsql_dbuser
 +
| basyxsql_dbuser=postgres
 
|-
 
|-
 
| pass
 
| pass

Revision as of 06:54, 8 April 2022

Instead of using .properties file to configure the BaSyx components such as aas-server, registry etc., a user can also use environment variable for configuration. All parameters which are defined in the BaSyx*Configuration.java in this package basyx.components.lib/src/main/java/org/eclipse/basyx/components/configuration/ . There are general rules when using environment variables:

  • Once environment variables are set, then the settings in the .properties file will be overwritten.
  • When using environment variables, it is not allowed to use "." in your parameters (such as basyx_aas.server) and DO NOT mix upper and lower case letters(such as BaSyx_aas_server).
  • Always put the prefix of this component configuration at the begin of an environment variable and write it in lower case.

BaSyxContextConfiguration.java

When configuring the BaSyx context, always put the prefix "basyxcontext_" at begin of an environment variable.

Configuration using Environment variables
Variable name Written as an environment variable Example
contextPath basyxcontext_contextpath basyxcontext_contextpath=basys.sdk
contextDocPath basyxcontext_contextdocpath basyxcontext_contextdocpath=java.io.tempdir
contextHostname basyxcontext_contexthostname basyxcontext_contexthostname=localhost
contextPort basyxcontext_contextport basyxcontext_contextport=4000


BaSyxDockerConfiguration.java

When configuring a BaSyx Docker container, always put the prefix "basyxdocker_" at begin of an environment variable.

Configuration using Environment variables
Variable name Written as an environment variable Example
BASYX_HOST_PORT basyxdocker_basyx_host_port basyxdocker_basyx_host_port=4000
BASYX_CONTAINER_PORT basyxdocker_basyx_container_port basyxdocker_basyx_container_port=4000
BASYX_IMAGE_NAME basyxdocker_basyx_image_name basyxdocker_basyx_image_name=aasserver
BASYX_CONTAINER_NAME basyxdocker_basyx_container_name basyxdocker_basyx_container_name=aas-server


BaSyxMongoDBConfiguration.java

When configuring BaSyx application using Mongo DB backend, always put the prefix "basyxmongodb_" at begin of an environment variable.

Configuration using Environment variables
Variable name Written as an environment variable Example
dbname basyxmongodb_dbname basyxmongodb_dbname=admin
dbconnectionstring basyxdocker_dbconnectionstring basyxdocker_dbconnectionstring=mongodb://127.0.0.1:27017/
dbcollectionRegistry basyxdocker_dbcollectioregistry basyxdocker_dbcollectioregistry=basyxregistry
dbcollectionAAS basyxdocker_dbcollectionaas basyxdocker_dbcollectionaas=basyxaas
dbcollectionSubmodels basyxdocker_dbcollectionsubmodels basyxdocker_dbcollectionsubmodels=basyxsubmodel


BaSyxMqttConfiguration.java

When configuring BaSyx MQTT, always put the prefix "basyxmqtt_" at begin of an environment variable.

Configuration using Environment variables
Variable name Written as an environment variable Example
user basyxmqtt_user basyxmqtt_user=
pass basyxmqtt_pass basyxmqtt_pass=
server basyxmqtt_server basyxmqtt_server=http://localhost:1883/
qos basyxmqtt_qos basyxmqtt_qos=1

BaSyxSQLConfiguration.java

When configuring BaSyx SQL, always put the prefix "basyxsql_" at begin of an environment variable.

Configuration using Environment variables
Variable name Written as an environment variable Example
dbuser basyxsql_dbuser basyxsql_dbuser=postgres
pass basyxmqtt_pass basyxmqtt_pass=
server basyxmqtt_server basyxmqtt_server=http://localhost:1883/
qos basyxmqtt_qos basyxmqtt_qos=1

Back to the top