Configuration

Initial configuration (setenv)

The initial settings for CLI console is provided by its configuration file setenv located in $JLUPIN_HOME/server/start/control/configuration/ directory.

It contains the following parameters:

Parameter Description
JAVA_HOME If you want to set JAVA_HOME individually for the console (by default it's taken from JLupin Platform setenv) you can to it here.
JAVA_OPTS Java options for the console, it shouldn't be changes without prior consulting with the support service.
CONFIGURATION_FILE The alternative location of control.yml configuration file. By default it is searched in $JLUPIN_HOME/platform/start/control/configuration.
HISTORY_FILE The alternative location of history file, where executed commands are stored and can searched using arrows or ctrl+r.By default the file in located in $JLUPIN_HOME/platform/start/control/data.

Runtime configuration (control.yml)

The runtime settings for CLI console is provided by its configuration file control.yml located in $JLUPIN_HOME/server/start/control/configuration/ directory.

The default configuration file is provided below:

verboseMode: true
echoMode: false
interactiveMode: true
logging:
  configuration: control/configuration/control.log4j2.xml
script:
  directory: control/script
temp:
  directory: control/temp
repository:
  default: local
  definition:
    local:
      type: local
      authType: none
      path: ../upload
#    remote:
#      type: remote_http
#      authType: none
#      url: http://localhost/
#      connectionTimeout: 1000
#      readTimeout: 60000
#    remoteWithAuth:
#      type: remote_http
#      authType: basic
#      url: http://localhost/
#      username: user
#      password: password
#      connectionTimeout: 1000
#      readTimeout: 60000
ssl:
  client:
    certificate: control/ssl/client/clientX509Certificate.crt
    privateKey: control/ssl/client/clientPrivateKey.pk
  server:
    certificate: control/ssl/server/serverX509Certificate.crt
dataPrinter:
  display: plain_text
  printHeaders: true
  separator: ','
events:
  defaultListSize: 10
  shortDescriptionMaxSize: 50
node:
  isSSL:             true
  address:           127.0.0.1
  transmissionPort:  9096
  connectionTimeout: 1000
  readTimeout:       300000
peer:
  jlrmcPort:         9090
  queuePort:         9095
  transmissionPort:  9096
  informationPort:   9097
  connectionTimeout: 1000
  readTimeout:       300000

Each section and provided within parameters are described as follows.

General parameters

The appropriate part of the configuration file:

verboseMode: true
echoMode: false
interactiveMode: true
logging:
  configuration: control/configuration/control.log4j2.xml
script:
  directory: control/script
temp:
  directory: control/temp
[...]

Description:

Parameter Description
verboseMode The default verbose mode.
echoMode The default echo mode.
interactiveMode The default settings interactive mode. If the interactive mode is turned on (true), you will be asked to continue executed commands if its scope is presumed. For example if you type microservice restart (without microservice name), CLI console will assume that you want to restart ALL available on the node microservices, if interactive mode is turned on, the console will if you really want to do that.
logging -> configuration The location of CLI console logger configuration file, you can change there the log level, log file and directory names etc. It's a standard log4j2 configuration file.
script -> directory The default directory of recorded scripts using script record command. Read more.
temp -> directory The default directory, that CLI console uses for temporary files.

Section 'repository'

One of the most important function of CLI console is to deploy new microservices (or newer version of existing ones). You can defined different repositories, where deployment units of microservices (ZIP files) are located. JLupin CLI console supports the following types of repositories:

  • local, where files are located in the given directory, on local file system, on the node where CLI console is installed.
  • remote_http, where files are located on the remote node and are accessible by CLI console through HTTP(S) protocol (optionally using basic authentication)

Each repository is described by its name in definition subsection:

repository:
  default: <repo_name_2>
  definition:
    <repo_name_1>:
      type: local
      [...]
    <repo_name_2>:
      type: local
      [...]
    <repo_name_3>:
      type: remote_http
      [...]

The default repository is defined through default parameter (it takes repository name as its value), as presented above. Repositories are crucial when you use microservice deploy and microservice upload commands to manage microservices lifecycle.

The set of parameters inside repository definition depends on the type of repository:

local:

repository:
  default: sample_local # or any other defined repository
  definition:
    sample_local:
      type: local
      authType: none
      path: ../upload
      [...]

remote_http (without authentication):

repository:
  default: sample_remote # or any other defined repository
  definition:
    sample_remote:
      type: remote_http
      authType: none
      url: http://localhost/
      connectionTimeout: 1000
      readTimeout: 60000

remote_http (with authentication):

repository:
  default: sample_remote_auth
  definition:
    sample_remote_auth:
      type: remote_http
      authType: basic
      url: http://localhost/
      username: user
      password: password
      connectionTimeout: 1000
      readTimeout: 60000
      [...]

Descript of each parameter is provided below:

Parameter Description
type The type of the repository (local or remote_http).
authType The type of the authentication (none means no authentication, basic means http basic authentication).
url The base URL of the repository (it may contain subdirectories).
username The username for http basic authentication.
password The password for http basic authentication.
connectionTimeout The maximum amount of time, expressed in milliseconds, for TCP connection establishment to the repository.
readTimeout The maximum amount of time, expressed in milliseconds, of getting response from the repository.

Section 'ssl'

The section contains parameters describing secured connection between CLI Console and JLupin Platform.

The appropriate part of the configuration file:

[...]
ssl:
  client:
    certificate: control/ssl/client/clientX509Certificate.crt
    privateKey: control/ssl/client/clientPrivateKey.pk
  server:
    certificate: control/ssl/server/serverX509Certificate.crt
[...]

Description:

Parameter Description
client -> certificate The client certificate, that is used by the console in two-ways authentication procedure. This certificate should be located in the analogous JLupin Platform directory to make the instance of the console trusted.
client -> privateKey The client private key, that is used by the console in two-ways authentication procedure.
server -> certificate The server certificate, that is used by the console in two-ways authentication procedure.

Section 'dataPrinter'

The section contains the default parameters of how commands' output is formatted.

The appropriate part of the configuration file:

[...]
dataPrinter:
  display: plain_text
  printHeaders: true
  separator: ','
[...]

Description:

Parameter Description
printHeaders Whether the headers are to be displayed.
display Default format of output (avaiable options: plain_text,csv,json,xml).
separator The separator that is be used if csv display is chosen.

Section 'events'

The section contains the default parameters of how event log is formatted.

The appropriate part of the configuration file:

[...]
events:
  defaultListSize: 10
  shortDescriptionMaxSize: 50
[...]

Description:

Parameter Description
events -> defaultListSize The default list size of events that is displayed.
events -> shortDescriptionMaxSize The default size of event's description in the events list.

Section 'node'

The section contains the default connection parameters for connections between the console of managed nodes. This parameters can be overwritten by arguments provided while the control.sh / control.cmd is executed.

The appropriate part of the configuration file:

[...]
node:
  isSSL:             true
  address:           127.0.0.1
  transmissionPort:  9096
  connectionTimeout: 1000
  readTimeout:       300000
[...]

Description:

Parameter Description
isSSL Whether the SSL sockets are to be used in the process of connecting to JLupin node.
address The default IP address that is used in the process of connecting to JLupin node.
transmissionPort The default TRANSMISSION port that is used in the process of connecting to JLupin node.
connectionTimeout The timeout of establishing connection to the JLupin node.
readTimeout The timeout of receiving response from the JLupin node.

Section 'peer'

The section contains the default parameters of a new peer node, which is added through node peer add command.

The appropriate part of the configuration file:

[...]
peer:
  jlrmcPort:         9090
  queuePort:         9095
  transmissionPort:  9096
  informationPort:   9097
  connectionTimeout: 1000
  readTimeout:       300000

Description:

Parameter Description
jlrmcPort The default JLRMC port of a peer node
queuePort The default QUEUE port of a peer node
transmissionPort The default TRANSMISSION port of a peer node
informationPort The default INFORMATION port of a peer node
connectionTimeout The timeout of establishing connection to a peer node.
readTimeout The timeout of receiving response from a peer node.