8.15.2. Upgrading Tungsten Replicator using tpm

To upgrade an existing installation on Tungsten Replicator, the new distribution must be downloaded and unpacked, and the included tpm command used to update the installation. The upgrade process implies a small period of downtime for the cluster as the updated versions of the tools are restarted, but downtime is deliberately kept to a minimum, and the cluster should be in the same operation state once the upgrade has finished as it was when the upgrade was started.

The method for the upgrade process depends on whether ssh access is available with tpm. If ssh access has been enabled, use the method in Upgrading with ssh Access. If ssh access has not been configured, use Upgrading without ssh Access

Upgrading with ssh Access

To perform an upgrade of an entire cluster, where you have ssh access to the other hosts in the cluster:

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

  2. Unpack the release package:

    shell> tar zxf tungsten-replicator-5.0.0-0.tar.gz
  3. Change to the unpackaged directory:

    shell> cd tungsten-replicator-5.0.0-0
  4. Fetch a copy of the existing configuration information:

    shell> ./tools/tpm fetch --hosts=host1,host2,host3,autodetect --user=tungsten --directory=/opt/continuent

    Important

    You must use the version of tpm from within the staging directory (./tools/tpm) of the new release, not the tpm installed with the current release.

    The fetch command to tpm supports the following arguments:

    • --hosts

      A comma-separated list of the known hosts in the cluster. If autodetect is included, then tpm will attempt to determine other hosts in the cluster by checking the configuration files for host values.

    • --user

      The username to be used when logging in to other hosts.

    • --directory

      The installation directory of the current Tungsten Replicator installation. If autodetect is specified, then tpm will look for the installation directory by checking any running Tungsten Replicator processes.

    The current configuration information will be retrieved to be used for the upgrade:

    shell> ./tools/tpm fetch --hosts=host1,host2,host3 --directory=/opt/continuent --user=tungsten
    ..
    NOTE  >> Configuration loaded from host1,host2,host3
  5. Optionally check that the current configuration matches what you expect by using tpm reverse:

    shell> ./tools/tpm reverse
    # Options for the alpha data service
    tools/tpm configure alpha \
    --enable-slave-thl-listener=false \
    --install-directory=/opt/continuent \
    --master=host1 \
    --members=host1,host2,host3 \
    --replication-password=password \
    --replication-user=tungsten \
    --start=true
  6. Run the upgrade process:

    shell> ./tools/tpm update

    Note

    During the update process, tpm may report errors or warnings that were not previously reported as problems. This is due to new features or functionality in different MySQL releases and Tungsten Replicator updates. These issues should be addressed and the update command re-executed.

    A successful update will report the cluster status as determined from each host in the cluster:

    shell> ./tools/tpm update
    .....................
    
    #####################################################################
    # Next Steps
    #####################################################################
    Once your services start successfully replication will begin.
    To look at services and perform administration, run the following command
    from any database server.
    
    $CONTINUENT_ROOT/tungsten/tungsten-replicator/bin/trepctl services
    
    Configuration is now complete.  For further information, please consult
    Tungsten documentation, which is available at docs.continuent.com.
    
    NOTE  >> Command successfully completed

The update process should now be complete. The current version can be confirmed by using trepctl status.

Upgrading without ssh Access

To perform an upgrade of an individual node, tpm can be used on the individual host. The same method can be used to upgrade an entire cluster without requiring tpm to have ssh access to the other hosts in the replicator service.

To upgrade all the hosts within a replicator service using this method:

  1. Upgrade the configured slaves in the replicator service first

  2. Switch the current master to one of the upgraded slaves, using the method shown in Section 8.11, “Switching Master Hosts”

  3. Upgrade the master

  4. Switch the master back to the original master, using the method shown in Section 8.11, “Switching Master Hosts”

For more information on performing maintenance across a cluster, see Section 8.13.3, “Performing Maintenance on an Entire Dataservice”.

To upgrade a single host with tpm:

  1. Download the release package.

  2. Unpack the release package:

    shell> tar zxf tungsten-replicator-5.0.0-0.tar.gz
  3. Change to the unpackaged directory:

    shell> cd tungsten-replicator-5.0.0-0
  4. Execute tpm update, specifying the installation directory. This will update only this host:

    shell> ./tools/tpm update --directory=/opt/continuent
    NOTE  >> Configuration loaded from host1
    .
    
    #####################################################################
    # Next Steps
    #####################################################################
    Once your services start successfully replication will begin.
    To look at services and perform administration, run the following command
    from any database server.
    
    $CONTINUENT_ROOT/tungsten/tungsten-replicator/bin/trepctl services
    
    Configuration is now complete.  For further information, please consult
    Tungsten documentation, which is available at docs.continuent.com.
    
    NOTE  >> Command successfully completed

To update all of the nodes within a cluster, the steps above will need to be performed individually on each host.