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-7.1.4-10.tar.gz
Change to the Tungsten Cluster directory:
shell> cd tungsten-clustering-7.1.4-10
Create the /etc/tungsten/tungsten.ini
using the example below
as a template, however, ideally use a copy of the file from your existing cluster
to ensure consistency of hostnames and configuration, then simply add the new connector
hostname into the connectors
entry associated
with the service that the connector is to be associated with. Once created to suit your
needs, run the tpm to perform the installation.
shell> vi /etc/tungsten/tungsten.ini
[defaults] user=tungsten install-directory=/opt/continuent profile-script=~/.bashrc application-user=app-user application-password=secret application-port=3306 replication-port=13306 rest-api-admin-user=apiuser rest-api-admin-password=secret
[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:
System User
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.
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.
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
If you plan to make full use of the REST API (which is enabled by default) you will need to also configure a username and password for API Access. This must be done by specifying the following options in your configuration:
rest-api-admin-user=tungsten rest-api-admin-pass=secret
For more information on using and configuring the REST API, see Section 11.1, “Getting Started with Tungsten REST API”
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
If using proxy mode, the user.map
authorization file must be created and
managed separately on standalone connectors. For more information, see
Section 7.6, “User Authentication”