Set Up/Configure lbcli from a Non-Lightbits Server
lbcli is a Lightbits management command that operates over gRPC API. It is present on all Lightbits servers. Because it operates over an API and is statically compiled, it can be easily ported to any server as it operates.
Follow the instructions below to install and configure the lbcli tool on any non-Lightbits server, in order to manage your Lightbits cluster using its API.
- The client must have a connection over port 443 TCP to any Lightbits server.
- For the installation, Lightbits requires communication over SSH, as files are copied via SCP.
Installation
- Prepare the Lightbits repository on your Lightbits client server.
- For RPM-based systems (RHEL, Alma, Rocky, etc.), follow the instructions here: Connecting to the Lightbits Repository - Lightbits Install Guide.
- For Deb-based systems (Ubuntu, Debian, etc.), follow the instructions here: Connecting to the Lightbits Repository - Lightbits Install Guide.
- Install LBCLI with the following commands:
- For RPM-based systems:
yum install management-lbcli
- For Deb-based systems:
apt-get install management-lbcli
Configuration
- Edit the following file with your preferred text editor:
vim /etc/lbcli/lbcli.yaml
Content:
output-format: human-readable
endpoint: https://LIGHTBITS-SERVER:443
dial-timeout: 5s
command-timeout: 60s
insecure-transport: false
insecure-skip-tls-verify: true
debug: false
api-version: 2
jwt: PLACE-JWT-HERE
- Replace
LIGHTBITS-SERVER
with the IP or hostname of any Lightbits server. - Add the “jwt:” parameter at the bottom. Put the entire JWT - as a single line - into
PLACE-JWT-HERE
. Note that after pasting the lengthy JWT, if your editor wraps text, it might appear as multi-line; make sure it is a single line.
On Azure managed app deployments of Lightbits, you can place the load balancer IP, as it provides load balancing over the API for all of the Lightbits servers.
Test and Run
- Run
lbcli version
to see the current version of the lbcli command. - Verify that it can query the cluster by doing a listing of the nodes: lbcli List Nodes.
Updating lbcli
When the Lightbits cluster gets upgraded to a newer version, be sure to update the client's lbcli version by running steps 1 and 2 from the Installation section above. This will update the client's old lbcli with the Lightbits server's newer lbcli command.