Install
Embedded
Fortunately, you don't have to install JLupin CLI Console in embedded mode, because CLI Console is already installed, integrated and provided with JLupin Platform package, ready to download, install and use.
Standalone
If you would like to use CLI Console outside JLupin node (where JLupin PLatform operates), you should download the latest version of JLupin Platform CLI Console from download section (Community) and follow the instructions (on the example of Linux OS):
- Prepare a directory for JLupin software (ex.
/opt/jlupin
) - Add a dedicated user (group) for JLupin software (ex.
groupadd jladm && useradd -g jladm jladm
) and login using it and login using it. - Unzip the package into the prepared directory
- Change default node address in runtime configuration or provide inline parameters in batch mode
Authorization
The embedded as well as standalone version of JLupin CLI console in equipped with standard certificates that are authorized by the server. We recommend to install individual set of certificates (at least for the organization, optimally for each business domain). In order to create new client certificates you need to:
-
get the server certificate (if it has been changed) and place it in
$JLUPIN_HOME/platform/start/control/ssl/server
(embedded) or$JLUPIN_HOME/console/control/ssl/server
(standalone). Note that certificate file name should match the value provided in the runtime configuration. -
Generate CSR and private key
openssl req -out clientX509Certificate.csr -new -newkey rsa:2048 -nodes -keyout clientPrivateKey.pk
- Generate certificate
Generating a 2048 bit RSA private key
.............+++
..............................+++
writing new private key to 'customClientPrivateKey.pk'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [XX]:PL
State or Province Name (full name) []:MALOPOLSKIE
Locality Name (eg, city) [Default City]:KRAKOW
Organization Name (eg, company) [Default Company Ltd]:JLUPIN
Organizational Unit Name (eg, section) []:R&D
Common Name (eg, your name or your server's hostname) []:ebank-client
Email Address []:admin@jlupin.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
-
Place newly generation files in
$JLUPIN_HOME/platform/start/control/ssl/client
(embedded) or$JLUPIN_HOME/console/control/ssl/client
(standalone). Note that certificate and private key file names should match the values provided in the runtime configuration. -
Place the client certificate in JLupin Platform resources (
$JLUPIN_HOME/platform/server-resources/ssl/client
).
Usage
How to start ?
In order to run the console go to $JLUPIN_HOME/platform/start
(or $JLUPIN_HOME/platform/console
if you use it in standalone mode) 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. usinggrep
command, like in the following point. - filtering - use
grep
command after pipe to filter the output of any other command. For examplemicroservice 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 orctrl+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
In batch mode the following parameters can be additionally provided (it overwrites node section in the runtime configuration)
-ssl true|false
(or-ssl
) - it turns off (false) / on (true) SSL on client side. Note that this setting should be synchronized withisSSL
parameter of TRANSMISSION port.-a <address_ip>
( or--address
) - it overwrites JLupin node's address, provided by the runtime configuration-p <TRANSMISSION_port>
( or--transmissionPort
) - it overwrites JLupin node's TRANSMISSION port, originally provided by the runtime configuration-ct <milliseconds>
( or--connectionTimeout
) - it overwrites connection timeout to JLupin node's TRANSMISSION port, originally provided by the runtime configuration-rt <milliseconds>
( or--readTimeout
) - it overwrites read timeout for requests to JLupin node's TRANSMISSION port, originally provided by the runtime configuration