JLupin Platform Console (control)

How to start ?

JLupin Platform is provided with local administration console, which allows to managed single node with its microservices. To run local console go to $JLUPIN_HOME/start and execute the following tools:

  • On Windows: control.cmd
  • On Linux: control.sh

to run the console in the interactive mode. Just write help and press enter to get the list of available commands and start manage your JLupin.

Interactive mode

The interactive mode allows you to interact with JLupin through available commands. It has some features that should (we hope, it does) improve your experience during administrative tasks:

  • auto-completion - use tab key to complete commands and its arguments during typing (like in a standard shell).
  • output redirection - you can save command output to file like in a linux shell. To do so just type > [filename] at the end of your command. Or you can send output of one command to second one, ex. using grep command, like in the following point.
  • filtering - use grep command after pipe to filter the output of any other command. For example microservice list | grep "myMicro"
  • scripts - do you often run same group of tasks? Create a script file and then use script run command to execute it. Script file is nothing more than standard console commands separated with new lines (\n).
  • history -if you want to repeat previous command just press up key or ctrl+r to search through history.

If you like the BASH environment, the JLupin console will certainly suit your needs.

Batch mode

In batch mode all presented command, including filtering, output redirection and scripting are also available. In this mode a command with all its arguments is an argument of control.sh / control.cmd tools. The example of usage:

control.sh microserice list
control.sh node runtime | grep NODE_1
control.sh show RUNTIME:servicePort myMicro

Configuration

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

The default configuration file is provided below:

logLevel: info
verboseMode: true
echoMode: false
interactiveMode: true
node:
  isSSL:             true
  transmissionPort:  9096
  connectionTimeout: 1000
  readTimeout:       300000
peer:
  jlrmcPort:         9090
  queuePort:         9095
  transmissionPort:  9096
  informationPort:   9097
  connectionTimeout: 1000
  readTimeout:       300000
dataPrinter:
  printHeaders: true
  display: standard
  separator: ','
events:
  defaultListSize: 10
  shortDescriptionMaxSize: 50

Each parameter is described in the following table:

Parameter Description
logLevel The default log level.
verboseMode The default verbose mode.
echoMode The default echo mode.
interactiveMode The default interactive mode.
node The section contains the default connection parameters for console
node -> isSSL Whether the SSL sockets are to be used in the process of connecting to the JLupin node.
node -> transmissionPort The default TRANSMISSION port that is used in the process of connecting to the JLupin node.
node -> connectionTimeout The timeout of establishing connection to the JLupin node.
node -> readTimeout The timeout of receiving response from the JLupin node.
peer The section contains the default parameters of a peer node
peer -> jlrmcPort The default JLRMC port of a peer node
peer -> queuePort The default QUEUE port of a peer node
peer -> transmissionPort The default TRANSMISSION port of a peer node
peer -> informationPort The default INFORMATION port of a peer node
peer -> connectionTimeout The timeout of establishing connection to a peer node.
peer -> readTimeout The timeout of receiving response from a peer node.
dataPrinter The section contains the default parameters of how commands' output is formatted.
dataPrinter -> printHeaders Whether the headers are to be displayed.
dataPrinter -> display Default format of output.
dataPrinter -> separator The separator that is be used if separated display is chosen.
events The section contains the default parameters of how event log is formatted.
events -> defaultListSize The default list size of events that is displayed.
events -> shortDescriptionMaxSize The default size of event's description in the events list.

Commands

Generic and supporting

help

Syntax: help [<command>]

Shows help for all or given (<command>) command.

Examples:

> help
> help microservice

show

Syntax: show [all|brief|<parameter>] [<microservice_name>]

List attributes (all, brief or specified by <parameter>) of the node or the microservice identified by <microservice_name>.

Argument Information
all|brief|<parameter> Show value of all (all), selected (brief) attributes or specific parameter (<parameter>).
<microservice_name> If this parameter is given, then the command applies to specific microservice, otherwise it applies to the node.

