blog

Announcing ClusterControl Package Repository from Severalnines

Jean-Jérôme Schmidt

Published:

We are excited to announce the availability of YUM/APT repositories for ClusterControl, making new releases of ClusterControl  easily accessible using YUM or APT package managers. The repo is found at http://repo.severalnines.com, with instructions provided on the landing page. Our Cluster Configurators will be using these repositories. As a result, users upgrading from s9s_upgrade_cmon starting from version v.1.2.8 will be configured with the package repository.

 

ClusterControl requires extra post-installation setup steps, such as generating an API token, configuring cmon/dcps database schema, grant privileges on cmon schema, setting up SSL and so on. We provide a post-installation script for this purpose at [Apache document root]/clustercontrol/app/tools/setup-cc.sh. If you are installing for the first time, you are required to run this script to ensure ClusterControl is properly set up.

In this blog post, we will show you how to use the Severalnines repository to install and manage ClusterControl packages in your infrastructure. 

 

New Package Naming

For the purpose of streamlining installations based on repository, we have changed the package names as follows:

 

Package

Old Package Name

New Package Name

ClusterControl CMON Controller

cmon-controller

clustercontrol-controller

ClusterControl CMON Agent (deprecated)

cmon-agent

clustercontrol-agent

ClusterControl REST API

cc-cmonapi

clustercontrol-cmonapi

ClusterControl UI

cc-ui

clustercontrol

However, the old package naming is still available as dummy transition packages, as shown from the following package list:

  • cmon-agent.x86_64 : ClusterControl dummy transition package.
  • cmon-controller.x86_64 : ClusterControl dummy transition package.

 

Using YUM Repository

1. Manually import the Severalnines repository public key into your RPM keyring:

$ rpm --import http://repo.severalnines.com/severalnines-repos.asc

2. Add the repository definition:

$ cat - > /etc/yum.repos.d/s9s-repo.repo <

Or, you can download the repository definition from our Severalnines download page:

$ wget http://www.severalnines.com/downloads/cmon/s9s-repo.repo -P /etc/yum.repos.d/

3. Look for ClusterControl packages:

$ yum search clustercontrol

4. Install ClusterControl:

$ yum install clustercontrol

ClusterControl UI is installed on /var/www/html/clustercontrol while ClusterControl REST API is installed on /var/www/html/cmonapi. At this stage, ClusterControl controller is yet to be installed by the post-installation script.

To finalize the installation, execute the post-installation script as explained further down in the ‘Post-installation’ section.

 

Using APT Repository

1. Manually add Severalnines repository public key into your APT keyring:

$ wget http://repo.severalnines.com/severalnines-repos.asc -O- | sudo apt-key add -

2. Add the Severalnines APT source list:

$ echo 'deb [arch=amd64] http://repo.severalnines.com/deb ubuntu main' | sudo tee /etc/apt/sources.list.d/s9s-repo.list

Or, you can download the repository definition from our Severalnines download page:

$ sudo wget http://www.severalnines.com/downloads/cmon/s9s-repo.list -P /etc/apt/sources.list.d/

3. Update package list:

$ sudo apt-get update

4. Look for ClusterControl packages:

$ sudo apt-cache search clustercontrol

5. Install ClusterControl:

$ sudo apt-get install clustercontrol

For Debian and Ubuntu 12.04 and older, ClusterControl UI is installed on /var/www/clustercontrol while ClusterControl REST API is installed on /var/www/cmonapi. On Ubuntu 14.04, the Apache document root has been changed to /var/www/html, thus the locations are similar with Redhat/CentOS based. At this stage, ClusterControl controller is yet to be installed by the post-installation script.

To finalize the installation, execute the post-installation script as explained further down in the ‘Post-installation’ section.

 

Post-installation

Once the ClusterControl packages are in place, we need to finalize the installation:

Execute the post installation script as below:

$ sudo /var/www/html/clustercontrol/app/tools/setup-cc.sh # Redhat/CentOS/Ubuntu =>14.04
$ sudo /var/www/clustercontrol/app/tools/setup-cc.sh # Debian/Ubuntu <14.04

 

Once the installation is complete, login to the ClusterControl UI at http://[ClusterControl IP address]/clustercontrol using your email address (that you entered during the installation process) and default password ‘admin’. You should see something like this:

 

The installation is now complete. If you’d like to have a look at the documentation, feel free to check out the ClusterControl User Guide.

 

Upgrades and Post-upgrade

Upgrading will be easier with the repositories. The following steps show you how to do this: 

1. Stop ClusterControl Controller:

$ service cmon stop

2. Perform the package upgrade:

$ yum update clustercontrol clustercontrol-controller # Redhat/CentOS
$ sudo apt-get install clustercontrol clustercontrol-controller # Debian/Ubuntu

3. Once the package upgrade process is finished, apply the latest schema changes on the cmon and dcps databases:

$ mysql -f -uroot -p cmon < /usr/share/cmon/cmon_db.sql
$ mysql -f -uroot -p cmon < /usr/share/cmon/cmon_data.sql
$ mysql -f -uroot -p cmon < /usr/share/cmon/cmon_db_mods-[old_version]-[new_version].sql
$ mysql -f -uroot -p dcps < /var/www/html/clustercontrol/sql/dc-schema.sql # Redhat/CentOS/Ubuntu =>14.04
$ mysql -f -uroot -p dcps < /var/www/clustercontrol/sql/dc-schema.sql # Debian/Ubuntu <=14.04

4. Clear ClusterControl UI model’s cache:

$ rm -rf /var/www/html/clustercontrol/app/tmp/cache/models/* # Redhat/CentOS/Ubuntu =>14.04
$ sudo rm -rf /var/www/clustercontrol/app/tmp/cache/models/* # Debian/Ubuntu <14.04

5. Start CMON service:

$ service cmon start

We’d recommend you to logout and back in again to load the latest version, your upgrade is complete.

Subscribe below to be notified of fresh posts