v2.4.2 Using Exostellar xli
Overview
xli
is the command-line interface (CLI) for Exostellar’s Management Server (EMS). It enables users to manage images, environments, and profiles, by adding, removing, and updating them. Additionally, xli
allows users to start and stop nested sandboxes, export configuration and logs, generate new common certificates, check the validity of the CA, and check the meta data of the EMS head node.
xli
tool: Version 1.0.2
Configuration
EMS Head Node Configuration
By default, xli
connects to the EMS head node API on the local host and can be configured to connect to the EMS head node in two ways:
Using an Environment Variable
export EMS_ADDRESS=<public_ip_of_ems>
Using the Command Line
xli <sub-command> --address <public_ip_of_ems>
The flag takes precedence if both the environment variable and the --address
flag are used.
Certification Configuration
The certificates must be properly configured when running xli
on a remote machine. These files can be obtained in two ways:
Downloading from the Settings page of EMS UI Console.
Using
xli
to fetch the files automatically.xli
will install the files in the user's home directory at~/.xli
. To download them usingxli
, a valid SSH key for the ‘rocky’ user is required to access the EMS instance:xli get-pem -k </path/to/ssh/key>
Usage
xli [flags]/[commands]
Available Commands
Commands | Explanations |
---|---|
| Retrieve the cert file using the key from the EMS |
| Get and upload certificates |
| Add and get licenses |
| Add, update, remove, and list profiles |
| Add, update, remove, and list environments |
| Add, update, remove, and list images |
| List all nodes in the EMS cluster |
| Get EMS info and export/import configurations |
| Generate the autocompletion script for the specified shell |
Flags
Commands | Explanations |
---|---|
| Address of the EMS (default "localhost:5000") |
| Help for |
| Version for |
Workflow Example
Updating a profile or environment
The update process follows these steps:
Retrieve the current JSON representation of the profile or environment.
Modify the JSON as needed.
Push the updated JSON back to the EMS head node.
Below is an example using the default profile az1
.
xli profile get -n az1 > az1.json / xli profile get -n az1 -y > az1.yaml
<Update JSON>
xli profile update -p az1.json/az1.yaml