Table of Contents
ClusterControl provides a script to install and configure ClusterControl packages in an Internetless environment, available at this URL using the OFFLINE=1
parameter.
Take note that the following ClusterControl features will not work without an Internet connection:
- Backup → Create/Schedule Backup → Upload to Cloud – requires a connection to cloud providers.
- Integrations → Cloud Providers – requires a connection to cloud providers.
- Manage → Load Balancer – requires a connection to EPEL, ProxySQL, HAProxy, MariaDB repository.
- Manage → Upgrades – requires a connection to the provider’s repository.
- Deploy Database Cluster – requires a connection to the database provider’s repository.
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. Details on how to set up an offline repository are explained in the Setting up Offline Repository 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 in Firewall and Security Groups.
- MySQL server must be installed and running on the ClusterControl host.
Setting up Offline Repository
The installer script requires an offline repository to satisfy the dependencies. In this documentation, we provide steps to configure offline repository on CentOS/AlmaLinux/RockyLinux 8 & 9 and Ubuntu 20.04 & 22.04 LTS. It’s necessary to have a temporary internet access to download all the packages in the Repository Server.
1. Setup the webserver on the repo server to serve up packages to the yum package manager remotely:
$ dnf install -y nginx
$ systemctl start nginx
$ systemctl enable nginx
$ systemctl status nginx
2. Setup software required for repository server
$ dnf install -y createrepo yum-utils wget
$ dnf install -y epel-release
3. Create directory for repo packages:
$ mkdir -p /usr/share/nginx/html/repos
4. Configure the nginx
in the Repository Server:
$ sudo vi /etc/nginx/conf.d/repos.conf
server {
listen 80;
server_name repo-server;
root /usr/share/nginx/html/repos;
index index.html;
location / {
autoindex on;
}
}
5. Configure hostname repo-server
in the /etc/hosts
on the Repository Server.
$ vi /etc/hosts
your_ip_address repo-server
6. Restart the nginx
service:
$ systemctl restart nginx
$ chcon -Rt httpd_sys_content_t /usr/share/nginx/html/repos
7. Perform repository syncing with appropriate repositories (the following commands will consume time to finish):
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=baseos --newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=appstream--newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=extras --newest-only --download-metadata
-- For AlmaLinux/RockyLinux/CentOS 9 (CodeReadyBuilder)
$ dnf config-manager set-enabled crb
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=crb--newest-only --download-metadata
-- For AlmaLinux/RockyLinux/CentOS 8 (Powertools)
$ dnf config-manager set-enabled powertools
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=powertools--newest-only --download-metadata
8. Adding Severalnines Repository to the Repo Server.
Import the public key:
$ rpm --import http://repo.severalnines.com/severalnines-repos.asc
Download the s9s-repo fom the Severalnines Repository
$ wget http://www.severalnines.com/downloads/cmon/s9s-repo.repo -P /etc/yum.repos.d/
Edit the s9s-repo.repo
and add s9s-tools
repo to the existing repo file with the following content:
[s9s-tools]
name=s9s-tools (RHEL_8)
type=rpm-md
baseurl=http://repo.severalnines.com/s9s-tools/{os_codename}
gpgcheck=1
gpgkey=http://repo.severalnines.com/s9s-tools/{os_codename}/repodata/repomd.xml.key
enabled=1
Replace {os_codename}
based on the list of Operating System code below: RHEL_7
,RHEL_8
,RHEL_9
,CentOS_7
,CentOS_8
,CentOS_9
.
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=s9s-repo --newest-only --download-metadata
$ dnf reposync -g --delete -p /usr/share/nginx/html/repos/ --repoid=s9s-tools --newest-only --download-metadata
9. Adding PostgreSQL Repository to the Repo Server.
Download the PostgreSQL release package:
$ dnf install https://download.postgresql.org/pub/repos/yum/reporpms/{os_code}-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Replace the {os_code}
for each version of Operating System; EL-7
, EL-8
, EL-9
.
$ dnf clean all
$ dnf repolist
Perform repository syncing of PostgreSQL:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg-common --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg16 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg15 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg14 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg13 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=pgdg12 --newest-only --download-metadata
10. Adding MongoDB Repository to the Repo Server.
The package name of the MongoDB server as seen in the yum command is dnf install mongodb-org
. Therefore, the /etc/yum.repos.d/mongodb-org.repo
can only have one entry pointing to the appropriate version of MongoDB (one and only one of either 4.4, 5.0or 6.0).
Create a repo file located at /etc/yum.repos.d/mongodb-org.repo
and make sure it has the following lines (the example shows we activate MongoDB 6.0):
# cat mongodb-org.repo
[mongodb-org-6.0-latest]
name=MongoDB lastest 6.0 Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/6.0/x86_64/
gpgcheck=0
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-6.0.asc
#[mongodb-org-5.0]
#name=MongoDB Repository
#baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/5.0/x86_64/
#gpgcheck=1
#enabled=1
#gpgkey=https://www.mongodb.org/static/pgp/server-5.0.asc
Disable GPGkey checking if you don’t have an internet connection. Furthermore, only one version (i.e., either 6.0, 5.0, 4.4) can be supported at any given time. The reason is, that all the versions are called “mongodb-org”.
$ dnf clean all
$ dnf repolist
Perform repository syncing of MongoDB:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mongodb-org-6.0-latest --newest-only --download-metadata
11. Adding Percona MongoDB Repository to the Repo Server.
The package name of the Percona MongoDB server as seen in the yum command is dnf install percona-server-mongodb
. Therefore, the /etc/yum.repos.d/percona-mongodb-org.repo
can only have one entry pointing to the appropriate version of MongoDB (one and only one of either 4.4, 5.0 or 6.0).
Create a repo file located at /etc/yum.repos.d/percona-mongodb.repo
and make sure it has the following lines (the example shows we activate Percona MongoDB 6.0):
[psmdb-60-release-x86_64]
name = Percona Server for MongoDB 6.0 release/x86_64 YUM repository
baseurl = http://repo.percona.com/psmdb-60/yum/release/$releasever/RPMS/x86_64
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
[psmdb-60-release-noarch]
name = Percona Server for MongoDB 6.0 release/noarch YUM repository
baseurl = http://repo.percona.com/psmdb-50/yum/release/$releasever/RPMS/noarch
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
[psmdb-60-release-sources]
name = Percona Server for MongoDB 6.0 release/sources YUM repository
baseurl = http://repo.percona.com/psmdb-60/yum/release/$releasever/SRPMS
enabled = 0
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
[tools-release-x86_64]
name = Percona Tools release/x86_64 YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/RPMS/x86_64
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
[tools-release-noarch]
name = Percona Tools release/noarch YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/RPMS/noarch
enabled = 1
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
[tools-release-sources]
name = Percona Tools release/sources YUM repository
baseurl = http://repo.percona.com/tools/yum/release/$releasever/SRPMS
enabled = 0
gpgcheck = 0
#gpgkey = file:///etc/pki/rpm-gpg/PERCONA-PACKAGING-KEY
Disable GPGkey checking if you don’t have an internet connection. Furthermore, only one version (i.e., either 6.0, 5.0, 4.4) can be supported at any given time. The reason is, that all the versions are called “percona-mongodb-org”.
$ dnf clean all
$ dnf repolist
Perform repository syncing of Percona MongoDB:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=psmdb-60-release-x86_64 --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=tools-release-x86_64 --newest-only --download-metadata
12. Adding Oracle MySQL Repository to the Repo Server.
Download the appropriate Oracle MySQL community release package
$ dnf install https://dev.mysql.com/get/mysql84-community-release-{os_code}-1.noarch.rpm
Replace the {os_code}
for each verion of Operating System; el7
, el8
, el9
.
Clear the repository cache and list out the repositories, make sure the newly added MySQL 8 repository is in the list:
$ dnf clean all
$ dnf repolist
Perform repository syncing of Oracle MySQL:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql80-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-connectors-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-tools-community --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mysql-cluster-8.0-community --newest-only --download-metadata
13. Adding Percona MySQL Repository to the Repo Server.
Download the appropriate Percona MySQL release package
$ dnf install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Enable the Percona Server for MSQL 8.0 (the latest version at the time of this writing):
$ percona-release setup ps80
Clear the repository cache and list out the repositories, make sure the newly added Percona Server repository is in the list:
$ dnf clean all
$ dnf repolist
Perform repository syncing of Percona MySQL:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=ps-80-release-x86_64 --newest-only --download-metadata
14. Adding MariaDB Repository to the Repo Server.
Install the MariaDB repository by using the following script:
$ curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
Clear the repository cache and list out the repositories, make sure the newly added MariaDB repository is in the list:
$ dnf clean all
$ dnf repolist
Perform repository syncing of MariaDB:
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-main --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-maxscale --newest-only --download-metadata
$ dnf reposync --delete -p /usr/share/nginx/html/repos/ --repoid=mariadb-tools --newest-only --download-metadata
15. Creating Repository
$ createrepo /usr/share/nginx/html/repos/
1. Insert Ubuntu 16.04 installation disc into the DVD drive.
2. Mount the disk as /media/cdrom
:
$ sudo mkdir /media/cdrom
$ sudo mount /dev/cdrom /media/cdrom/
3. Uncomment the following line (the first line) inside /etc/apt/sources.list
and comment on the other lines:
deb cdrom:[Ubuntu-Server 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.8)]/ xenial main restricted
4. Retrieve the new list of packages:
$ sudo apt-get update
Make sure the last step does not produce any errors.
Performing Offline Installation
1. The offline installation script will need a running MySQL server on the host. Install MySQL server and client, enable it to start on boot and start the service:
$ yum install -y mariadb mariadb-server
$ systemctl enable mariadb
$ systemctl start mariadb
2. Configure MySQL root password for the newly installed MySQL server:
$ mysqladmin -uroot password yourR00tP4ssw0rd
3. Move the default repository to the backup.
$ mv /etc/yum.repo.d/*.repo /etc/yum.repo.d/bak/
4. Create the repository pointing to the Repo Server in the ClusterControl host. You can use the following template:
[appstream]
name=AlmaLinux $releasever - AppStream
baseurl=http://repo-server/appstream/
enabled=1
gpgcheck=0
[baseos]
name=AlmaLinux $releasever - BaseOS
baseurl=http://repo-server/baseos/
enabled=1
gpgcheck=0
[crb]
name=AlmaLinux $releasever - CRB
baseurl=http://repo-server/crb/
enabled=1
gpgcheck=0
[extras]
name=AlmaLinux $releasever - Extras
baseurl=http://repo-server/extras/
enabled=1
gpgcheck=0
[epel]
name=AlmaLinux $releasever - Epel
baseurl=http://repo-server/epel/
enabled=1
gpgcheck=0
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo-server/mysql80-community/
enabled=1
gpgcheck=0
[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo-server/mysql-tools-community/
enabled=1
gpgcheck=0
[pgdg-common]
name=PostgreSQL common RPMs for RHEL / Rocky / AlmaLinux $releasever - $basearch
baseurl=http://repo-server/pgdg-common/
enabled=1
gpgcheck=0
[pgdg15]
name=PostgreSQL 16 for RHEL / Rocky / AlmaLinux $releasever - $basearch
baseurl=http://repo-server/pgdg16/
enabled=1
gpgcheck=0
[pgdg15]
name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch
baseurl=http://repo-server/pgdg15/
enabled=1
gpgcheck=0
[pgdg14]
name=PostgreSQL 15 for RHEL / Rocky / AlmaLinux $releasever - $basearch
baseurl=http://repo-server/pgdg14/
enabled=1
gpgcheck=0
[s9s-repo]
name = Severalnines Release Repository
baseurl=http://repo-server/s9s-repo/
enabled=1
gpgcheck=0
[s9s-tools]
name = Severalnines Tools Repository
baseurl=http://repo-server/s9s-tools/
enabled=1
gpgcheck=0
5. Add the alias of repo-server
in ClusterControl host /etc/hosts
:
$ vi /etc/hosts
ip_repository_server repo-server
You should change the ip_repository_server
with the correct IP Address of the Repo Server.
install-cc
script and put the file into ClusterControl hosts. Give execute permission to the file.
$ chmod +x install-cc
6. Execute install-cc
script to install ClusterControl and follow the installation wizard accordingly:
$ $ S9S_ADMIN_EMAIL="[email protected]" OFFLINE=1 S9S_ROOT_PASSWORD="XXX" S9S_CMON_PASSWORD="YYY" ./install-cc
Fill the S9S_ADMIN_EMAIL
using your email, S9S_ROOT_PASSWORD
with the correct password and S9S_CMON_PASSWORD
you defined.
https://ClusterControl_host/
. Setup the super admin account by specifying a valid email address and password on the welcome page.
You would see this error: “Sorry we are not able to retrieve your license information. Please register your license under Settings – Subscription”. This is expected because the demo license is automatically retrieved from our license server automatically via the Internet. Please contact our Sales or Support team to get a free 30-day demo license. Otherwise, you will be running ClusterControl as a community edition.
1. Install MySQL on the host and enable it on boot:
$ sudo apt-get install -y --force-yes mysql-client mysql-server
$ sudo systemctl enable mysql
2. Create the staging directory called s9s_tmp
and download the latest version of ClusterControl related DEB packages from the Severalnines download site and Severalnines Repository. There are a number of packages you need to download as explained below:
clustercontrol
– ClusterControl UI – https://severalnines.com/downloads/cmon/clustercontrol_1.8.2-7748_x86_64.debclustercontrol-controller
– ClusterControl Controller (CMON) – https://severalnines.com/downloads/cmon/clustercontrol-controller-dbg-1.8.2-4443-x86_64.debclustercontrol-notifications
– ClusterControl event module – https://severalnines.com/downloads/cmon/clustercontrol-notifications_1.8.2-267_x86_64.debclustercontrol-ssh
– ClusterControl web-ssh module – https://severalnines.com/downloads/cmon/clustercontrol-ssh_1.8.2-105_x86_64.debclustercontrol-cloud
– ClusterControl cloud module – https://severalnines.com/downloads/cmon/clustercontrol-cloud_1.8.2-280_x86_64.debclustercontrol-clud
– ClusterControl cloud’s file manager module – https://severalnines.com/downloads/cmon/clustercontrol-clud_1.8.2-280_x86_64.debs9s-tools
– ClusterControl CLI (s9s) – http://repo.severalnines.com/s9s-tools/xenial/amd64/s9s-tools_1.8.20210126-release1_amd64.deb (for Xenial)s9s-tools-lib
– ClusterControl CLI (s9s) library – http://repo.severalnines.com/s9s-tools/xenial/amd64/libs9s0_1.8.20210126-release1_amd64.deb (for Xenial)
3. Perform the package installation and ClusterControl dependencies manually:
$ sudo apt-get -f install ntp gnuplot
$ sudo dpkg -i clustercontrol*.deb
$ sudo dpkg -i libs9s0*.deb
$ sudo dpkg -i s9s-tools*.deb
4. Execute the post-installation script to configure ClusterControl components and follow the installation wizard accordingly:
$ sudo /var/www/clustercontrol/app/tools/setup-cc.sh
5. 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.
Post-installation
Once ClusterControl is up and running, you can import your existing cluster or deploy a new database cluster and start managing them from one place. Make sure passwordless SSH is configured from the ClusterControl node to your database nodes. Please use the repository template in ClusterControl host for the database server and load balancer server.
1. Generate an SSH key on the ClusterControl node:
$ ssh-keygen -t rsa # press Enter on all prompts
2. Setup passwordless SSH to ClusterControl and 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 (including the ClusterControl node itself).