1. Home
  2. Docs
  3. ClusterControl
  4. Installation
  5. Automatic Installation
  6. Installer Script (install-cc)

Installer Script (install-cc)

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 mirrored repository enabled or MySQL and Apache 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 repository.

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 described in this section.

On 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 server (used by ClusterControl to store monitoring data).
  • Install and configure the ClusterControl controller package via the package manager.
  • Install ClusterControl dependencies via the package manager.
  • Configure Apache and SSL.
  • Configure the ClusterControl API URL and token.
  • Configure ClusterControl Controller 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}/clustercontrol and create the default admin user by specifying a valid email address 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.
INNODB_BUFFER_POOL_SIZE MySQL InnoDB buffer pool size to be configured on the host. 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= ./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= ./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 as follow:

$ 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" \
$ 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" \
Was this article helpful to you? Yes No