Deploying a Standalone Tungsten Connector
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/softwareshell> tar zxf tungsten-clustering-8.0.4-132.tar.gzChange to the Tungsten Cluster directory:
shell> cd tungsten-clustering-8.0.4-132Create the
/etc/tungsten/tungsten.iniusing 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 theconnectorsentry associated with the service that the connector is to be associated with. Once created to suit your needs, run thetpmto perform the installation.Example tungsten.ini[defaults]user=tungsteninstall-directory=/opt/continuentprofile-script=~/.bashrcapplication-user=app-userapplication-password=secretapplication-port=3306replication-port=13306rest-api-admin-user=apiuserrest-api-admin-password=secret[alpha]connectors=connector2master=host1members=host1,host2,host3Show argument definitions
user=tungstenOS System User, for example tungsten. DO NOT use root.install-directory=/opt/continuentInstallation directory.profile-script=~/.bashrcAppend commands to include env.sh in this profile script.application-user=app-userDatabase username for the connector.application-password=secretDatabase password for the connector.application-port=3306Port for the connector to listen on.replication-port=13306Database network port.rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0rest-api-admin-password=secretSpecify the initial Admin User Password for API access.rest-api-admin-passwordalias only available from version 7.1.2 onwards.Available from v7.0.0From v7.0.0If 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=tungstenrest-api-admin-pass=secretFrom v7.2.0 the alias
rest-api-admin-passwordcan also be used.The above creates a configuration specifying the datasources,
host3, 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 "Deploying a Standalone HA Cluster" deployment.Run
tpmto install the software with the configuration.shell > ./tools/tpm installDuring the startup and installation,
tpmwill 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.shStart the connector service:
shell> connector start
Once started:
The connector will appear, and be managed by, any manager host using the
cctrltool. For example:[LOGICAL] /dsone > lsCOORDINATOR[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
cctrlas normal.Updates to the main cluster will not update the Tungsten Cluster of the standalone connector. The standalone connector 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 -hconnector2 -P3306If using proxy mode, the
user.mapauthorization file must be created and managed separately on standalone connectors. For more information, see "User Authentication"