Each component in JLupin Platform environment are represented in its console as an object with set of parameters, which are grouped in the following groups:

  • ATTRIBUTES - the list of object attributes, which describes it in the scope of console.
  • RUNTIME - set of parameters that show the current state of the object.
  • CONFIGURATION - set of parameters from microservice's or node's configuration (collected in YAML files).
  • JAVA_PROPERTIES - the current list of java properties provided by the platform and user (ex. through additional configuration) of the node or the given microservice.

Is case if CONFIGURATION the further sections and associated sets of parameters are provided in tree model, where name of the sections is a key to deeper section or a leaf.

Examples:

The readTimeout parameter of JLRMC logical server from Main Server configuration file:

ZONE:
  name: default
MAIN_SERVER:
  name: NODE_1
SERVERS:
  JLRMC: #JLupin Remote Method Call Fast Protocol
    port: 9090
    readTimeout: 480000
    waitForFinishExecuteAllRequests: true
[...]

is represented as CONFIGURATION:SERVERS:JLRMC:port and its value can be displayed in this way:

> show CONFIGURATION:SERVERS:JLRMC:port

If you want to access microservice configuration provide the proper parameter path and name of a microservice.

> show CONFIGURATION:PROPERTIES:jvmOptions1 myMicro

If you want to display all sections and parameters on specific level of configuration, use *, like in the following example:

> show CONFIGURATION:PROPERTIES:* myMicro
> show RUNTIME:*

set

Syntax: set <parameter> to <value> [<microservice_name>]

Set <parameter> to <value> for the node or the microservice identified by <microservice_name>.

Argument Information
<parameter> Parameter name.
<value> Value.
<microservice_name> If this parameter is given, then the command applies to specific microservice, otherwise it applies to the node.

Examples:

  • Increasing number of threads for JLRMC interface of the node to 256:
> set CONFIGURATION:SERVERS:JLRMC:threadPoolSize to 256
  • Changing JAVA OPTS for myMicro:
> set CONFIGURATION:PROPERTIES:jvmOptions1 to "-Xms64M -Xmx192M" myMicro

All changes have to be activated through node or microservice restart.

grep

Syntax: grep <regexp>

Filter results.

Argument Information
<regexp> Regular expression to check against lines.

Examples:

> microservice list | grep mic2

script run

Syntax: script run <file_path> [force]

Run a script from file (<file_path>), optionally in force mode.

Argument Information
<file_path> Path to the script file. The final path is relative to the default path ($ JLUPIN_HOME / server / start).
[force] If the force switch is given, execution of the entire set of commands is not stopped, even if one of the commands fails - all commands are executed from the script regardless of the state of each operation.

Examples (you can use any extension of the script file):

> script run my_script.jls

verbose

Syntax: verbose [on|off]

Change verbose mode (on|off) or show current state.

Argument Information
on|off Enable/disable verbose mode.

Examples:

  • To turn verbose mode off:
> verbose off
  • To turn verbose mode on:
> verbose on

interactive

syntax: interactive [on|off]

Change interactive mode (on/off) or show current state.

If the interactive mode is enabled all commands that assume their scope are preceded by a control question.

For example, if you have three microservices running on the node:

> microservice list
Zone    Node   Microservice           Type    #Services
default NODE_1 exchange-rates         native  1
default NODE_1 exchange               servlet 2
default NODE_1 currency-converter-chf native  1

The following command:

> microservice restart

is going to restart all your microservices (if the name is not given, the console assumes all).

If the interactive mode is enabled the above command triggers a control question:

Are you sure you want to restart all microservices on the node? (Y/N):

If it is disabled - the console proceed action with no other interactions.

If you provide the exact scope of the command (no assuming is performed), even if the interactive mode is enabled, a control question is not asked.

For example:

> microservice restart exchange-rates

will restart exchange-rates microservice immediately.

> microservice restart *

will restart all microservices running on the node immediately.

Argument Information
on|off Enable/disable interactive mode.

Examples:

> interactive on

display

Syntax: display [displayType]

