Jump to: navigation, search

Configuring GWS Platform Service Settings

Environment Variables

Name Mandatory Default Value Description
GWS_COMMON_AUTH_SECRET Yes Specifies the secret that should be used for authentication purpose for inter-service communication. For more details, please refer to "serverSettings.auth.secret" in GWS API Service configuration options and/or the OCX configuration option "secret".
GWS_COMMON_LOCATION No / Specifies the region or datacenter name that service should serve for. For more details, please refer to "serverSetting.nodePath" in GWS API Service configuration options.
GWS_DATABASE_UPDATE_POLLING_TIMEOUT No 1000 Specifies in milliseconds how often service should check for changes in ConfigDB.
GWS_ENV_CONFIG_FILE No ./environment.yaml Specifies a location of environment.yaml file that should be used for service initialization.
GWS_EXPORTER_OTLP_TRACES_ENDPOINT No http://localhost:4317 Specifies OpenTelemetry address in URL format that should be used for exporting traces.
GWS_LOGGING_ENABLE_COMPRESSION No true Specifies if compression for stored log files should be applied.
GWS_LOGGING_INTERVAL No 3600 Specifies in seconds how often log file rotation should be performed.
GWS_LOGGING_MAX_FILE_COUNT No Specifies the max number of log files that should be kept. By default, service doesn't remove any log file.
GWS_LOGGING_MAX_FILE_SIZE No Specifies the max log file size when log rotation should be performed in addition to configured interval (GWS_LOGGING_INTERVAL). By default, log rotation is done by timer only.
GWS_LOGGING_MAX_HISTORY No Specifies in seconds how long the service's log files should be kept. By default, they are kept forever.
GWS_LOGGING_PATH No /var/log/gws-service-platform If specified, enables writing logs into a file instead of STDOUT/STDERR (in such case, logs are accessible through JournalD). Specifies the path where logs should be stored.
GWS_LOGGING_FILE No gws-service-platform.log Specifies the log file name.
GWS_LOG_LEVEL No INFO Specifies service logging level. Allowed values: [ERROR, WARN, INFO, DEBUG, TRACE]
GWS_SERVER_HOST No 0.0.0.0 Specifies the host name or IP address of network interface that should be used by service to open API listening port. Default value "0.0.0.0" that means open listing port on all network interfaces.
GWS_SERVER_PORT No 8092 Specifies the port number that should be used as API listening port.
GWS_DATABASE_DATA_SOURCE_NAME No MSSQL: MicrosoftODBC-18

Oracle: OracleODBC-23

Specifies the custom DSN that should be used by service instead of default.
GWS_DATABASE_USE_TNSNAMES No false When set true, the database parameter from environment.yaml is treated as the Oracle SID (GWS Platform service supports Oracle SIDs from tnsnames.ora file) and host/port are not used.

environment.yaml file

Note: password field values in environment.yaml can be encrypted. To encrypt, pass a command line argument following --encode parameter. Example:

./gws-service-platform --encode "testPa33W0rd"

FE9EDB4BF51ED570C18C2CC2F530468D

General

appName: Cloud # Specifies the application name from ConfigServer that GWS should use
connectionProtocol: addp # Specifies if ADDP protocol should be used along with ConfigServer connection
localTimeout: [ToBeChanged: timeout] # Specifies a local timeout for ADDP protocol
password: [ToBeChanged: password] # Specifies the account password that GWS should use for connecting to ConfigServer
remoteTimeout: [ToBeChanged: timeout] # Specifies a remote timeout for ADDP protocol
tenant: Environment # Specifies default environment in ConfigServer (reserved for future usage)
tlsEnabled: [ToBeChanged: true or false] # Indicates if TLS should be used while establishing connection to ConfigServer
traceMode: [ToBeChanged: CFGTMBoth/CFGTMLocal/CFGTMRemote/CFGTMNone] # Specifies what mode should be used for ADDP protocol
username: [ToBeChanged: username] # Specifies the account name that GWS should use for connecting to ConfigServer

ConfigServer

locations: [ToBeChanged: /<REGION>] # Specifies the name of datacenter for which configuration is set.
initDb: false # Indicates if database schema should be provisioned (reserved for future usage)
primaryAddress: [ToBeChanged: ConfigServer/CSProxy address]
primaryPort: [ToBeChanged: ConfigServer/CSProxy port]
readFromDb: true # Indicates if read requests should be handled with data from database
readOnly: true # Indicates if connection to ConfigServer shouldn't be used for write operations (reserved for future usage)

Database

database: [ToBeChanged: database] # Specifies the name of ConfigServer's database or ServiceName for Oracle DB
host: [ToBeChanged: host] # Specifies the address of ConfigServer's database
password: [ToBeChanged: password] # Specifies database account password
poolSize: 3 # Specifies the size of database connections pool
port: [ToBeChanged: port] # Specifies the port of ConfigServer's database
type: [ToBeChanged: "postgres" | "mssql" | "oracle"] # Specifies the ConfigServer's database type
username: [ToBeChanged: username] # Specifies database account name

Sample File

appName: Cloud
configServers:
  - db:
      database: orcldb.test.com
      host: db.dc1.com
      password: gws
      poolSize: 5
      port: 1521
      type: oracle
      username: gws_test
    initDb: false
    locations: "/DC1"
    primaryAddress: masterCS.com
    primaryPort: 8888
    readFromDb: true
    readOnly: false
  - initDb: false
    locations: "/DC1"
    primaryAddress: ProxyCS.dc1.com
    primaryPort: 8888
    readFromDb: false
    readOnly: true
  - db:
      database: orcldb-replica.test.com
      host: db.dc2.com
      password: gws
      poolSize: 5
      port: 1521
      type: oracle
      username: gws_test
    initDb: false
    locations: "/DC2"
    primaryAddress: ProxyCS.dc2.com
    primaryPort: 8889
    readFromDb: false
    readOnly: true
connectionProtocol: addp
localTimeout: 5
password: pass_test
remoteTimeout: 7
tenant: Environment
tlsEnabled: true
traceMode: CFGTMBoth
username: gws_test
This page was last edited on November 11, 2024, at 18:42.
Comments or questions about this documentation? Contact us for support!