3.1. Deploying a Master/Slave Topology

Master/slave is the simplest and most straightforward of all replication scenarios, and also the basis of all other types of topology. The fundamental basis for the master/slave topology is that changes in the master are distributed and applied to the each of the configured slaves.

Figure 3.1. Topologies: Master/Slave

Topologies: Master/Slave

tpm includes a specific topology structure for the basic master/slave configuration, using the list of hosts and the master host definition to define the master/slave relationship. Before starting the installation, the prerequisites must have been completed (see Appendix B, Prerequisites). To create a master/slave using tpm:

shell> ./tools/tpm install alpha\
    --topology=master-slave \
    --master=host1 \
    --replication-user=tungsten \
    --replication-password=password \
    --install-directory=/opt/continuent \
    --members=host1,host2,host3 \
    --start

The description of each of the options is shown below; click the icon to hide this detail:

Click the icon to show a detailed description of each argument.

If the MySQL configuration file cannot be located, the --datasource-mysql-conf option can be used to specify it's location:

shell> ./tools/tpm install alpha\
    --topology=master-slave \
    --master=host1 \
    --replication-user=tungsten \
    --replication-password=password \
    --datasource-mysql-conf=/etc/mysql/my.cnf \
    --install-directory=/opt/continuent \
    --members=host1,host2,host3 \
    --start

If the installation process fails, check the output of the /tmp/tungsten-configure.log file for more information about the root cause.

Once the installation has been completed, the service will be started and ready to use. For information on checking the running service, see Section 3.1.1, “Monitoring a Master/Slave Dataservice”.

For information on starting and stopping Tungsten Replication see Section 2.5, “Starting and Stopping Tungsten Replicator”; configuring init scripts to startup and shutdown when the system boots and shuts down, see Section 2.6, “Configuring Startup on Boot”.