Requirements
Minimum
- Debian/Ubuntu or Centos/RHEL
- 768MiB of System memory
- AWS micro instance OK (613MiB mem, 1 virtual core)
- AWS small instance minimum for Percona Server 5.6 with Ubuntu
** ClusterControl Controller (CMON) is installed with the ClusterControl application **
- Manage and monitor multiple clusters with a single CMON Controller process
- Limitations:
- Add existing Galera cluster, MySQL Master/Slave servers and standalone MySQL servers via the UI
- Other cluster types are currently not supported via the UI (Add existing cluster)
Adding Existing Cluster - Galera Cluster / Collection of MySQL Servers / MongoDB/TokuMx
Do you have an existing:
- Galera Cluster
- Collection of MySQL Servers
- MongoDB/TokuMX replicaset
If so, please start with this guide for preparations of the target cluster:
http://support.severalnines.com/entries/45804993-Add-Existing-Cluster
Installation
To get started we need to download an installation script which installs and configures the ClusterControl UI and Controller. It will also install an Apache and MySQL Server on the host. You can choose though to use an already installed MySQL server on the host.
After the script completes simply open your web browser and enter the URL http://<IP of your UI/Controller node>/clustercontrol and login with the username entered during the installation and the default password 'admin' (which you can of course change later).
NOTE: The installation script will always install an Apache server on the host. A new MySQL server install is configured for minimum system requirements. If you have a larger server please make the necessary changes to the my.cnf file and restart the MySQL server after the installation.
$ wget http://severalnines.com/downloads/cmon/install-cc.sh
$ chmod +x install-cc.sh
$ sudo ./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.
NOTE: Detected more than one IP: 10.0.2.15 10.10.10.10
Using hostname 10.0.2.15 or do 'export HOST=<hostname>' to explicitly set a host
=> The UI/Controller hostname is set to 10.0.2.15. Do you want to change it? (y/N): y
=> Enter the hostname: 10.10.10.30
=> The hostname is now set to 10.10.10.30
=> Installing the ClusterControl UI/Web Application ...
=> Using web document root /var/www/html | checking for existing installation ...
=> No running MySQL server detected (or ignoring).
=> Install a Percona Server? (Y/n): n
=> Installing the default distro MySQL Server ...
=> Assuming default MySQL port is 3306. Do you want to change it? (y/N):
=> Checking for latest versions ...
=> Found UI version 1.2.6
=> Found Controller version 1.2.6-226
=> Install the ClusterControl Controller? (Y/n):
=> Downloading s9s-clustercontrol-1.2.6.tar.gz ...
...
=> Do you want to secure your MySQL server (Y/n):
=> Enter a MySQL root password:
=> Enter the MySQL root password again:
=> Password mismatch! Try again.
=> Enter a MySQL root password:
=> Enter the MySQL root password again:
=> Securing MySQL Server on 10.0.2.15
...
=> Provide a ClusterControl web login username in the form of an email address.
=> Username: alex@severalnines.com
=> Set a Controller user password
=> Enter a CMON user password:
=> Enter the CMON user password again:
=> Password mismatch! Try again.
=> Enter a CMON user password:
=> Enter the CMON user password again:
=> Installing the UI's DB schema and adding the default user.
=> Enter your MySQL root user's password:
=> Importing /var/www/clustercontrol/sql/dc-schema.sql
=> Adding user grants.
=> Creating UI configuration ...
=> Creating API configuration ...
=> ClusterControl UI installation completed!
=> Installing ClusterControl Controller ...
...
=> Installing the Controller's DB schema and adding the cmon user grants.
=> Enter your MySQL root user's password:
=> Importing /usr/local/cmon/share/cmon/cmon_db.sql
=> Importing /usr/local/cmon/share/cmon/cmon_data.sql
=> Adding cmon user grants.
=> Starting the Controller process.
Stopping cmon : failed
Starting cmon :Going to daemonize.. - cmon will write a log in /var/log/cmon.log from now
Starting cmon : ok
=> Next open your web browser and enter the URL: http://10.0.2.15/clustercontrol
=> Login with alex@severalnines.com and default password 'admin'.
After the installation completes open your browser and enter the URL http://<IP of your cc node>/clustercontrol. Login with your username/email address and the password 'admin'
Multiple IP Addresses
If your server has more than one IP address defined then you can specify which IP/hostname to use either by setting an environment variable name HOST before running the script.
$ sudo HOST=1.2.3.5 ./install-cc.sh
or let the script prompt you.
NOTE: Detected more than one IP: 10.0.2.15 10.10.10.10
Using hostname 10.0.2.15 or do 'export HOST=<hostname>' to explicitly set a host
=> The UI/Controller hostname is set to 10.0.2.15. Do you want to change it? (y/N): y
=> Enter the hostname: 10.10.10.30
=> The hostname is now set to 10.10.10.30
=> Installing the ClusterControl UI/Web Application ...
=> Using web document root /var/www/html | checking for existing installation ...
=> No running MySQL server detected (or ignoring).
=> Install a new MySQL Server? (Y/n):
...
User Credentials
The installation script creates the necessary MySQL grants for the UI and Controller and the default ClusterControl web user. The username for the web application is in the format of an email address and the default password is 'admin'
...
=> Provide a ClusterControl web login username in the form of an email address.
=> Username: alex@severalnines.com
=> Set a Controller user password
=> Enter a CMON user password:
=> Installing the UI's DB schema and adding the default user.
=> Enter your MySQL root user's password:
=> Importing /var/www/clustercontrol/sql/dc-schema.sql
=> Adding user grants.
=> Creating UI configuration ...
=> Creating API configuration ...
=> ClusterControl UI installation completed!
=> Installing ClusterControl Controller ...
...
=> Installing the Controller's DB schema and adding the cmon user grants.
=> Enter your MySQL root user's password:
=> Importing /usr/local/cmon/share/cmon/cmon_db.sql
=> Importing /usr/local/cmon/share/cmon/cmon_data.sql
=> Adding cmon user grants.
The CMON user is used for the UI's and Controller's database access to the MySQL server. If you need to modify the ClusterControl configuration files then those are found at:
UI
- /var/www/clustercontrol/bootstrap.php
- /var/www/cmonapi/config/bootstrap.php
- /var/www/cmonapi/config/database.php
Controller
- /etc/cmon.cnf
- /etc/cmon.d/cmon_N.cnf
Error Logs
The ClusterControl UI and Controller writes to separate logs. If you have any problems with the installation or during operation of ClusterControl then please provide the output of the installation and/or the below files.
You should also use our error reporting tool, http://support.severalnines.com/entries/21091498-Error-reporting- which also collects error logs from the managed database clusters.
UI
- /var/www/clustercontrol/app/tmp/logs/error.log
- /var/www/clustercontrol/app/tmp/logs/debug.log
- /var/log/apache2/error.log
Controller
- /var/log/cmon.log
- /var/log/cmon_N.log
Comments
3 comments
Hi ,
I follow all steps mentioned above ,when I access ip/install , it throw mysql is not installed ,but in my server mysql is installed ?
now tell me how I resolve this issue
Hi,
Can you please file a support ticket, http://support.severalnines.com/tickets/new and provide details of your OS that you're trying to install this on.
The MySQL server check is looking for the php function mysql_query so you can try restarting the Apache server and verify also that the mysql driver for php is correctly installed (the installation script should have done that automatically for you).
Example centos/redhat:
$ yum list installed | grep mysql
..
php-mysql.x86_64 5.3.3-22.el6 @rhui-ap-northeast-1-rhel-server-releases
or for debian/ubuntu
$ dpkg --get-selections php5*
..
php5-mysql install
Best Regards,
-alex
HI,
I follow all steps mentioned above , (Only this steps, without install anyhing in other nodes and without install CMON in any Host) but when i try to add a new Galera Cluster, it fails:
I start to complete all the params in "add Galera database form". In the Cluster Control Node Params, i select "Add key pair" and completing onPremise credentials form, the program fails when I save the config. It never finish.
The "error.log" file shows:
2014-01-30 13:57:51 Error: [PDOException] SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xE4\x05\x14\xBA\xAA\xF0...' for column 'private_key' at row 1
#0 /var/www/html/cc-ui-1.2.4/lib/Cake/Model/Datasource/DboSource.php(437): PDOStatement->execute(Array)
#1 /var/www/html/cc-ui-1.2.4/lib/Cake/Model/Datasource/DboSource.php(403): DboSource->_execute('INSERT INTO
dc...', Array)
dc...')#2 /var/www/html/cc-ui-1.2.4/lib/Cake/Model/Datasource/DboSource.php(990): DboSource->execute('INSERT INTO
#3 /var/www/html/cc-ui-1.2.4/lib/Cake/Model/Model.php(1721): DboSource->create(Object(OnpremiseCredential), Array, Array)
#4 /var/www/html/cc-ui-1.2.4/app/Controller/UsersController.php(1495): Model->save(Array)
#5 [internal function]: UsersController->saveOnPremiseCredential()
#6 /var/www/html/cc-ui-1.2.4/lib/Cake/Controller/Controller.php(485): ReflectionMethod->invokeArgs(Object(UsersController), Array)
#7 /var/www/html/cc-ui-1.2.4/lib/Cake/Routing/Dispatcher.php(103): Controller->invokeAction(Object(CakeRequest))
#8 /var/www/html/cc-ui-1.2.4/lib/Cake/Routing/Dispatcher.php(85): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#9 /var/www/html/cc-ui-1.2.4/app/webroot/index.php(96): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#10 {main}
-I use RHEL:
$uname -a
Linux esolsvr 2.6.32-358.14.1.el6.i686
$lscpu
Architecture: i686
CPU op-mode(s): 32-bit, 64-bit
So, the proccessor supports 64 bits, but no the operating system .
-I have a Galera Cluster running with 2 complete nodes (with data) + 1 grbd node (without data).
In first place, ¿Can I use Cluster Control with my config? ¿Is CMON mandatory in all nodes?
¿What can I do? My private key is an operational id_dsa key ....
Thanks in advance.
Article is closed for comments.