blog

Several Ways to Install ClusterControl [UPDATED]

Duncan Mwangi

Published:

ClusterControl serves as a central database management layer for on-prem and hybrid environments. It integrates with various database technologies to simplify complex tasks and guarantee high availability and performance, enabling the deployment, scaling, backup, and recovery of clusters with minimal manual intervention through intelligent automation. As illustrated below, a single ClusterControl instance can manage multiple clusters and types:

This blog post explores various methods for installing ClusterControl, including:

We’ll begin with the most common online method and end with the offline install method.

Installer script (install-cc)

This is the most direct installation method. You’ll need to download and run the script on the ClusterControl node. The script will handle all the necessary steps to install and configure ClusterControl’s packages and dependencies on that specific host. On the ClusterControl server, run the following commands:

wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
sudo ./install-cc  # Omit sudo if running as root

For additional information, refer to the Installation script.

Helm Chart Installation

This method provides a Helm chart designed to provide everything you need to get ClusterControl running in a vanilla Kubernetes cluster. This includes dependencies like:

  • Ingress-Nginx Controller
  • MySQL Operator
  • VictoriaMetrics Operator

You will need to run the following commands to install using Helm chart:

  1. Add a Helm chart repository
helm repo add s9s https://severalnines.github.io/helm-charts/
helm repo update
  1. Create a namespace for ClusterControl. It’s also required for MySQL Operator to run in a custom namespace (not default):
kubectl create ns clustercontrol
kubectl config set-context --current --namespace=clustercontrol
  1. Install ClusterControl
helm install clustercontrol s9s/clustercontrol --devel

For additional information, refer to the Helm Chart installation

Ansible role

If you are automating your infrastructure using Ansible, we have created a role for this purpose, and it is available at Ansible Galaxy. This role also supports deploying a new cluster and importing an existing cluster into ClusterControl automatically. 

Getting the role is as easy as:

ansible-galaxy install severalnines.clustercontrol

For additional information  and example playbooks, refer to the Ansible role.

Puppet module

This module installs ClusterControl for your new database node/cluster deployment or on top of your existing database node/cluster. The Puppet module for ClusterControl automates the following actions based on the scope of this module:

  • Set up ClusterControl required repositories
  • Download and install dependencies. These dependencies are required by its components, such as Apache, PHP, OpenSSL, and MySQL/MariaDB are among its basic packages required.
  • Install ClusterControl components such as the controller, front-end, CMON cloud, CMON SSH, and CMON Clud (upload/download cloud link)
  • Automates configuration for Apache
  • Configures the ports 80 and 443 (for SSL/TLS). This includes its designated rewrite rules needed
  • Ensures port 443 is enabled
  • Enables header module setting X-Frame-Options: sameorigin
  • Check permission for ClusterControl UI and install SSL.
  • Automates MySQL/MariaDB installation.
  • Create CMON DB, grant the cmon user, and configure DB for ClusterControl UI.

Our ClusterControl module for Puppet is available either on Puppet Forge or using the Severalnines Puppet by cloning or downloading it as a zip. Then place it under the puppetlabs modulepath directory and make sure to name your module directory as clustercontrol, for example,

/etc/puppetlabs/code/environments/production/modules/clustercontrol

For step-by-step explanations, refer to Puppet module.

ClusterControl on Marketplaces

ClusterControl is offered on several marketplaces, allowing you to easily deploy a ClusterControl instance that you can use to manage your database nodes on that service provider’s platform. The marketplace requirements on how to create an application differ, and in some cases, this will require that a few extra steps be taken by you to get started. 

The currently supported marketplaces:

For additional information, refer to the ClusterControl on Marketplaces.

Manual Installation

This installation method gives users more control over the installation process. ClusterControl requires several packages to be installed and configured, as described in the following list:

  • Clustercontrol-mcc –  ( ClusterControl GUI)
  • Clustercontrol-controller –  (ClusterControl CMON Controller )
  • Clustercontrol-notifications – (ClusterControl notification module)
  • Clustercontrol-ssh – (ClusterControl web-based SSH module)
  • Clustercontrol-cloud – (ClusterControl cloud module)
  • Clustercontrol-clud – (ClusterControl cloud file manager module)
  • Clustercontrol-proxy – (ClusterControl controller proxying service)
  • S9s-tools – (ClusterControl CLI client)

For step-by-step explanations, refer to Manual Installation.

Offline Installation

This installation method is ideal for air-gapped (offline) environments. It utilizes the official install-cc script, which has been enhanced with new helper functions to facilitate this specific type of installation.

The process involves first running the script on a server or virtual machine that matches the Linux distribution of the air-gapped server and has internet access:

  1. Download the installer script on the staging host:
wget https://severalnines.com/downloads/cmon/install-cc
chmod +x install-cc
  1. Build the local repository for ClusterControl by using the --airgap-repo flag:
./install-cc --airgap-repo

The process of creating a local repository by the installer script involves several steps:

  • Create the local repository
  • Download all packages required by ClusterControl, including dependencies
  • Export the repository into a compressed file before transferring it to the air-gapped host. The tarball is called cc_repo.tar.gz and stored at one level above the repository directory (/usr/local/repo).

For step-by-step explanations, refer to Offline Installation.

Wrapping up

Whether your infrastructure relies on bare-metal servers, container orchestration platforms like Kubernetes, or operates within highly secure, air-gapped data centers, ClusterControl offers flexible deployment options designed to integrate effortlessly with your existing setup so you can enjoy DBaaS-like automation in any environment you choose. If you haven’t already, install ClusterControl through any of these methods to start a free 30-day trial.

Otherwise, be sure to sign-up to our monthly newsletter or follows us on LinkedIn and X to stay abreast of the latest in ClusterControl, CCX, and hybrid database operations.

Subscribe below to be notified of fresh posts