There are several ways to get ClusterControl installed on your database infrastructure, as described in the ClusterControl Getting Started page. One simple way is to use an installation script, install-cc.sh. This script automates the whole process, and is executed on the host where you want to install ClusterControl. By default, it assumes the host has internet connectivity during the installation process.
For users who are not able to have their ClusterControl hosts connect to the Internet during the installation, we have some good news! ClusterControl provides a helper script to install and configure ClusterControl packages in an Internetless environment, available at /var/www/clustercontrol/app/tools/setup-cc.sh. The installation steps are also available at our documentation page.
Requirements
Prior to the offline install, make sure you meet the following requirements for the ClusterControl node:
- Ensure the offline repository is ready. We assume that you already configured an offline repository for this guide. Details on how to setup offline repository is explained on the next section.
- Firewall, SElinux or AppArmor must be turned off. You can turn on the firewall once the installation has completed. Make sure to allow ports as defined on this page.
- MySQL server must be installed on the ClusterControl host.
We will now explain these steps in the following sections.
Setting Up Offline Repository
The installer script requires an offline repository so it can automate the installation process by installing dependencies.
CentOS 7
Insert the DVD installation disc into the DVD drive.
Mount the DVD installation disc into the default media location at /media/CentOS:
$ mount /dev/cdrom /media/CentOS
Disable the default repository by adding enabled=0 to “base”, “updates” and “extras” directives. You should have something like this inside /etc/yum.repos.d/CentOS-Base.repo:
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=0 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=0 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 enabled=0 …
Update the “enabled” value under the c6-media directive in /etc/yum.repos.d/CentOS-Media.repo, as shown below:
[c6-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Get the list of available packages:
$ yum list
Make sure the last step does not produce any error.
Debian/Ubuntu
Download the ISO images from the respective vendor site and upload them onto the ClusterControl host. You should have something like this on Debian 7.6:
$ ls -1 | grep debian debian-7.6.0-amd64-DVD-1.iso debian-7.6.0-amd64-DVD-2.iso debian-7.6.0-amd64-DVD-3.iso
Create mount points and mount each of the ISO images accordingly:
$ mkdir /mnt/debian-dvd1 /mnt/debian-dvd2 /mnt/debian-dvd3 $ mount debian-7.6.0-amd64-DVD-1.iso /mnt/debian-dvd1 $ mount debian-7.6.0-amd64-DVD-2.iso /mnt/debian-dvd2 $ mount debian-7.6.0-amd64-DVD-3.iso /mnt/debian-dvd3
Add the following lines into /etc/apt/sources.list and comment other lines:
deb file:/mnt/debian-dvd1/ wheezy main contrib deb file:/mnt/debian-dvd2/ wheezy main contrib deb file:/mnt/debian-dvd3/ wheezy main contrib
Retrieve the new list of packages:
$ apt-get update
Make sure the last step does not produce any error.
Preparing the Installation Files
CentOS 7
The offline installation script will need a running MySQL server on the host. Install MySQL server and client, enable it on boot and start the service:
$ yum install -y mariadb mariadb-server $ systemctl enable mariadb $ systemctl start mariadb
Configure MySQL root password for the newly installed MySQL server:
$ mysqladmin -uroot password yourR00tP4ssw0rd
Create the staging directory and download the latest version of cmon-controller RPM package and s9s-clustercontrol tarball from the Severalnines download page. The latest stable version is listed on this page. At this time of writing the latest stable version is 1.5.0:
$ wget https://severalnines.com/downloads/cmon/clustercontrol-1.5.1-4265-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-cmonapi-1.5.0-290-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-1.5.1-2299-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-notifications-1.5.0-70-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-ssh-1.5.0-39-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-cloud-1.5.0-31-x86_64.rpm $ wget https://severalnines.com/downloads/cmon/clustercontrol-clud-1.5.0-31-x86_64.rpm
**If ClusterControl server does not have internet connection, please download/upload the above files manually to the server.
Perform the package installation manually:
$ yum localinstall clustercontrol-*
Debian 7
Install MySQL on the host:
$ sudo apt-get install -y --force-yes mysql-client mysql-server $ sudo systemctl enable mysql
Download the latest version of ClusterControl packages the Severalnines download page. The latest stable version is listed here. At the time of writing, the latest stable version is 1.5.0:
$ wget https://severalnines.com/downloads/cmon/clustercontrol_1.5.1-4265_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-cmonapi_1.5.0-290_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-controller-1.5.1-2299-x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-notifications_1.5.0-70_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-ssh_1.5.0-39_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-cloud_1.5.0-31_x86_64.deb $ wget https://severalnines.com/downloads/cmon/clustercontrol-clud_1.5.0-31_x86_64.deb
**If ClusterControl server does not have internet connection, please download/upload the above files manually to the server.
Perform the package installation and ClusterControl dependencies manually:
$ sudo apt-get -f install ntp gnuplot $ sudo dpkg -i clustercontrol-*.deb
Installing ClusterControl
Execute the post-installation script to configure ClusterControl components and follow the installation wizard accordingly:
$ sudo /var/www/html/clustercontrol/app/tools/setup-cc.sh
**Take note that depending on the operating system, Apache document root path might be different. Try with /var/www if /var/www/html does not work.
Open the browser and navigate to https://ClusterControl_host/clustercontrol. Setup the super admin account by specifying a valid email address and password on the welcome page. Follow the installation wizard. Upon completion you will need to specify an email address as username to access ClusterControl.
Once done, you will be redirected to the onboarding wizard:
Post Installation
Once ClusterControl is up and running, you can point it to your existing clusters and/or single-instance MySQL/MariaDB instances and start managing them from one place. Make sure passwordless SSH is configured from ClusterControl node to your database nodes.
Generate a SSH key on ClusterControl node:
$ ssh-keygen -t rsa # press Enter on all prompts
Setup passwordless SSH to database nodes:
$ ssh-copy-id -i ~/.ssh/id_rsa [os_user]@[IP address/hostname]
Repeat step 2 for all database hosts that you are going to manage.
Notes
Note that the following ClusterControl features will not work without Internet connection:
- Backup > Create/Schedule Backup > Upload to Cloud - requires connection to cloud providers.
- Integrations > Cloud Providers - requires connection to cloud providers.
- Manage > Load Balancer - requires connection to EPEL, ProxySQL, HAProxy, MariaDB repository.
- Manage > Upgrades - requires connection to provider’s repository.
- Deploy Database Cluster - requires connection to database provider’s repository.