Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

CHW instance is a replicated set up.mysql replication has to be set up.
Bahmni-environment has a task to set up replication
This step needs manual intervention and is not automated in our CI set up.

Steps to Configure master:
1.Go to Master box.
2.sudo su root.
3. go to /packages/build/bahmni-environment/mysql-replication/v5.6
4.Update replication.properties with the master and slave host ip address.

   Instead add aliases to /etc/hosts file

On Master db

{{slave_db_ip}} bahmni-passive-db

5.Run the master.sh

6.Note down the log pos and log file.
7.login to mysql and check the master status
show master status;

Steps to configure Slave.
1.login to Save box
2.sudo su root
3. go to /packages/build/bahmni-environment/mysql-replication/v5.6
4.Update replication.properties with the master and slave host ip address.

Instead add aliases to /etc/hosts file

OnSlave db

{{master_db_ip}} bahmni-db

5.Update the log file and log pos values noted down on master on replication.properties
6.Copy the dump file from master onto slave
scp bdshr@master-db-ip:/packages/build/bahmni-environment/mysql-replication/v5.6/mysql_master_dump.db /tmp

On prod, copy the dump from master to CI and from CI to slave

On CI box, copy from master

scp bdshr@master-db-ip:/packages/build/bahmni-environment/mysql-replication/v5.6/mysql_master_dump.db /tmp

On CI box, copy to slave
scp /tmp/mysql_master_dump.db bdshr@slave-db-ip:/tmp

Delete the dump on CI box.

rm /tmp/mysql_master_dump.db

7.run slave.sh
8.login to mysql and check the slave status
show slave status;

  • No labels