Change display type to: * standard where data rows and headers are formatted as regular table * separated where date rows and headers are separated with configured separator in console configuration file

Examples:

  • Show the current setting and change to separated:
> display
Display: standard

> microservice list
Zone    Node   Microservice           Type    #Services
default NODE_1 exchange-rates         native  1
default NODE_1 exchange               servlet 2
default NODE_1 currency-converter-chf native  1

> display separated
Display mode: separated

> microservice list
Zone,Node,Microservice,Type,#Services
default,NODE_1,exchange-rates,native,1
default,NODE_1,exchange,servlet,2
default,NODE_1,currency-converter-chf,native,1

echo

Syntax: echo [on|off]

Change echo mode (on|off) or show current state. When echo mode is on the typed command is displayed just after command execution.

It's useful feature when commands are run as JCC script through 'script run', where in aggregated output the command and its results is displayed in proper order.

Examples:

> echo
Echo mode: off
> echo on
Echo mode: on
> microservice list
microservice list
Zone    Node   Microservice           Type    #Services
default NODE_1 exchange-rates         native  1
default NODE_1 exchange               servlet 2
default NODE_1 currency-converter-chf native  1

Syntax: header [on|off]

It determines if headers should be displayed (on) or not (off).

Examples:

> header
Header mode: on

> microservice list
Zone    Node   Microservice           Type    #Services
default NODE_1 exchange-rates         native  1
default NODE_1 exchange               servlet 2
default NODE_1 currency-converter-chf native  1

> header off
Header mode: off

> microservice list
default NODE_1 exchange-rates         native  1
default NODE_1 exchange               servlet 2
default NODE_1 currency-converter-chf native  1

version

Syntax: version

Display console version.

Examples:

> version
ProductName                      CodeName Version     CommitNo
JLupin Next Server Local Console SELEUCIA 1.4.1.0-RC4 81f4863

events log

Syntax: events log

Display the list of events handled by JLupin.

Examples:

> events list
Zone    Node   EventId          EventTime           EventType                                         EventDesc
default NODE_2 8766456814373106 2018-03-23 00:15:56 START_MICROSERVICES_STOPPED_OUTSIDE_JLUPIN_BEFORE microservices ready to start due to being stopped ...
default NODE_2 8766474304690068 2018-03-23 00:16:14 START_MICROSERVICES_STOPPED_OUTSIDE_JLUPIN_AFTER  microservices:[exchange-rates] statuses after star...

events details

Syntax: events details <event_id>

Display details of the given event identified by <event_id>.

Examples:

> events details 8766474304690068
Node:      NODE_2
EventId:   8766474304690068
EventTime: 2018-03-23 00:16:14
EventType: START_MICROSERVICES_STOPPED_OUTSIDE_JLUPIN_AFTER
EventDesc: microservices:[exchange-rates] statuses after started due to being stopped outside jlupin:[exchange-rates], stop summary:JLupinOperationOnMicroserviceSummary{jLupinOperationOnMicroserviceStatusDetailList=[JLupinOperationOnMicroserviceStatusDetail{executedCorrectly=true, throwableAsString='null', errorMessage='null', name='exchange-rates'}], isError=false, isEmpty=false, throwableAsString='null', emptyReason='null'}, start summary:JLupinOperationOnMicroserviceSummary{jLupinOperationOnMicroserviceStatusDetailList=[JLupinOperationOnMicroserviceStatusDetail{executedCorrectly=true, throwableAsString='null', errorMessage='null', name='exchange-rates'}], isError=false, isEmpty=false, throwableAsString='null', emptyReason='null'}

lock release

Syntax: lock release

Release all locks handled by the current node.

Examples:

> lock release
all locks was released
Locks released: NODE_2

quit

Syntax: quit

Quit console.

Examples:

> quit

exit

Syntax: exit

Quit console.

Examples:

> exit

Node

node activate

Syntax: node activate

Activate node, which means that its service repository is actively updated by service discovery process and services are available for their consumers in the environment.

