LeanXcale Commands
The command lx
is a
Shell for running LeanXcale control programs. This simply fixes the
environment for the installed host and runs the command given as an
argument:
usage: lx [-d] cmd...
The command operates on the whole LeanXcale system, even when multiple hosts are used.
It is convenient to have lx
in the PATH
environment variable, as
suggested in the install program output.
Command output usually includes information on a per-host basis reporting the progress of the used command.
Most commands follow the same conventions regarding options and arguments. We describe them here as a convenience.
Arguments specify what to operate (e.g., what to start, stop, etc.) may be empty to rely on the defaults (whole DB) or may specify a particular host and/or component name:
-
when only component names are given, and only those components will be involved (e.g.,
lxqe101
). -
when a component type name is given, components for that type are selected. (e.g.,
lxqe
). -
when a host name is given, any component following is narrowed to that host. If no components follow the host name, all components from the host are selected.
This may be repeated to specify different hosts and/or components.
The special host names db
, repl
, and repl2
may be used and
stand for hosts without the nodb
attribute, hosts for the first
replica, and hosts for the second replica (hosts that are a mirror of
other ones).
LeanXcale Commands on Bare Metal Installs
For bare metal installs, it suffices to have the lx
command in the PATH.
It can run on any of the installed hosts.
For example, on an installed host, lx version
prints the installed version:
unix$ lx version leanXcale v2.1 kv v2.1.2023-09-29.115f5fba70e3af8dc203953399088902c4534389 QE v2.1.2023-09-30.1e5933900582.16a7a5c3420cd3d5d589d1fa6cc libs v2.1.2023-09-29.67535752acf19e092a6eaf17b11ad17597897956 avatica v2.1.2023-09-27.0b0a786b36e8bc7381fb2bb01bc8b3ed56f49172 TM v2.1.2023-09-29.9a9b22cfdc9b924dbc3430e613cddab4ed667a57
LeanXcale Commands on Docker Installs
To use the lx
command on a docker install, an installed container must be
running, and the command must be called on it.
For example, assume that the container named lx1
is running on a Docker install.
The container could be started using the following command,
assuming the leanXcale image is named lx:2
, and the docker network used is
lxnet
:
unix$ docker run -dit --name lx1 --network lxnet -p0.0.0.0:14420:14420 lx:2 lx1 b28d30702b80028f8280ed6c55297b2e203540387d3b4cfbd52bc78229593e27
It is possible to attach to the container and use the ''lx'' command as it can be done on a bare metal host install:
unix$ docker attach lx1 lx1$ lx version ...
Here, we type docker attach lx1
on the host, and lx version
on
the docker container prompt.
Note that if you terminate the shell reached when attaching the docker container, it will stop. Usually, this is not desired.
It is possible to execute commands directly on the executed container. For example:
unix$ docker exec -it lx1 lx version
executes lx version
on the lx1
container.
In what follows, lx1
is used as the container name in the examples for docker
installs.
LeanXcale Commands on AWS Installs
Using lx
on AWS hosts is similar to using it on a bare-metal install.
The difference is that you must connect on the AWS instance to run the command
there.
For example, after installing xample.aws.leanxcale.com
, and provided the
PEM file can be found at xample.pem, we can run this:
unix$ ssh -i xample.pem xample.aws.leanxcale.com lx version
to see the installed version.
In what follows, xample.pem
is used as the PEM file name
and xample.aws.leanxcale.com
is used as the installed instance name,
for all AWS install examples.