Links

ZebClient CLI

The ZC-CLI tool is a command-line interface that facilitates the management of the ZebClient cluster.

Usage

To use the tool, execute the zc-cli script on the command line. The script will present a menu with the available options.
zc-cli
Menu options
The menu options available are:
  • Get config files: Retrieves the configuration files for the ZebClient cluster.
  • Update ZebClient config files: Updates the configuration files for the ZebClient cluster.
  • Update ZebClient binary: Updates the ZebClient binary for the cluster.
  • Shutdown ZebClient Cluster: Gracefully Shuts down the ZebClient cluster.
  • Startup ZebClient Cluster: Starts up the ZebClient cluster.
  • Add Application Node: Adds a new application node to the ZebClient cluster.
  • Exit: Exits the tool.

Implementation

The tool is implemented in Bash and uses several scripts to perform its operations. These scripts are located in /usr/local/bin and include:
  • zc-get-config.sh: Retrieves the configuration files for the ZebClient cluster.
  • zc-update-config.sh: Updates the configuration files for the ZebClient cluster.
  • zc-update-binary.sh: Updates the ZebClient binary for the cluster.
  • zc-startup-cluster.sh: Starts up the ZebClient cluster.
  • zc-shutdown-cluster.sh: Shuts down the ZebClient cluster.
  • zc_health_check.py: Health check script for the ZebClient cluster.
  • zc-add-node.sh: Adds a new application node to the ZebClient cluster.
  • zc-add-lxc.sh: Adds a new Linux container to the ZebClient cluster.
The tool creates a zc-cli directory in the user's home directory and executes the scripts from there. The tool also sets the necessary permissions to run the scripts and modifies the scripts to use the correct Linux user for the specific Linux distribution.

Conclusion

The ZC-CLI tool is a simple yet powerful command-line interface for managing the ZebClient cluster. It provides an easy-to-use interface for performing common cluster operations and helps simplify the cluster management process.