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.
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
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:
tar zxf tungsten-replicator-
Change to the Tungsten Replicator staging directory:
Configure the replicator (In this example, the service name is alpha)
Click the link below to switch examples between Staging and INI methods
./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 \ --start-and-report=true
[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 start-and-report=true
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.
Replication topology for the dataservice Valid values are star,cluster-slave,master-slave,fan-in,clustered,cluster-alias,all-masters,direct
The hostname of the master (extractor) within the current service. If the current host does not match this specification, then the deployment willby default be configured as a master/extractor.
Hostnames for the dataservice members
Path to the directory where the active deployment will be installed. The configured directory will contain the software, THL and relay log information unless configured otherwise.
For databases that required authentication, the username to use when connecting to the database using the corresponding connection method (native, JDBC, etc.).
The password to be used when connecting to the database using
MySQL config file
Start the services and report out the status after configuration
Once the prerequisites and configuring of the installation has been completed, the software can be installed:
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”.