Examples:

> node activate
Node activated: NODE_1  
> microservice repo
Zone    Node   Microservice           LoadBalancer       Entry                         CommPorts           ConnTimeout ReadTimeout
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000

node deactivate

Syntax: node deactivate [<zone>]

Deactivate node, which means that its service repository is empty regardless the operational state of microservices and services are not available to potential consumers in the environment. If the force option is used, additionally all data logial servers are shutdown and sokcets are closed. Use force carefully because it ma cause errors for requests that are processed while node deactivation with force is performed.

Examples:

> microservice repo
Zone    Node   Microservice           LoadBalancer       Entry                         CommPorts           ConnTimeout ReadTimeout
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
> node deactivate
Node deactivated: NODE_1
> microservice repo
> microservice repo
> node deactivate force
Node deactivated: NODE_1
> microservice repo
> node activate
Node activated: NODE_1
> microservice repo
Zone    Node   Microservice           LoadBalancer       Entry                         CommPorts           ConnTimeout ReadTimeout
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 currency-converter-chf LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange               LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange-rates@NODE_1         9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 exchange@NODE_1               9090,9095,9096,9097 2000        300000
default NODE_1 exchange-rates         LOAD_BALANCER_NO:1 currency-converter-chf@NODE_1 9090,9095,9096,9097 2000        300000

node peers

Syntax: node peers

Display node peers - other JLupin nodes to which the balancers of the current node and its microservices are directed and service discovery is performed. The list of node peers is the list of JLupin nodes with which the microservices on the current node can communicate via built-in balancers.

The list of node peers are directly taken from NODE_PEERS section from Main Server configuration file.

Examples:

Entries in main.yml on NODE_2:

NODE_PEERS:
  NODE_2:
    ip: 127.0.0.1
    jlrmcPort: 9190
    queuePort: 9195
    transmissionPort: 9196
    informationPort: 9197
  NODE_1:
    queuePort: 9095
    jlrmcPort: 9090
    informationPort: 9097
    ip: 10.2.2.31
    transmissionPort: 9096

The list available in console (on NODE_2):

> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_1 10.2.2.31 9090,9095,9096,9097
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197

node peer add

Syntax: node peer add <peer_name> <peer_IP> [<jlrmcPort> <queuePort> <transmissionPort> <informationPort>]

Add a node peer identified in the network by IP address <peer_IP> (or FQDN if resolvable by the current node) with name <peer_name> to the current node's configuration with default ports from configuration file (control.yml) or explicitly provided (<jlrmcPort> <queuePort> <transmissionPort> <informationPort>).

The command modifies NODE_PEERS section in Main Server configuration file.

Argument Information
<peer_name> Name of a peer node to add
<peer_IP> IP address of a peer node.
[<jlrmcPort>] Optional. JLRMC port of a peer node.
[<queuePort>] Optional. QUEUE port of a peer node.
[<transmissionPort>] Optional. TRANSMISSION port of a peer node.
[<informationPort>] Optional. INFORMATION port of a peer node.

Examples:

  • Adding peer NODE_1 to NODE_2, using standard ports
> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197

> node peer add NODE_1 10.2.2.31
Peer added: NODE_1

> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_1 10.2.2.31 9090,9095,9096,9097
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197
  • Adding peer NODE_2 to NODE_1, using custom ports
> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default t-app1  127.0.0.1    default t-app1 127.0.0.1 9090,9095,9096,9097

> node peer add NODE_2 10.2.2.32 9190 9195 9196 9197
Peer added: NODE_2

> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_1  127.0.0.1    default NODE_1 127.0.0.1 9090,9095,9096,9097
default NODE_1  127.0.0.1    default NODE_2 10.2.2.32 9190,9195,9196,9197

node peer remove

Syntax: node peer remove <peer_name>

Remove a peer node (<peer_name>) from the current node's configuration.

The command modifies NODE_PEERS section in Main Server configuration file.

Argument Information
<peer_name> Name of a peer node to remove.

