Usage
Overview
The screen in JLupin Platform Web Console in divided into three parts:
- Visualizer (in the middle), where physical architecture could be discovered from the given node (where webcontrol is running) point of view.
- Panels (on the bottom), where crucial, aggregated information regarding the environment can be found and basic operations can be performed.
- Terminal (on the right), CLI console running inside the browser that allows to peforme any operational and administrative task in the environment, including configuration changes.
Visualizer
It show the node with all its configured microservices including technical ones, if available. The view is dynamically generated basing on the current state service repository, by default it is automatically refreshed (the default behavior is controlled through configuration panel), but also you can use controls on the top and do it manually. There are also controls for zooming in and zooming out the view.
If you deploy another microservice, after the next screen refreshment it will be displayed as shown on the following picture.
If you configure additional JLupin node in the environment and add it as a peer to the given node, the Visualizer shows also connected node with its configured microservices (its opacity is lower than the given node to distinguish it in the visualization).
Panels
Node
The node panel shows the state of the given node, as shown on the below picture.
You can find there the following information:
- Health - the aggregated status of the node including the state of all components and layers (OS, Main Server and its logical servers, NGINX).
- OS: CPU Usage - CPU usage of the node (OS level)
- OS: Mem Usage - Memory usage of the node (OS level)
- JLupin: CPU Usage - CPU usage of Main Server process (java)
- JLupin: Mem Usage - Heap usage of Main Server (java)
- JLupin: Servers - The aggregated status of logical servers running on Main Server. The threads usage is considered here). If at least one logical server has a problem with threads usage (thresholds are configured in settings panel, see previous chapters) the color of this icon will not be green.
- JLupin: NGINX - The state of JLupin Edge Balancer (if it's running and available).
- JLupin: # Micro - The number of microservices configured on the node.
Microservice
The microservice panel show the state of configured microservices (at least uploaded) allowing to perform some basic operations (start / stop, restart) as shown on the below picture:
You can find there the following information and operations:
- Health - the aggregated status of the microservice including the process status and the state of the data processing logical server (HTTP for SERVLET, JLRMC and QUEUE for NATIVE). The following colors may be displayed:
Color | Description |
---|---|
green | Everything is OK. |
yellow | Something is wrong with its CPU Usage, memory usage or logical servers (at least one) threads usage. |
red | The microservice is unavailable (the health check process has failed). |
gray | The microservice is STOPPED. |
black | The microservice is TERMINATED. |
- Name - the name of the microservice
- Type - the type of the microservice (SERVLET or NATIVE, go to the JLupin Platform documentation to find the difference.)
- Actions - the possible actions that can be performed for the microservice. After choosing on of them, you will be notified that the process begins and just after it is finished (messages on the top of the screen - check it.)
- # Services - the number of services (= java classes) of the microservices that are provided in the environment.
- CPU Usage - CPU usage of the microservice process (java)
- Mem Usage - heap usage of the microservice (java process)
- Thr Usage - the data processing logical servers threads usage, for SERLVET - HTTP, for NATIVE - JLRMS and QUEUE.
Events
The events panel show the list of events that was generated by the node. Events are generated when JLupin Platform automatically reacts to incidents like process failure. The detailed desciption of each column the panel is provided in JLupin Platform CLI Console documentation.
The simulated process failure and the list of event in the panel is shown in the following picture.
Actions log
The actions log panel shows streamed messages coming from JLupin Platform. For example if you select "restart" action for exchange-rate microservice in the microservice panel, you will see the print stream of the restart process coming from the platform in the actions log panel. Check it out in the below picture or try it by yourself :)
Terminal
Sometimes pictures / icons and other nice stuff is not enough, that is why we've provided the full featured CLI console inside the browser. Just click on the terminal icon and... do anything you want with the environment.
Integration
Overview
JLupin Platform Web Console also provides API for integration purposes. It allows to remotely execute any command provided by CLI console, using JSON format and HTTP(S) protocol.
You need to generate an authorization token in user's settings panel, just click 'Get' button and you will gen a permanent token. If you need to change, click 'Remove' and do the procedure once again.
This token is used for requests processing by integration API.
Integration API specification
- URI: webcontrol/api/v1/command/execute
- Method: POST
- Headers:
Authorization:bearer <token>
Content-type: application/json
- Body (request structure):
{
"command": "<command>"
}
Answer structure:
{
"commandResult": [
...
],
"exitCode": "<exitCode>",
"printStream": [
{
"stdOut": [...]
},
{
"stdErr": [...]
}
]
}
Example usage
If you have a token you can invoke any commands available in CLI console like this:
curl -v -X POST -k https://localhost:8888/webcontrol/api/v1/command/execute -H "Content-type: application/json" -H "Authorization:bearer cd553c98-ab8a-48df-bd96-7253109e141e" -d "{ \"command\": \"microservice runtime threads\" }"
The example answer is:
{
"commandResult": [
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "webcontrol",
"Status": "RUNNING",
"Server": "HTTP",
"Type": "HTTP",
"%ThrUsage": "0.0",
"#ThrFree": "10000"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "exchange-rates",
"Status": "RUNNING",
"Server": "JLRMC",
"Type": "JLRMC",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "exchange-rates",
"Status": "RUNNING",
"Server": "QUEUE",
"Type": "QUEUE",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "exchange",
"Status": "RUNNING",
"Server": "HTTP",
"Type": "HTTP",
"%ThrUsage": "0.0",
"#ThrFree": "10000"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-gbp",
"Status": "RUNNING",
"Server": "JLRMC",
"Type": "JLRMC",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-gbp",
"Status": "RUNNING",
"Server": "QUEUE",
"Type": "QUEUE",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "http-session-repository",
"Status": "RUNNING",
"Server": "JLRMC",
"Type": "JLRMC",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "http-session-repository",
"Status": "RUNNING",
"Server": "QUEUE",
"Type": "QUEUE",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-chf",
"Status": "RUNNING",
"Server": "JLRMC",
"Type": "JLRMC",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-chf",
"Status": "RUNNING",
"Server": "QUEUE",
"Type": "QUEUE",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-eur",
"Status": "RUNNING",
"Server": "JLRMC",
"Type": "JLRMC",
"%ThrUsage": "0.0",
"#ThrFree": "128"
},
{
"Zone": "default",
"Node": "NODE_1",
"Microservice": "currency-converter-eur",
"Status": "RUNNING",
"Server": "QUEUE",
"Type": "QUEUE",
"%ThrUsage": "0.0",
"#ThrFree": "128"
}
],
"exitCode": "0",
"printStream": [
{
"stdOut": []
},
{
"stdErr": []
}
]
}