Table of Contents
Installer script is the recommended way to install ClusterControl. The script must be downloaded and executed on the ClusterControl node, which performs all necessary steps to install and configure ClusterControl’s packages and dependencies on that particular host. It also supports offline installation with NO_INET=1
variable exported, however, you need to have a mirrored repository enabled, or MySQL/MariaDB and Apache must be installed and running on that host beforehand. See Offline Installation for details. The script assumes that the host can install all dependencies via the operating system’s repositories.
Starting from ClusterControl 1.9.7 (September 2023), ClusterControl GUI v2 is the default frontend graphical user interface (GUI) for ClusterControl. For new installations, the installer script will only install GUI v2, skipping GUI v1. If you would like to run GUI v1, see Installing ClusterControl GUI v1 over GUI v2. If you are upgrading from an older version, the GUI v1 will remain available and usable as usual.
We encourage users to go to the ClusterControl download page and download the installer script from there (user registration required). Once registered, you will see the installation instructions similar to what is described in this section.
On the ClusterControl server, run the following commands:
$ wget http://www.severalnines.com/downloads/cmon/install-cc
$ chmod +x install-cc
$ sudo ./install-cc # omit sudo if you run as root
Basically, the installation script will attempt to automate the following tasks:
- Install and configure a MySQL/MariaDB server (used by ClusterControl to store management and monitoring data).
- Install and configure the ClusterControl packages via the package manager.
- Install ClusterControl dependencies via the package manager.
- Configure Apache and SSL.
- Configure SELinux (Red Hat-based distributions only)
- Configure ClusterControl RPC token.
- Configure ClusterControl Controller (CMON) with minimal configuration options.
- Enable the CMON service on boot and start it up.
After the installation completes, open your web browser to https://{ClusterControl_host}/
and create the default admin user by specifying a username (username “admin” is reserved) and password on the welcome page.
Environment Variables
The installer script also understands a number of environment variables if defined. Supported environment variables are:
Variables | Description |
---|---|
S9S_CMON_PASSWORD |
MySQL cmon user password. |
S9S_ROOT_PASSWORD |
MySQL root user password of the node. |
S9S_DB_PORT |
MySQL port for cmon to connect. |
HOST |
Primary IP address or FQDN of the host. Useful if the host has multiple IP addresses. |
NO_INET |
Special flag to indicate an offline installation. A mirrored repository must be enabled, or MySQL/MariaDB and Apache must be installed and running on the host beforehand. |
INNODB_BUFFER_POOL_SIZE |
MySQL InnoDB buffer pool size to be configured on the host. The default is 50% of the host’s RAM. |
CLUSTERCONTROL_BUILD |
ClusterControl builds (other than the controller). Separate each package with space. |
CONTROLLER_BUILD |
ClusterControl controller build. |
S9S_TOOLS_BUILD |
ClusterControl CLI (a.k.a s9s) build. |
The environment variable can be set through the export
command or by prefixing the install command as shown in the Example Use Cases section.
Example Use Cases
If you have multiple network interface cards, you may immediately assign a primary IP address using the HOST
variable as per the example below:
$ HOST=192.168.1.10 ./install-cc # as root or sudo user
By default, the script will allocate 50% of the host’s RAM to the InnoDB buffer pool. You may change this by assigning a value in MB for INNODB_BUFFER_POOL_SIZE
variable as the example below:
$ INNODB_BUFFER_POOL_SIZE=512 ./install-cc # as root or sudo user
If you want to perform a single-liner non-interactive installation, you can assign each mandatory variable with its value beforehand, similar to the example below:
$ S9S_CMON_PASSWORD=cmonP4ss S9S_ROOT_PASSWORD=root123 S9S_DB_PORT=3306 HOST=10.10.10.10 ./install-cc
If you want to install a specific version instead of the latest in the repository, you can use CLUSTERCONTROL_BUILD
, CONTROLLER_BUILD
and S9S_TOOLS_BUILD
environment variables. You can get the available package name and version from the ClusterControl download site.
Examples are as follows:
$ CLUSTERCONTROL_BUILD="clustercontrol-1.7.1-5622 clustercontrol-cloud-1.7.1-163 clustercontrol-clud-1.7.1-163 clustercontrol-notifications-1.7.1-159 clustercontrol-ssh-1.7.1-70" \
CONTROLLER_BUILD="clustercontrol-controller-1.7.1-2985" \
S9S_TOOLS_BUILD="s9s-tools-1.7-93.1" \
./install-cc
$ CLUSTERCONTROL_BUILD="clustercontrol-1.7.1-5622 clustercontrol-cloud-1.7.1-163 clustercontrol-clud-1.7.1-163 clustercontrol-notifications-1.7.1-159 clustercontrol-ssh-1.7.1-70" \
CONTROLLER_BUILD="clustercontrol-controller-1.7.1-2985" \
S9S_TOOLS_BUILD="s9s-tools-1.7.20190117-release1" \
./install-cc