Using the CLI

axual.sh reference

Usage: ./axual.sh [OPTIONS] COMMAND [ARG…​]

Options

Option

Description

Example

-v

Verbose. Log all underlying docker commands and shell functions

./axual.sh -v start

Available commands

Command

Description

Example

start

start all cluster / instance / mgmt / client level services that should be running on this node.

./axual.sh start

stop

stop all cluster / instance / mgmt / client level services which are running on this machine.

./axual.sh stop

restart

restart all cluster / instance / mgmt / client level services which are running on this machine.

./axual.sh restart

clean

clean data, containers or images used in an Axual deployment

./axual.sh clean all

cluster

send the change status command to all instances of the cluster, and getting current status of all instances of the current cluster

./axual.sh cluster [set/get] [status] [metadata/data/offset/app] [on/off]

instance

send the change status command to specified instance of the cluster, and getting current status of specified instance of the current cluster

./axual.sh instance <instance-name> [set/get] [status] [metadata/data/offset/app] [on/off]

start, restart and stop

Use axual.sh <start/restart/stop> <service class> <optional list of services>

This is always relative to the node this command is ran on.

Usages:

  • ./axual.sh [start|restart|stop] cluster [<service-name>]

    service-name: broker, cluster-api, cluster-browse, distributor, exhibitor

  • ./axual.sh [start|restart|stop] instance [<instance-name>] [<service-name>]

    service-name: discovery-api, distribution, instance-api, schema-registry, sr-master, sr-slave, rest-proxy

  • ./axual.sh [start|restart|stop] mgmt [<servicename>]

    service-name: alertmanager, grafana, mgmt-ui, mgmt-api, mgmt-keycloak, mgmt-db,mgmt-vault,operation-manager,prometheus, stream-browse

  • ./axual.sh [start|restart|stop] client [<instance-name>][<service-name>]

    service-name: connect

  • ./axual.sh [start|restart|stop] monitoring [<service-name>]

    service-name: cadvisor, prometheus-node-exporter

instance

Use ./axual.sh instance <instance-name> to get a specified instance status.

Usage:

`./axual.sh instance <instance-name> set status [metadata|data|offset|app] [on|off]`

Use ./axual.sh instance <instance-name> to set a specified instance status.

Usage:

`./axual.sh instance <instance-name> get status`

cluster

Use ./axual.sh cluster to get state of all the instances in the cluster.

Usage:

./axual.sh cluster get status

Use ./axual.sh cluster to set state of all the instances in the cluster.

Usage:

./axual.sh cluster set status [metadata|data|offset|app] [on|off]

The following statuses can be returned:

  1. INACTIVE: Not participating actively in the instance.

  2. READY_FOR_METADATA: Cluster is active and ready to apply topics if necessary.

  3. READY_FOR_DATA: All metadata on the cluster is up to date and the cluster is ready to receive data from other clusters through Distributor.

  4. READY_FOR_OFFSETS: Cluster is now ready to receive any unsynchronized consumer offsets.

  5. READY_FOR_APPLICATIONS: The cluster is fully synched with other clusters in the same instance and is ready to serve client applications.

InstanceStateTransitions
  • To activate a cluster, use the following flow: metadata → data → offset → app.

  • To deactivate a cluster, use the following flow: app → offset → data → metadata.

Example usage

when referring to an instance, always use the full instance name, including <tenant>, e.g. for tenant company, instance prod, the full instance name would be company-prod

./axual.sh start instance

Start instance level components of all instances

./axual.sh stop instance company-prod

Stop all instance level components of tenant company, instance prod

./axual.sh restart instance company-prod discovery-api

Restart discovery-api, an instance level component of tenant company, instance prod

./axual.sh start cluster

Start cluster level components that are designated to run on this node (see nodes.sh)

./axual.sh restart cluster broker

Restart cluster level component broker

./axual.sh stop cluster cluster-api

Stop cluster level component cluster-api

./axual.sh start client

Start client level components for all instances

./axual.sh restart client company-prod axual-connect

Restart axual-connect,a client level component of tenant company, instance prod

./axual.sh stop client company-prod

Stop all client level components of tenant company, instance prod

./axual.sh instance company-prod get status

Get the current status of tenant company, instance prod

./axual.sh restart mgmt mgmt-api

Restart mgmt level component mgmt-api

./axual.sh stop mgmt mgmt-ui

Stop mgmt level component mgmt-ui

./axual.sh start mgmt keycloak-populate-db

Start mgmt level service keycloak-populate-db to create DB with priviligies