Setting up a New Mashery Local Cluster
Procedure
Prepare mysqldump from Existing Mashery Local Cluster. (Optional)
-
For Mashery Local prior to 4.2.0, root can generate mysqldump in the Master Instance. Because proxy service needs to be stopped when mysqldump is being generated, this Mashery Local cluster cannot handle traffic.
monit stop proxy mysqldump -u masherybackup -p'password_for_masherybackup' --opt --master-data --single-transaction onprem > /mnt/onprem.sql monit start proxy md5sum /mnt/onprem.sql
For Mashery Local 4.2.0 or later, the Administrator can generate mysqldump in the Slave or Master Instance.
The Administrator can generate mysqldump in the Slave Instance. Because proxy service needs to be stopped when mysqldump is being generated, this Slave Instance cannot handle traffic.
sudo monit stop proxy mysqldump -u masherybackup -p'password_for_masherybackup' --opt --dump-slave --single-transaction onprem > /mnt/dump/onprem.sql sudo monit start proxy md5sum /mnt/dump/onprem.sql
The Administrator can generate mysqldump in the Master Instance. Because proxy service needs to be stopped when mysqldump is being generated, this Mashery Local cluster cannot handle traffic.sudo monit stop proxy mysqldump -u masherybackup -p'password_for_masherybackup' --opt --master-data --single-transaction onprem > /mnt/dump/onprem.sql sudo monit start proxy md5sum /mnt/dump/onprem.sql
Set up Mashery Local Master Instance
-
Perform the following steps:
-
Create and configure a Mashery Local Master instance as described in the topic "Configuring a Mashery Local Master", in this Guide.
If special tuning is needed on MySQL, for example, expanding buffer pool size in "/etc/my.cnf":
innodb_buffer_pool_size = 512M
Mashery Local customers should consult TIBCO Support and request assistance in tuning MySQL. After tuning of MySQL, the MySQL service should be restarted by the Administrator:sudo service mysqld restart
When disk expansion is needed, the Administrator should follow the instructions in the topic "Expanding the Disk Space of a Mashery Local Instance" in this Guide. -
Import mysqldump from a previous Mashery Local Cluster. (Optional)
Importing mysqldump from an existing Mashery Local Cluster can minimize the amount data to synchronize from Cloud, greatly reducing the amount of time required to setup the Mashery Local Instance.For example, suppose the remote Mashery Local instance is "remote_host".For Mashery Local prior to 4.2.0, the administrator can copy mysqldump from remote host:
scp root@remote_host:/mnt/onprem.sql /mnt/dump
For Mashery Local 4.2.0 or later, the administrator can copy mysqldump from remote host:scp administrator@remote_host:/mnt/dump/onprem.sql /mnt/dump
Verify the checksum of mysqldump file:md5sum /mnt/dump/onprem.sql
Stop "proxy" service:sudo monit stop proxy
Import mysqldump:screen mysql -u masheryonprem -p'password_for_masheryonprem' onprem < /mnt/dump/onprem.sql
To detach from "screen" process, press Ctrl-A then Ctrl-D. To reattach to "screen" process, run the following command:screen -r
After importing is done, restart MySQL:sudo service mysqld restart
Start "proxy" service:sudo monit start proxy
-
Register the Mashery Local Instance as Master.
Follow the instructions in the topic "Configuring a Local Mashery Master" in this guide to register the Mashery Local Instance as Master, to finish the settings for the Master in Cluster Manager.
-
Stop "proxy" Service (Optional).
After "proxy" service is stopped, there will be no activity in MySQL. This enables Mashery Local slaves to replicate faster. To stop "proxy" service, run the following command:
sudo monit start proxy
-
Create and configure a Mashery Local Master instance as described in the topic "Configuring a Mashery Local Master", in this Guide.
Set up the Mashery Local Slave Instance
-
Perform the following steps:
-
Create and configure a Mashery Local Slave instance as described in the topic "Configuring a Mashery Local Slave", in this Guide.
If special tuning is needed on MySQL, for example, expanding buffer pool size in "/etc/my.cnf":
innodb_buffer_pool_size = 512M
Mashery Local customers should consult TIBCO Support and request assistance in tuning MySQL. After tuning of MySQL, the MySQL service should be restarted by the Administrator:sudo service mysqld restart
When disk expansion is needed, the Administrator should follow the instructions in the topic "Expanding the Disk Space of a Mashery Local Instance" in this Guide. -
Register the Mashery Local Instance as a Slave.
Follow the instructions in the topic "Configuring a Local Mashery Slave" in this guide to register the Mashery Local Instance as Slave, to finish the settings for the Slave in Cluster Manager.
-
Import mysqldump from a previous Mashery Local Cluster. (Optional)
Importing mysqldump from an existing Mashery Local Cluster can minimize the amount data to synchronize from Cloud, greatly reducing the amount of time required to setup the Mashery Local Instance.For example, suppose the remote Mashery Local instance is "remote_host".For Mashery Local prior to 4.2.0, the administrator can copy mysqldump from remote host:
scp root@remote_host:/mnt/onprem.sql /mnt/dump
For Mashery Local 4.2.0 or later, the administrator can copy mysqldump from remote host:scp administrator@remote_host:/mnt/dump/onprem.sql /mnt/dump
Verify the checksum of mysqldump file:md5sum /mnt/dump/onprem.sql
Stop "proxy" service:sudo monit stop proxy
Stop MySQL Slave:mysql -u masheryonprem -p'password_for_masheryonprem' onprem stop slave
Import mysqldump:screen mysql -u masheryonprem -p'password_for_masheryonprem' onprem < /mnt/dump/onprem.sql
To detach from "screen" process, press Ctrl-A then Ctrl-D. To reattach to "screen" process, run the following command:screen -r
After importing is done, restart MySQL:sudo service mysqld restart
Start "proxy" service:sudo monit start proxy
Ensure MySQL Slave replicates well from MySQL Master:mysql -u masheryonprem -p'password_for_masheryonprem' onprem show slave status\G
-
Start "proxy" Service in Master after all Slaves are set. (Optional)
Run the following command:
sudo monit start proxy
-
Create and configure a Mashery Local Slave instance as described in the topic "Configuring a Mashery Local Slave", in this Guide.
Copyright © Cloud Software Group, Inc. All rights reserved.