Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "BaSyx / Documentation / Components / Environment Variables"

(Created page with "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 paramete...")
 
Line 1: Line 1:
 
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.
 
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/ '''.
 
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 two general rules when using environment variables:
+
There are general rules when using environment variables:
 
* Once environment variables are set, then the settings in the .properties file will be overwritten.
 
* 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).
+
* 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 ===
 +
contextpath basyxcontext_contextpath
 +
{| class="wikitable"
 +
|-
 +
! colspan="3" | Configuration using Environment variables
 +
|-
 +
! Variable name
 +
! How it is written as an environment variable
 +
! Example
 +
|-
 +
| contextpath
 +
| basyxcontext_contextpath
 +
| basyxcontext_contextpath="localhost:8080/basyx"
 +
|-

Revision as of 10:58, 7 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

contextpath basyxcontext_contextpath

Configuration using Environment variables
Variable name How it is written as an environment variable Example
contextpath basyxcontext_contextpath basyxcontext_contextpath="localhost:8080/basyx"

Back to the top