There are several ways to get ClusterControl installed on your database infrastructure, as described in the ClusterControl Quick Start Guide. 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! The installer script now supports offline installations.
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.
- ClusterControl packages for the selected version must exist under s9s_tmp directory from the script’s execution path.
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.
1. Insert the DVD installation disc into the DVD drive.
2. Mount the DVD installation disc into the default media location at /media/CentOS:
$ mount /dev/cdrom /media/CentOS
3. 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-6 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-6 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-6 enabled=0 …
4. 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-6
5. Get the list of available packages:
$ yum list
Make sure the last step does not produce any error.
1. 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
2. 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
3. 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
4. Retrieve the new list of packages:
$ apt-get update
Make sure the last step does not produce any error.
Preparing the Installation Files
1. 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 mysql mysql-server $ chkconfig mysqld on $ service mysqld start
2. Configure MySQL root password for the newly installed MySQL server:
$ mysqladmin -uroot password yourR00tP4ssw0rd
3. 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.2.6-357:
$ mkdir ~/s9s_tmp $ cd ~/s9s_tmp $ wget http://www.severalnines.com/downloads/cmon/s9s-clustercontrol-1.2.6.tar.gz $ wget http://www.severalnines.com/downloads/cmon/cmon-controller-1.2.6-357-x86_64.rpm
4. Download and prepare the installation script:
$ cd ~ $ wget http://www.severalnines.com/downloads/cmon/install-cc.sh $ chmod 755 install-cc.sh
1. Install MySQL on the host:
$ sudo apt-get install -y --force-yes mysql-client mysql-server
2. Create the staging directory and download the latest version of cmon and s9s-clustercontrol tarballs from the Severalnines download page. The latest stable version is listed here. At the time of writing, the latest stable version is 1.2.6-357:
$ mkdir ~/s9s_tmp $ cd ~/s9s_tmp $ wget http://www.severalnines.com/downloads/cmon/s9s-clustercontrol-1.2.6.tar.gz $ wget http://www.severalnines.com/downloads/cmon/cmon-1.2.6-357-x86_64.tar.gz
3. Download and prepare the installation script:
$ cd ~ $ wget http://www.severalnines.com/downloads/cmon/install-cc.sh $ sudo chmod 755 install-cc.sh
1. Define NO_INET variable to 1 to tell the installation script to perform an offline installation:
$ export NO_INET=1 $ ./install-cc.sh This script will install the ClusterControl UI and the Controller (optional). An Apache and MySQL server will also be installed. An existing MySQL Server on this host can be used. => Detected NO_INET is set, i.e., NO INTERNET enabled install. => Make sure you have an existing MySQL and Apache Server installed and running on this host! => Download these ClusterControl packages before continuing: => cd s9s_tmp => wget http://severalnines.com/downloads/cmon/s9s-clustercontrol-1.2.6.tar.gz => wget http://severalnines.com/downloads/cmon/cmon-controller-1.2.6-357-x86_64.rpm => The UI/Controller hostname is set to 192.168.253.133. Do you want to change it? (y/N): ...
Follow the installation wizard. Upon completion you will need to specify an email address as username to access ClusterControl.
2. Open the browser and navigate to https://[ClusterControl IP address]/clustercontrol. Login with the email address you specified, with default password 'admin'. You should see something like this:
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.
1. Generate a SSH key on ClusterControl node:
$ ssh-keygen -t rsa # press Enter on all prompts
2. 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.
Note that the following ClusterControl features will not work without Internet connection:
- Backup > Online Storage - requires connection to AWS.
- Service Providers > AWS Instances - requires connection to AWS.
- Service Providers > AWS VPC - requires connection to AWS.
- Manage > Load Balancer - requires connection to EPEL repository/HAproxy download site.
- Manage > Upgrades - requires connection to Percona repository.