Examples:

  • Removing NODE_1 peer from NODE_2:
> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_1 10.2.2.31 9090,9095,9096,9097
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197

> node peer remove NODE_1
Peer removed: NODE_1

> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197

node repo

Syntax: node repo

Show entries from service repository - the list of microservices that this particular node and all its microservices are able to connect and send a request. The list of remote microservices is available if additional nodes are provided in NODE_PEERS section in Main Server configuration.

Examples:

In this case we have two nodes: NODE_1 and NODE_2, on which the same microservice is running: exchange. We changed NODE_PEERS list on NODE_2 by adding NODE_1, look at the difference between outputs of node peers and node repo commands on each node:

  • NODE_PEERS @ NODE_1
> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default t-app1  127.0.0.1    default t-app1 127.0.0.1 9090,9095,9096,9097
  • node repo @ NODE_2
> node repo
Zone    Node   Entry              CommPorts   ConnTimeout ReadTimeout
default t-app1 exchange@localhost 20000,20002 1000        30000
  • NODE_PEERS @ NODE_2
> node peers
SrcZone SrcNode SrcIPAddress Zone    Node   IPAddress CommPorts
default NODE_2  127.0.0.1    default NODE_1 10.2.2.31 9090,9095,9096,9097
default NODE_2  127.0.0.1    default NODE_2 127.0.0.1 9190,9195,9196,9197
  • node repo @ NODE_2
> node repo
Zone    Node   Entry              CommPorts           ConnTimeout ReadTimeout
default NODE_2 exchange@localhost 30000,30002         1000        30000
default NODE_2 exchange@NODE_1    9090,9095,9096,9097 1000        90000

NODE_2 "sees" microserices running on NODE_1.

node runtime

Syntax: node runtime [threads|memory|cpu|os]

Show the runtime parameter of the current node. If no arguments are provided the basic information if provided.

Argument Information
[threads] Detailed information about thread pools associated with logical servers.
[memory] Detailed information about JVM memory statistics of Main Server.
[cpu] Information about CPU usage of Main Server.
[os] Basic information of operating system - overall memory and CPU usage and.

Examples:

  • Basic information
> node runtime
Zone    Node   Status    %MemUsageMax %CpuUsage
default NODE_2 CONNECTED 54.1         1.0

  • Threads statistics
> node runtime threads
Zone    Node   Status    Server           Type             %ThrUsage #ThrFree
default NODE_2 CONNECTED JLRMC            JLRMC            0.0       128
default NODE_2 CONNECTED ELASTIC_HTTP     ELASTIC_HTTP     0.0       128
default NODE_2 CONNECTED QUEUE            QUEUE            0.0       128
default NODE_2 CONNECTED TRANSMISSION     TRANSMISSION     1.6       63
default NODE_2 CONNECTED INFORMATION      INFORMATION      0.0       64
default NODE_2 CONNECTED INFORMATION_HTTP INFORMATION_HTTP 0.0       64
  • Memory statistics
> node runtime memory
Zone    Node   Status    %MemUsageTotal %MemUsageMax #MemFree #MemUsed #MemTotal #MemMax
default NODE_2 CONNECTED 50.0           46.0         0.10 GB  0.10 GB  0.21 GB   0.22 GB
  • OS statistics
> node runtime os
Zone    Node   Status    %OsCpuUsage %OsMemUsage #OsMemFree
default NODE_2 CONNECTED 4.3         86.3        0.25 GB

node servers list

Syntax: node servers list

Show the list of logical servers with its basic configuration.

Examples:

> node servers list
Zone    Node   Status    Server           Type             Port #Threads
default NODE_2 CONNECTED JLRMC            JLRMC            9190 128
default NODE_2 CONNECTED ELASTIC_HTTP     ELASTIC_HTTP     8182 128
default NODE_2 CONNECTED QUEUE            QUEUE            9195 128
default NODE_2 CONNECTED TRANSMISSION     TRANSMISSION     9196 64
default NODE_2 CONNECTED INFORMATION      INFORMATION      9197 64
default NODE_2 CONNECTED INFORMATION_HTTP INFORMATION_HTTP 9198 64

