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:

There are two types of installation, either via a Staging Install, or via an ini file install.

To understand the differences between these two installation methods, see Section 10.1, “Comparing Staging and INI tpm Methods”

Regardless of which installation method you choose, the steps are the same, and are outlined below

  • Install the Tungsten Replicator package (see Section 2.1.2, “Using the RPM and DEB package files”), or download the compressed tarball and unpack it, either on the source host, or on the staging host:

    shell> cd /opt/continuent/software
    shell> tar zxf tungsten-replicator-5.0.1-136.tar.gz
  • Change to the Tungsten Replicator staging directory:

    shell> cd tungsten-replicator-5.0.1-136
  • Configure the replicator (In this example, the service name is alpha)

    Click the link below to switch examples between Staging and INI methods

    Show Staging

    Show INI

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

    Configuration group alpha

    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.

  • Once the prerequisites and configuring of the installation has been completed, the software can be installed:

    shell> ./tools/tpm install

In the above example, --datasource-mysql-conf, is optional and is can be used if the MySQL configuration file cannot be located by tpm, or is in a non-default location

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.6, “Starting and Stopping Tungsten Replicator”; configuring init scripts to startup and shutdown when the system boots and shuts down, see Section 2.7, “Configuring Startup on Boot”.