Update VMmanager Cloud to the package version

From ISPWiki
Jump to: navigation, search
Hierarchy: VMmanager Cloud -> VMmanager Cloud setup and configuration

Installation steps

1. Make the database dump on all the nodes.

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'mysqldump vmmgr --opt -u vmmgr -pourstrongpassword > vmmgr.`date +%d_%m_%Y`.sql'; done

2. On each cluster node create the f/etc/vmmgr-node-id, file containing the node's id.

3. Add repositories

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'wget -O /etc/yum.repos.d/ispsystem-base.repo
http://download.ispsystem.com/repo/centos/ispsystem-base.repo; wget -O /etc/yum.repos.d/ispsystem.repo
http://download.ispsystem.com/repo/centos/ispsystem-beta.repo; yum install -y epel-release'; done

4. Terminate the process of old VMmanager and prevent it from accidental start.

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'killall core; killall crond; killall core; chmod -x /usr/local/mgr5/bin/core'; done

5. Delete the old services.

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'yum remove -y cman rgmanager corosync corosynclib'; done

6. Run the installation without afterinstall (to prevent creation of the database by installation scripts), specify the databse password

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'NOT_AFTERINSTALL=yes VMMGRPWD=ourstrongpassword yum install -y vmmanager-cloud'; done

7. Access the control panel by its primary IP address (if it was unassigned during the installation process, you can assign it manually on vmbr0 of the main node).

8. Set priorities on the cluster nodes — 100 for the master node, 99 - for the second, 98 - for the third, etc.

9. Go to «Roles» of the cluster node, to set replication for every node. Once you are done, execute the following command to check the results:

mysql> show slave status \G;
Master_Host: %ip мастера%
Slave_IO_Running: Yes
Slave_SQL_Running: Yes

10. Go to "Cloud functions" module to activate them.

Troubleshooting

1. Problems when setting up replications — make sure /etc/my.cnf on the master node includes all the binary logs and, id of the master node is specified as server-id. In vmmgr.log of the master node you can also locate the /usr/local/mgr5/sbin/replctl call and try to execute it on the node. View replctl.log on the node in case of errors.


2. Cannot access the control panel after activating cloud functions

Execute

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip '/usr/local/mgr5/sbin/corolistener -l'; done

if you the error 'corosync_conf' or the nodes show different values, the cause of the problem can be found in the configuration. Execute:

for ip in 10.0.0.1 10.0.0.2 10.0.0.3; do ssh -i etc/ssh_id_rsa $ip 'egrep _vers\|prio /etc/corosync/corosync.conf'; done

equal values should dispplay. If they differ, execute on the master node

«./sbin/mgrctl -m vmmgr cloud.conf.rebuild» to apply new configuration to all the nodes.