node shutdown

Syntax: node shutdown

Shutdown the Main Server and all microservices (including technical ones) on the current. The shutdown is performed in graceful mode, it waits until all requests are processed.

Examples:

> node shutdown

node terminate

Syntax: node terminate

Terminate the Main Server and all microservices (including technical ones) on the current.

Examples:

> node terminate

node version

Syntax: node version

Show version of the current node.

Examples:

> node version
Zone    Node   ProductName                           CodeName Version        CommitNo
default NODE_2 JLupin Next Server Enterprise Edition SELEUCIA 1.4.1.0-RC4-ee e00e2ce6

Microservice

microservice destroy

Syntax: microservice destroy [<microservice>]

Destroy all or given (<microservice>) microservice located on the current node. To perform this action a microservice has to be stopped.

Argument Information
[<microservice>] Name of microservice to destroy.

Examples:

  • Destroy all microservices (if interactive mode is enabled a control question is asked)
> microservice destory
  • Destroy all microservice (no question is asked... be careful)
> microservice destory *
  • Destroy specific microservice
> microservice destory myMicro

microservice details

Syntax: microservice details [<microservice>]

Show details of the given (<microservice>) microservice on the current node.

Argument Information
[<microservice>] Name of microservice to show details.

Examples:

> microservice details
Zone    Node   Microservice           Service
default NODE_2 currency-converter-chf currencyConverterService
default NODE_2 exchange               GET|/
default NODE_2 exchange               POST|/convert

microservice double restart

Syntax: microservice double restart [<microservice>]

Restart all or the given (<microservice>) microservice twice.

Argument Information
[<microservice>] Name of microservice to restart twice.

Examples:

> microservice double restart currency-converter-chf
currency-converter-chf@NODE_2: Microservice restarted correctly.

microservice list

Syntax: microservice list

List microservices on the current node.

Examples:

> microservice list
Zone    Node   Microservice           Type    #Services
default NODE_2 exchange               servlet 2
default NODE_2 currency-converter-chf native  1

microservice repo

Syntax: microservice repo [<microservice>]

Show microservice's load balancer's service repository for all or given (<microservice>) microservice.

Examples:

> microservice repo
Zone    Node   Microservice           LoadBalancer       Entry                         CommPorts           ConnTimeout ReadTimeout
default NODE_2 currency-converter-chf LOAD_BALANCER_NO:1 exchange@NODE_2               9090,9095,9096,9097 2000        300000
default NODE_2 currency-converter-chf LOAD_BALANCER_NO:1 currency-converter-chf@NODE_2 9090,9095,9096,9097 2000        300000
default NODE_2 exchange               LOAD_BALANCER_NO:1 exchange@NODE_2               9090,9095,9096,9097 2000        300000
default NODE_2 exchange               LOAD_BALANCER_NO:1 currency-converter-chf@NODE_2 9090,9095,9096,9097 2000        300000

microservice restart

Syntax: microservice restart [<microservice>]

Restart all or given (<microservice>) microservice on the current node.

Argument Information
[<microservice>] Name of microservice to restart.

Examples:

  • Restart all microservices (if interactive mode is enabled a control question is asked)
> microservice restart
  • Restart all microservice (no question is asked... be careful... or never mind, the zero downtime deployment mechanism keeps services always online)
> microservice restart *
  • Restart specific microservice
> microservice restart myMicro

microservice runtime

Syntax: microservice runtime [threads|memory|cpu|stats] [<microservice>]

It shows runtime parameters of all or the given microservice (<microservice>).

Argument Information
[threads] Detailed information about thread pools.
[memory] Detailed information about all of the given <microservice>.
[cpu] Information about CPU usage of all of the given <microservice>.
[stats] Basic statistics of all or the given <microservice>.
[<microservice>] The name of the microservice to which the command is applied

Examples:

  • Basic information of all microservices
