An independent Tungsten Connector installation can be useful when you want to create a connector service that provides HA and load balancing, but which operates independently of the main cluster. Specifically, this solution is used within disaster recovery and multi-site operations where the connector may be operating across site-boundaries independently of the dataservice at each site.
The independent nature is in terms of the configuration of the overall service through tpm; an independent connector configured to communicate with existing cluster hosts will be managed by the managers of the cluster. But, the connector will not be updated when performing a tpm update operation within the configured cluster. This allows the connector to work through upgrade procedures to minimize downtime.
To create an independent connector, tpm is used to create a definition for a cluster including the datasources, and specifying only a single connector host, then installing Tungsten Cluster on only the connector host. Failure to configure in this way, and tpm will install a full Tungsten Cluster service across all the implied members of the cluster.
Install the Tungsten Cluster package or download the Tungsten Cluster tarball, and unpack it:
shell>cd /opt/continuent/software
shell>tar zxf
tungsten-clustering-6.1.25-6.tar.gz
Change to the Tungsten Cluster directory:
shell> cd tungsten-clustering-6.1.25-6
Run tpm to perform the installation, using either the staging
method or the INI method. Review Section 10.1, “Comparing Staging and INI
tpm Methods”
for more details on these two methods.
Click the link below to switch examples between Staging and INI methods
shell>./tools/tpm configure defaults \ --reset \ --user=tungsten \ --profile-script=~/.bashrc \ --application-user=app-_user \ --application-password=secret \ --application-port=3306 \ --replication-port=13306 \ --install-directory=/opt/continuent
shell>./tools/tpm configure alpha \ --connectors=connectorhost1 \ --master=host1 \ --members=host1,host2,host3
shell> vi /etc/tungsten/tungsten.ini
[defaults] user=tungsten profile-script=~/.bashrc application-user=app-_user application-password=secret application-port=3306 replication-port=13306 install-directory=/opt/continuent
[alpha] connectors=connectorhost1 master=host1 members=host1,host2,host3
Configuration group defaults
The description of each of the options is shown below; click the icon to hide this detail:
For staging configurations, deletes all pre-existing configuration information between updating with the new configuration values.
System User
Append commands to include env.sh in this profile script
Database username for the connector
Database password for the connector
Port for the connector to listen on
The network port used to connect to the database server. The default port used depends on the database being configured.
--install-directory=/opt/continuent
install-directory=/opt/continuent
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.
Configuration group alpha
The description of each of the options is shown below; click the icon to hide this detail:
Hostnames for the dataservice connectors
The hostname of the primary (extractor) within the current service.
Hostnames for the dataservice members
The above creates a configuration specifying the datasources,
host{1,2,3}
, and a single
connector host based on the hostname of the installation host. Note that
the application and datasource port configuration are the same as
required by a typical Tungsten Cluster configuration. The values above are
identical to those used in Section 3.1, “Deploying Standalone HA Clusters”
deployment.
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
Start the connector service:
shell> connector start
Once started:
The connector will appear, and be managed by, any manager host using the cctrl tool. For example:
[LOGICAL] /dsone > ls
COORDINATOR[host1:AUTOMATIC:ONLINE]
ROUTERS:
+----------------------------------------------------------------------------+
|connector@connector2[16019](ONLINE, created=0, active=0) |
|connector@host1[18450](ONLINE, created=19638, active=0) |
|connector@host2[1995](ONLINE, created=0, active=0) |
|connector@host3[8895](ONLINE, created=0, active=0) |
+----------------------------------------------------------------------------+
...
The active status of the connector can be monitored using cctrl as normal.
Updates to the main cluster will not update the Tungsten Cluster of the standalone connector. The standalone must be updated independently of the remainder of the Tungsten Cluster dataservice.
Connector can be accessed using the connector host and specified port:
shell> mysql -utungsten -p -hconnector -P3306
The user.map
authorization file must be created and
managed separately on standalone connectors. For more information, see
Section 7.6, “User Authentication”