3.3.2. Install: Multi-Site/Active-Active Clusters

Note

The procedures in this section are designed for the Multi-Site/Active-Active topology ONLY. Do NOT use these procedures for Composite Active/Active Clustering using v6 onwards.

For version 6.x onwards, Composite Active/Active Clustering, please refer to Section 3.4, “Deploying Composite Active/Active Clusters”

Creating the configuration requires two distinct steps, the first to create the two Tungsten Cluster deployments, and a second that creates the Tungsten Replicator configurations on different network ports, and different install directories.

  1. Install the Tungsten Cluster and Tungsten Replicator packages or download the tarballs, and unpack them:

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

    shell> cd tungsten-clustering-7.1.3-3
  3. Run tpm to configure the installation. This method assumes you are using the Section 10.3, “tpm Staging Configuration” method:

    Click the link below to switch examples between Staging and INI methods

    For ini install, the ini file contains all the configuration for both the cluster deployment and the replicator deployment.

    For a staging install, you first use the cluster configuration show below and then configure the replicator as a separate process. These additional steps are outlined below

    Show Staging

    Show INI

    shell> ./tools/tpm configure defaults \
        --reset \
        --user=tungsten \
        --install-directory=/opt/continuent \
        --replication-user=tungsten \
        --replication-password=secret \
        --replication-port=3306 \
        --profile-script=~/.bashrc \
        --application-user=app_user \
        --application-password=secret \
        --skip-validation-check=MySQLPermissionsCheck \
        --rest-api-admin-user=apiuser \
        --rest-api-admin-pass=secret
    
    
    shell> ./tools/tpm configure east \
        --topology=clustered \
        --connectors=east1,east2,east3 \
        --master=east1 \
        --members=east1,east2,east3
    
    shell> ./tools/tpm configure west \
        --topology=clustered \
        --connectors=west1,west2,west3 \
        --master=west1 \
        --members=west1,west2,west3
    
    shell> vi /etc/tungsten/tungsten.ini
    [defaults]
    user=tungsten
    install-directory=/opt/continuent
    replication-user=tungsten
    replication-password=secret
    replication-port=3306
    profile-script=~/.bashrc
    application-user=app_user
    application-password=secret
    skip-validation-check=MySQLPermissionsCheck
    rest-api-admin-user=apiuser
    rest-api-admin-pass=secret
    
    [defaults.replicator]
    home-directory=/opt/replicator
    rmi-port=10002
    executable-prefix=mm
    
    [east]
    topology=clustered
    connectors=east1,east2,east3
    master=east1
    members=east1,east2,east3
    
    [west]
    topology=clustered
    connectors=west1,west2,west3
    master=west1
    members=west1,west2,west3
    
    [east_west]
    topology=cluster-slave
    master-dataservice=east
    slave-dataservice=west
    thl-port=2113
    
    [west_east]
    topology=cluster-slave
    master-dataservice=west
    slave-dataservice=east
    thl-port=2115
    

    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 defaults.replicator

    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 east

    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 west

    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 east_west

    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 west_east

    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.

    Note

    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

    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.

  4. Change to the Tungsten Replicator directory:

    shell> cd tungsten-replicator-7.1.3-3
  5. Run tpm to configure the installation. This method assumes you are using the Section 10.3, “tpm Staging Configuration” method:

  6. If you are running a staging install, first configure the replicator using the following example, if configuring using an ini file, skip straight to the install step below

    shell> ./tools/tpm configure defaults \
        --reset \
        --user=tungsten \
        --install-directory=/opt/replicator \
        --replication-user=tungsten \
        --replication-password=secret \
        --replication-port=3306 \
        --profile-script=~/.bashrc \
        --application-user=app_user \
        --application-password=secret \
        --skip-validation-check=MySQLPermissionsCheck \
        --rmi-port=10002 \
        --executable-prefix=mm \
        --thl-port=2113 \
        --rest-api-admin-user=apiuser \
        --rest-api-admin-pass=secret
    
    shell> ./tools/tpm configure east \
        --topology=clustered \
        --connectors=east1,east2,east3 \
        --master=east1 \
        --members=east1,east2,east3
    
    shell> ./tools/tpm configure west \
        --topology=clustered \
        --connectors=west1,west2,west3 \
        --master=west1 \
        --members=west1,west2,west3
    
    shell> ./tools/tpm configure east_west \
        --topology=cluster-slave \
        --master-dataservice=east \
        --slave-dataservice=west \
        --thl-port=2113
    
    shell> ./tools/tpm configure west_east \
        --topology=cluster-slave \
        --master-dataservice=west \
        --slave-dataservice=east \
        --thl-port=2115
    
  7. 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.

  8. Initialize your PATH and environment.

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

The Multi-Site/Active-Active clustering should be installed and ready to use.