> microservice runtime
Zone    Node   Microservice           Status  %MemUsageMax %CpuUsage
default NODE_2 exchange               RUNNING 52.7         0.1
default NODE_2 currency-converter-chf RUNNING 66.7         0.1
  • Threads statistics
> microservice runtime threads
Zone    Node   Microservice           Status  Server Type  %ThrUsage #ThrFree
default NODE_2 exchange               RUNNING HTTP   HTTP  0.0       10000
default NODE_2 currency-converter-chf RUNNING JLRMC  JLRMC 0.0       128
default NODE_2 currency-converter-chf RUNNING QUEUE  QUEUE 0.0       128
  • Memomry usage of specific microservice
> microservice runtime memory currency-converter-chf
Zone    Node   Microservice           Status  %MemUsageTotal %MemUsageMax #MemFree #MemUsed #MemTotal #MemMax
default NODE_2 currency-converter-chf RUNNING 71.2           71.2         0.03 GB  0.08 GB  0.12 GB   0.12 GB

microservice start

Syntax: microservice start [<microservice>]

Start all or given (<microservice>) microservice on the current node.

Argument Information
[<microservice>] Name of microservice to start.

Examples:

  • Start all microservices (if interactive mode is enabled a control question is asked)
> microservice start
  • Start all microservice (with no question asked)
> microservice start *
  • Start specific microservice
> microservice start myMicro

microservice status

Syntax: microservice status [<microservice>]

Show the status of the current or given (<microservice>) microservice on the current node .

  • 'ProcessID' is the PID of microservice's process in OS (if started)
  • 'Status' is the operational status of a microservice
  • 'Available' shows availability status from Main Server load balancer perspective

If 'Status' is 'RUNNING' and 'Available' is 'no' it can mean that: * microservice is overloaded and not responding * microservice process has been killed or suddenly has stopped

Argument Information
[<microservice>] Name of microservice to show status.

Examples:

> microservice status
Zone    Node   Microservice           ProcessID Status  Available
default NODE_2 currency-converter-chf 19589     RUNNING yes
default NODE_2 exchange               18332     RUNNING yes

microservice stop

Syntax: microservice stop [<microservice>]

Stop all or the given (<microservice>) microservice on the current node.

Argument Information
[<microservice>] Name of microservice to stop.

Examples:

  • Stop all microservices (if interactive mode is enabled a control question is asked)
> microservice stop
  • Stop all microservice (no question is asked... be careful... have you configured a cluster ??)
> microservice stop *
  • Stop specific microservice
> microservice stop myMicro

microservice stop

Syntax: microservice tech <name> <command> [force]

Manage technical microservices. Commands are provided from technical microservice configuration file and are dynamically prompt to user. If froce option is provided the command is executed regardless of whether the command is known to Main Server.

Argument Information
<name> Name of technical microservice.
<command> command for the management of a technical microservice.
[force] The command is executed regardless of whether the command is known to Main Server.

Examples:

  • Status of nginx microservice
> microservice tech nginx status
Zone    Node   Type  Name  ProcessID Running
default NODE_2 nginx nginx 29012     yes
  • Reload of nginx microservice
> microservice tech nginx reload
NODE_2: Executed command reload on technical microservice nginx.

microservice terminate

Syntax: microservice terminate [<microservice>]

Stop force all or the given (<microservice>) microservice on the current node.

Argument Information
[<microservice>] Name of microservice to terminate.

Examples:

  • Terminate all microservices (if interactive mode is enabled a control question is asked)
> microservice terminate
  • Terminate all microservice (no question is asked... be careful... have you configured a cluster ??)
> microservice terminate *
  • Terminate specific microservice
> microservice terminate myMicro

microservice upload

Syntax: microservice upload <file_path>

Upload microservice from file located on <file_path> on the current node.

Argument Information
<file_path> Path to zipped microservice.

Examples:

> microservice upload exchange-rates.zip
exchange-rates@NODE_2: Microservice uploaded correctly.