3.1. Deploying Standalone HA Clusters

Within a Primary/Replica service, there is a single Primary which replicates data to the Replicas. The Tungsten Connector handles connectivity by the application and distributes the load to the datasources in the dataservice.

Figure 3.1. Topologies: Standalone HA Cluster

Topologies: Standalone HA

3.1.1. Prepare: Standalone HA Cluster

Before continuing with the deployment you will need the following:

  1. The name to use for the cluster.

  2. The list of datasources in the cluster. These are the servers which will be running MySQL.

  3. The list of servers that will run the connector.

  4. The username and password of the MySQL replication user.

  5. The username and password of the first application user. You may add more users after installation.

All servers must be prepared with the proper prerequisites. See Appendix B, Prerequisites for additional details.

3.1.2. Install: Standalone HA 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-6.1.25-6.tar.gz
  2. Change to the Tungsten Cluster directory:

    shell> cd tungsten-clustering-6.1.25-6
  3. Create the /etc/tungsten/tungsten.ini using the example below as a template. 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=~/.bash_profile
    replication-user=tungsten
    replication-password=password
    replication-port=13306
    application-user=app_user
    application-password=secret
    application-port=3306
    rest-api-admin-user=apiuser
    rest-api-admin-password=secret
    install=true
    connector-rest-api-address=0.0.0.0
    manager-rest-api-address=0.0.0.0
    replicator-rest-api-address=0.0.0.0
    
    [alpha]
    topology=clustered
    master=host1
    members=host1,host2,host3
    connectors=host4
    

    Configuration group defaults

    The description of each of the options is shown below; click the icon to hide this detail:

    Click the icon to show a detailed description of each argument.

    Configuration group alpha

    The description of each of the options is shown below; click the icon to hide this detail:

    Click the icon to show a detailed description of each argument.

    Run tpm to validate the installation. Providing no errors are return, you can then continue to install the software.

    shell > ./tools/tpm validate
    shell > ./tools/tpm install

    During the validation, startup and installation, tpm will notify you of any problems that need to be fixed before the service can be correctly installed and started.

  4. Initialize your PATH and environment.

    shell > source /opt/continuent/share/env.sh

  5. If you supplied start-and-report=true the software will be running, if this wasn't included, you can now start the software as follows:

    shell > startall

Important

Do not include start-and-report if you are taking over for MySQL native replication. See Section 3.9.1, “Migrating from MySQL Native Replication 'In-Place'” for next steps after completing installation.

For Best Practices, follow the guidelines in Section 2.4, “Best Practices”.