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 under the /mnt/ folder. Because proxy service needs to be stopped when mysqldump is being generated, this Mashery Local cluster cannot handle traffic.
If you are using Docker-Machine, make sure you are talking to the right one. Execute the command docker-machine ls to find which one is currently active. It is also recommended to always redo the command:
eval "$(docker-machine env <docker machine name>)"
- docker exec -it ml-tm nohup service javaproxy stop
-
- docker exec -it ml-db /bin/bash
- mysqldump -u masherybackup -p'password_for_masherybackup'--opt --master-data --single-transaction onprem > /mnt/onprem.sql
- md5sum /mnt/onprem.sql
- Exit the ml-db container
Below step copies the mysqldump from container to host's file system in present working directory. You can specify other location by replacing '.' at the end.
- docker cp ml-db:/mnt/onprem.sql
- docker exec -it ml-tm nohup service javaproxy start
For Mashery Local 4.2.0 or later, root can generate mysqldump in the Slave or Master Instance under /mnt/dump/ folder.
Because proxy service needs to be stopped when mysqldump is being generated, this Master/Slave Instance cannot handle traffic.
- docker exec -it ml-tm nohup service javaproxy stop
-
- docker exec -it ml-db /bin/bash
- mysqldump -u masherybackup -p'password_for_masherybackup'--opt --dump-slave --single-transaction onprem > /mnt/dump/onprem.sql
- md5sum /mnt/dump/onprem.sql
- Exit the ml-db container
Below step copies the mysqldump from container to host's file system in present working directory. You can specify other location by replacing '.' at the end
- docker cp ml-db:/mnt/dump/onprem.sql.
- docker exec -it ml-tm nohup service javaproxy start
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" (login into ml-db container first):
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: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, root can copy mysqldump from remote host.If you are using Docker-Machine, make sure your are talking to the right one. Execute the command docker-machine ls to find which one is currently active. It is also recommended to always redo the command:
eval "$(docker-machine env <docker machine name>)"
For Mashery Local 4.2.0 or later, root can copy mysqldump from remote host: Verify the checksum of mysqldump file (Login into ml-db container:md5sum /mnt/dump/onprem.sql
Stop "proxy" service:docker exec -it ml-tm nohup service javaproxy stop
Import mysqldump:mysql -u masheryonprem -p'password_for_masheryonprem' onprem < /mnt/dump/onprem.sql
After importing is done, restart MySQL:service mysqld restart
Start "proxy" service:docker exec -it ml-tm nohup service javaproxy start
-
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:
docker exec -it ml-tm nohup service javaproxy stop
-
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: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 user can copy mysqldump from remote host.If you are using Docker-Machine, make sure you are talking to the right one. Execute the command docker-machine ls to find which one is currently active. It is also recommended to always redo the command:
eval "$(docker-machine env <docker machine name>)"
For Mashery Local 4.2.0 or later, root can copy mysqldump from remote host: Verify the checksum of mysqldump file (Login into ml-db container) :md5sum /mnt/dump/onprem.sql
Stop "proxy" service:docker exec -it ml-tm nohup service javaproxy stop
Import mysqldump:mysql -u masheryonprem -p'password_for_masheryonprem' onprem < /mnt/dump/onprem.sql
After importing is done, restart MySQL:service mysqld restart
Start "proxy" service:docker exec -it ml-tm nohup service javaproxy start
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:
docker exec -it ml-tm nohup service javaproxy start
-
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.