/node-runner

Repo containing software to aid node runners

Primary LanguagePythonApache License 2.0Apache-2.0

Node cli

1. Introduction

Executable name - radixnode

All the below commands can be executed on Ubuntu 20.04 ( supported OS) as below

radixnode <sub command>

To download the cli, following instructions from [here](https://docs.radixdlt.com/main/node-and-gateway/cli-install.html)

The command line interface (CLI) provides a collection of tools for below tasks. It is organized in a hierarchy of subcommands, and each level comes with its own built-in documentation of command syntax and options.

  1. To interact with node using common API calls

  2. To setup node quickly on a fresh ubuntu machine using docker compose or systemd

  3. To setup gateway on a fresh ubuntu machine using docker-compose

  4. To setup monitoring for the node or gateway.

For complete command reference refer document Command reference

2. Interaction with node on api endpoints

To list the endpoints supported by cli

$ radixnode api


usage: radixnode [-h] {version,system,core}
radixnode: error: the following arguments are required: apicommand

To list the methods supported by the endpoints say for example core endpoint

$radixnode api core
usage: radixnode [-h]
                 {network-configuration,network-status,entity,key-list,mempool,mempool-transaction,update-validator-config}
                 ...

Core Api comands

positional arguments:
  {network-configuration,network-status,entity,key-list,mempool,mempool-transaction,update-validator-config}

account commands

positional arguments:
  {register-validator,unregister-validator,get-info}

3. More usage instructions

To list all subcommands

# To list the subcommands
radixnode -h
usage: radixnode.py [-h]
                    {docker,systemd,api,monitoring,version,optimise-node,auth}

positional arguments:
  {docker,systemd,api,monitoring,version,optimise-node,auth}
                        Subcommand to run

optional arguments:
  -h, --help            show this help message and exit
```

To list options/arguments for the subcommand

# Check the options for a subcommand such as start-docker
radixnode docker -h

usage: radixnode.py [-h] {setup,start,stop,configure} ...

Docker commands

positional arguments:
  {setup,start,stop,configure}

optional arguments:
  -h, --help            show this help message and exit

4. Build and install instructions

Install Docker Engine:

Post docker install, add current user to docker group:

Ubuntu:

sudo apt-get -y install build-essential python3 python3-env

python3 -m pip install pipenv

# For Ubuntu Jammy ( 22.04 ):
make output-ubuntu-jammy
chmod +x out/ubuntu/jammy/radixnode
sudo cp out/ubuntu/jammy/radixnode /usr/local/bin/radixnode


# For Ubuntu Focal ( 20.04 ):
make output-ubuntu-focal
chmod +x out/ubuntu/focal/radixnode
sudo cp out/ubuntu/focal/radixnode /usr/local/bin/radixnode