3.8. Deploying Tungsten Connector Only

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 Continuent Tungsten on only the connector host. Failure to configure in this way, and tpm will install a full Continuent Tungsten service across all the implied members of the cluster.

Installation can be configured using the staging directory method of tpm as follows:

  1. On your staging server, download the release package.

  2. Unpack the release package:

    shell> tar zxf continuent-tungsten-4.0.7-111.tar.gz
  3. Change to the unpackaged directory:

    shell> cd continuent-tungsten4.0.7-111
  4. shell> ./tools/tpm configure alpha 
         --user=tungsten
         --install-directory=/opt/continuent 
         --replication-port=13306
         --application-port=3306
         --application-user=app_user 
         --application-password=password 
         --mysql-connectorj-path=/usr/share/java/mysql-connector-java-bin.jar 
         --members=host1,host2,host3 
         --connectors=`hostname`

    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 Continuent Tungsten configuration. The values above are identical to those used in Section 3.1, “Deploying a Master/Slave Cluster” deployment.

  5. Now execute the installation, only installing the service on the current host, again using hostname:

    shell> ./tools/tpm install --hosts=`hostname`
    #####################################################################
    # Next Steps
    #####################################################################
    Unless automatically started, you must start the Tungsten services before the 
    cluster will be available.  Use the tpm command to start the services:
    
      tools/tpm start  --hosts=connector2
    
    Wait a minute for the services to start up and configure themselves.  After 
    that you may proceed.
    
    Once your services start successfully you may begin to use the cluster.
    To look at services and perform administration, run the following command
    from any database server.
    
      $CONTINUENT_ROOT/tungsten/tungsten-manager/bin/cctrl
    
    Configuration is now complete.  For further information, please consult
    Tungsten documentation, which is available at docs.continuent.com.
    
    NOTE  >> Command successfully completed

    If the installation process fails, check the output of the /tmp/tungsten-configure.log file for more information about the root cause.

  6. Start the connector service:

    shell> ./tools/tpm start alpha --hosts=connector

When using the INI file method of deployment, create a file containing the list of members, listing the current host as the only connector:

  1. Download and extract the Continuent Tungsten distribution, and change into the distribution directory. See Section 2.3, “Deployment Sources” for more information.

  2. Create the INI file /etc/tungsten/tungsten.ini with the following contents:

    [defaults]
    application-password=password
    application-user=app_user
    install-directory=/opt/continuent
    replication-port=13306
    user=tungsten
    
    [alpha]
    connectors=connector
    master=host1
    members=host2,host2,host3
  3. Install the connector:

    shell> ./tools/tpm install
  4. Start the connector:

    shell> ./tools/tpm 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 Continuent Tungsten of the standalone connector. The standalone must be updated independently of the remainder of the Continuent Tungsten 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 6.5, “User Authentication”