Within a master/slave service, there is a single master which replicates data to the slaves. The Tungsten Connector handles connectivity by the application and distributes the load to the datasources in the dataservice.
Before continuing with deployment you will need the following:
The name to use for the cluster.
The list of datasources in the cluster. These are the servers which will be running MySQL.
The list of servers that will run the connector.
The username and password of the MySQL replication user.
The username and password of the first application user. You may add more users after installation.
All servers must be prepared with the proper prerequisites. See Section 2.6, “Prepare Hosts” and Appendix B, Prerequisites for additional details.
Staging Configuration - Section 3.1.2.1, “Installing a Master/Slave Cluster (Staging Use Case)”
INI Configuration - Section 3.1.2.2, “Installing a Master/Slave Cluster (INI Use Case)”
Install the Tungsten Clustering package or download the Tungsten Clustering tarball, and unpack it:
shell>cd /opt/continuent/software
shell>tar zxf
tungsten-clustering-5.3.6-24.tar.gz
Change to the Tungsten Clustering directory:
shell> cd tungsten-clustering5.3.6-24
Run tpm to perform the installation. This method assumes you are using the Section 9.3, “tpm Staging Configuration” method:
shell> ./tools/tpm install alpha \
--user=tungsten \
--install-directory=/opt/continuent \
--members=host1,host2,host3 \
--connectors=host1,host2,host3 \
--master=host1 \
--replication-user=tungsten \
--replication-password=password \
--replication-port=13306 \
--application-user=app_user \
--application-password=password \
--application-port=3306 \
--start-and-report=true \
--profile-script=~/.bash_profile
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.
This runs the tpm command.
install
indicates that we are
installing and creating a new dataservice, and
alpha
is the name and
identity of the dataservice being created.
The operating system user name that you have created for the
Tungsten service,
tungsten
.
--install-directory=/opt/continuent
The installation directory of the Tungsten service. This is where the service will be installed on each server in your dataservice.
A comma separated list of all the hosts that are part of this dataservice.
--connectors=host1,host2,host3
A comma separated list of the hosts that will have a connector service created on them.
The hostname of the server that will be the master MySQL server.
--dataservice-witnesses=witness
The hostname of a computer that will be contacted using ping in the event of a network problem.
The MySQL user name to use when connecting to the MySQL database.
--replication-password=password
The MySQL password for the user that will connect to the MySQL database.
The TCP/IP port that the MySQL database is listening on for connections.
The application user name.
--application-password=password
The application password.
The TCP/IP port on which to listen for incoming connections by the Tungsten connector service. To emulate the standard MySQL database service, port 3306 is used.
Tells tpm to startup the service, and report the current configuration and status.
Tells tpm to add PATH information to the script to initialize the environment.
Do not include start-and-report
if you are taking over for MySQL native replication. See
Section 3.9.1, “Migrating from MySQL Native Replication 'In-Place'” for next steps
after completing installation.
Run tpm to install the software with the configuration.
shell > ./tools/tpm install
During the startup and installation, tpm will notify you of any problems that need to be fixed before the service can be correctly installed and started. If the service starts correctly, you should see the configuration and current status of the service.
Initialize your PATH
and environment.
shell > source /opt/continuent/share/env.sh
Install the Tungsten Clustering™ package
(.rpm
), or download the compressed tarball and
unpack it:
shell>cd /opt/continuent/software
shell>tar zxf
tungsten-clustering-5.3.6-24.tar.gz
Change to the Tungsten Clustering directory:
shell> cd tungsten-clustering5.3.6-24
Create /etc/tungsten/tungsten.ini
with the
configuration. Replace host4
with the connector system's full hostname.
[defaults]
user=tungsten
install-directory=/opt/continuent
replication-user=tungsten
replication-password=password
replication-port=13306
application-user=app_user
application-password=secret
application-port=3306
start-and-report=true
profile-script=~/.bash_profile
[alpha]
topology=clustered
members=host1,host2,host3
connectors=host4
master=host1
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.
[alpha]
alpha
is the name and
identity of the dataservice being created.
The operating system user name that you have created for the
Tungsten service,
tungsten
.
install-directory=/opt/continuent
The installation directory of the Tungsten service. This is where the service will be installed on each server in your dataservice.
A comma separated list of all the database hosts that are part of this dataservice.
A comma separated list of the hosts that have a connector
service created on them. The
connectors
option does not need
to include all other connectors, but must include the full
hostname for the local server.
The hostname of the server that will be the initial master MySQL server.
The MySQL user name to use when connecting to the MySQL database.
The MySQL password for the user that will connect to the MySQL database.
The TCP/IP port that the MySQL database is listening on for connections.
The application user name.
The application password.
The TCP/IP port on which to listen for incoming connections by the Tungsten connector service. To emulate the standard MySQL database service, port 3306 is used.
Tells tpm to startup the service, and report the current configuration and status.
Tells tpm to add PATH information to the script to initialize the environment.
See Section 9.4, “tpm INI File Configuration” for more information.
Do not include start-and-report
if you are taking over for MySQL native replication. See
Section 3.9.1, “Migrating from MySQL Native Replication 'In-Place'” for next steps
after completing installation.
Run tpm to install the software with the INI-based configuration:
shell > ./tools/tpm install
During the startup and installation, tpm will
notify you of any problems that need to be fixed before the service
can be correctly installed and started. If
start-and-report
is set and the
service starts correctly, you should see the configuration and
current status of the service.
Initialize your PATH
and environment.
shell > source /opt/continuent/share/env.sh