Skip to content

ClusterControl Proxy

ClusterControl Proxy is the next-generation ClusterControl manager which creates a unified view of multiple ClusterControl controllers and providing web services, effectively removing dependencies for Apache or nginx web servers to serve ClusterControl GUI components. At the moment, it is developed to purposedly handle the ClusterControl Ops-C (a.k.a Multi-Controller) GUI component provided by package clustercontrol-mcc.

Having said that, when installing ClusterControl Ops-C (package name: clustercontrol-mcc), ClusterControl Proxy (package name: clustercontrol-proxy) is expected be installed together.

ClusterControl Manager

The ClusterControl Manager binary called ccmgr is the main process (default port: 19501) which serves the web contents of ClusterControl Ops-C and acts as a proxying layer to all ClusterControl controllers added into it. The process is controlled by a systemd unit file located at /etc/systemd/system/cmon-proxy.service. Hence, the service management should follow the standard systemd format:

  • Starting the service:
systemctl start cmon-proxy
  • Stopping the service:
systemctl stop cmon-proxy
  • Restart the service:
systemctl restart cmon-proxy

The main binary is installed at /usr/bin/ccmgr and comes with the following options:

Option Description
--debug-cmon-rpc Debug log RPC requests to cmon
--debug-web-rpc Debug web RPC requests to cmon-proxy
--basedir= The basedir of configuration (default: /usr/share/ccmgr/)

This binary is expected to be running as a service. Use ClusterControl Manager Admin CLI to manage the ClusterControl Manager.

ClusterControl Manager Admin CLI

The ccmgradm is a command-line interface to manage ClusterControl Manager users, passwords and controllers. Run ccmgradm --help to see all available commands.

Example

$ ccmgradm  --help
ClusterControl Manager - admin CLI v2.2
Usage: ccmgradm <command> [<args>]

Options:
--help, -h             display this help and exit

Commands:
dropuser
adduser
setpassword
dropcontroller
addcontroller
init
updatecontroller
listcontrollers
enableMcc

For every available command, there is a further help instruction:

Example

$ ccmgradm adduser --help
ClusterControl Manager - admin CLI v2.2
Usage: ccmgradm adduser [--email EMAIL] [USERNAME [PASSWORD]]

Positional arguments:
USERNAME
PASSWORD

Options:
--email EMAIL, -e EMAIL
--help, -h             display this help and exit

You may use the ccmgradm client to interact with the ccmgr service or use the ClusterControl Ops-C web GUI client to manage users and controllers.

Configuration file

By default, ClusterControl Proxy comes with a default configuration in YAML format, available at /usr/share/ccmgr/ccmgr.yaml:

filename: /usr/share/ccmgr/ccmgr.yaml
webapproot: /var/www
fetch_jobs_hours: 12
fetch_backups_days: 7
timeout: 30
logfile: /var/log/ccmgr.log
frontend_path: /app
port: 19051
tls_cert: /usr/share/ccmgr/server.crt
tls_key: /usr/share/ccmgr/server.key
session_ttl: 1800000000000
single_controller: ""

The following is an example content of the configuration file with one ClusterControl instance:

filename: ccmgr.yaml
instances: # List of controller
    - xid: chebjd8gfi863qqhrolg # Controller id. Generated automatically
      url: hostname:9443/api # Controller api URL
      name: Controller name
      username: admin
      password: password
      frontend_url: http://hostname:9443/ # Url of Cluster Control web interface
    - xid: cnoi4d3fo0o9e9m7hap0 # Controller id. Generated automatically
      # ....
timeout: 30 # request timeout in seconds. Default 30
logfile: ccmgr.log # cmon proxy log file. Default ccmgr.log
users: # Cmon proxy users, can be set via ccmgradm setpassword <username> <password>
    - username: admin
      passwordhash: <hash>
frontend_path: /app # Path to static files that cmon proxy can serve
port: 19051
tls_cert: server.crt # Default server.crt can be set from env TLS_CERTIFICATE_FILE variable
tls_key: server.key # Default server.key can be set from env TLS_KEY_FILE variable
session_ttl: 3600000000000 # Session time to live in nanoseconds. Default 1 hour
fetch_backups_days: 7 # How many days in the past cmon-proxy should look for backup data. Default is 7 days
fetch_jobs_hours: 12 # How many hours in the past cmon-proxy should look for jobs data. Default is 12 hours

Configure custom SSL certificates

The default directory /usr/share/ccmgr shall contain the configuration files and TLS certificates and keys, as well as the logs of the cmon-proxy application. You can put your own TLS cert (a combined full chain, so the main cert and all the CAs together, or just a self signed one) and key into your data directory using the following file names - server.crt and server.key.