Skip to main content
Tungsten Clustering

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.

  1. Install the Tungsten Cluster package or download the Tungsten Cluster tarball, and unpack it:

    shell> cd /opt/continuent/software
    shell> tar zxf tungsten-clustering-8.0.4-132.tar.gz
  2. Change to the Tungsten Cluster directory:

    shell> cd tungsten-clustering-8.0.4-132
  3. 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.

    Example 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=connector2
    master=host1
    members=host1,host2,host3
    Show argument definitions
    user=tungstenOS System User, for example tungsten. DO NOT use root.
    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.
    rest-api-admin-user=apiuserSpecify the initial Admin Username for API access.Available from v7.0.0
    rest-api-admin-password=secretSpecify the initial Admin User Password for API access. rest-api-admin-password alias only available from version 7.1.2 onwards.Available from v7.0.0
    From v7.0.0

    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

    From v7.2.0 the alias rest-api-admin-password can 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.

  4. 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.

  5. Initialize your PATH and environment.

    shell > source /opt/continuent/share/env.sh
  6. 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 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 -P3306
  • If using proxy mode, the user.map authorization file must be created and managed separately on standalone connectors. For more information, see "User Authentication"