Skip to content

OnteonCLI

OnteonCLI is a client tool that allows you to execute actions on Onteon environment. If you want to read more about what is OnteonCLI, click here.

If you want to get list of all commands, click here.

Try OnteonCLI

You can try OnteonCLI without installation or with installation. In both ways, you will need to download a few files. To do this, go to download page, fill the form and submit it. After this, you will be redirected to page with download links.

Without installation

If you want to try OnteonCLI without any installations, download docker compose with just Onteon or docker compose with additional Sonario monitoring tool. For now, you can download docker compose without Sonario, but version with Sonario will work as well. Then go to directory with docker compose file, execute docker-compose up. After this, execute docker-compose run --rm onteoncli, this should run container with preinstalled OnteonCLI and demo applications.

$ ls
docker-compose.yml
$ docker-compose up
$ docker-compose run --rm onteoncli
Creating docker-compose-without-sonario_onteoncli_run ... done
root@78e8cc9193d7:/opt/onteon# ls
onteon_files
root@78e8cc9193d7:/opt/onteon# 

With installation

To install OnteonCLI, first download the suitable version for your systems and then install it on your system. Click here to see how to install specific version of OnteonCLI.

Version

You can check version of your OnteonCLI by executing onteoncli --version.

root@de8f7a95da2e:/opt/onteon# onteoncli --version
1.0.0 (04aa5a8eaea5fa841f76f6f6e2bae885bbc91ed9)

Help

You can always add --help or -h flag to see available commands or arguments.

Check list of commands

root@de8f7a95da2e:/opt/onteon# onteoncli --help
Usage: onteoncli [-hV] [--output=<output>] [-v=<level>] [COMMAND]
The onteoncli program allows to manage Onteon cluster.
  -h, --help              Show this help message and exit.
      --output=<output>   Output format. Supported values: text, json.
  -v, --verbose=<level>   Verbose mode. Helpful for troubleshooting. Supports
                            multiple levels (from 1 to 7).
  -V, --version           Print version information and exit.
Commands:
  login                 The login command authorizes access to cluster.
  token                 The token command returns valid JWT access token.
  node                  The node command groups node commands.
  script                The script command groups script commands.
  application-instance  The application-instance command groups application
                          instance commands.
  zone                  The zone command groups zone commands.
  application           The application command groups application commands.
  distribution          The distribution command groups distribution commands.
  role                  The role command groups role commands.
  completion            The completion command generates completion script for
                          bash or zsh.
  application-registry  The application-registry command groups application
                          registry commands.
  upgrade               The upgrade command groups upgrade commands.
  upgrade-registry      The upgrade-registry command groups upgrade registry
                          commands.
  application-change    The application-change command groups application
                          change commands.

root@de8f7a95da2e:/opt/onteon# onteoncli node --help
Usage: onteoncli node [-h] [COMMAND]
The node command groups node commands.
  -h, --help   Show this help message and exit.
Commands:
  disconnect   The disconnect command disconnects node by id.
  get          The get command finds node by id.
  details      The details command shows node's details.
  list         The list command lists all nodes with pagination.
  set-zone-id  The set-zone-id command updates node with new zone id.

Check command arguments

root@de8f7a95da2e:/opt/onteon# onteoncli node get --help
Usage: onteoncli node get [-h] [--output=<output>] [-v=<level>] <id>
The get command finds node by id.
      <id>                Node's id.
  -h, --help              Show this help message and exit.
      --output=<output>   Output format. Supported values: text, json.
  -v, --verbose=<level>   Verbose mode. Helpful foradd ` troubleshooting. Supports
                            multiple levels (from 1 to 7).

Completion

If you want to generate completion script for OnteonCLI, simply execute onteoncli completion.

root@de8f7a95da2e:/opt/onteon# onteoncli completion > completion.sh

Onteon CLI login

First command you will probably execute is onteoncli login. You need to login to Onteon platform before running commands.

Replace <cluster_endpoint> with Onteon Control Center cluster endpoint (can be load balancer address).

onteoncli login --cluster-url=<cluster_endpoint>

If you are using docker compose file, you can execute onteoncli login --cluster-url http://onteoncc-master:8050.

Confirm code in your browser. You will be informed on successful login in.

If you are using docker compose file, you need to copy url printed in console, and open it in your browser.

Now you can for example list connected nodes to check your cluster.

onteoncli nodes list

Output

You can choose how the result should be formatted. You can do this by adding --output flag with specified output.

root@de8f7a95da2e:/opt/onteon# onteoncli node list --output text # default option
id                       createdAt                updatedAt                ipAddress  nodeApiPort zoneId status
690295573732e0f478073a92 2021-10-22T09:03:08.269Z 2021-10-22T09:16:30.528Z 172.31.0.4 8030        null   available
befe09ac815e19890f83cb71 2021-10-22T09:03:08.269Z 2021-10-22T09:16:30.547Z 172.31.0.3 8030        null   available

root@de8f7a95da2e:/opt/onteon# onteoncli node list --output json 
[{"createdAt":"2021-10-22T09:03:08.269Z","ipAddress":"172.31.0.4","nodeApiPort":8030,"zoneId":null,"id":"690295573732e0f478073a92","updatedAt":"2021-10-22T09:16:40.557Z","status":"available"},{"createdAt":"2021-10-22T09:03:08.269Z","ipAddress":"172.31.0.3","nodeApiPort":8030,"zoneId":null,"id":"befe09ac815e19890f83cb71","updatedAt":"2021-10-22T09:16:40.584Z","status":"available"}]

Verbose

You can set verbose level by adding -v or --verbose flag with level value between 1 and 7.

root@de8f7a95da2e:/opt/onteon# onteoncli node list -v 1
id                       createdAt                updatedAt                ipAddress  nodeApiPort zoneId status
690295573732e0f478073a92 2021-10-22T09:03:08.269Z 2021-10-22T09:18:50.525Z 172.31.0.4 8030        null   available
befe09ac815e19890f83cb71 2021-10-22T09:03:08.269Z 2021-10-22T09:18:50.546Z 172.31.0.3 8030        null   available


root@de8f7a95da2e:/opt/onteon# onteoncli node list -v 5
--------------------------------------------------------------------------------
HTTP Request: GET http://onteoncc-master:8050/onteon-api-access/api/nodes?page=1&perPage=10
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
HTTP Response: 200
--------------------------------------------------------------------------------
id                       createdAt                updatedAt                ipAddress  nodeApiPort zoneId status
690295573732e0f478073a92 2021-10-22T09:03:08.269Z 2021-10-22T09:17:30.537Z 172.31.0.4 8030        null   available
befe09ac815e19890f83cb71 2021-10-22T09:03:08.269Z 2021-10-22T09:17:30.557Z 172.31.0.3 8030        null   available