10.2. Processing Installs and Upgrades

The tpm command is designed to coordinate the deployment activity across all hosts in a dataservice. This is done by completing a stage on all hosts before moving on. These operations will happen on each host in parallel and tpm will wait for the results to come back before moving on.

  • Copy deployment files to each server

    At this stage, only the tpm command is copied over so we can run validation checks locally on each machine.

    The configuration is also transferred to each server and checked for completeness. This will run some commands to make sure that we have all of the settings needed to run a full validation.

  • Validate the configuration settings

    Each host will validate the configuration based on validation classes. This will do things like check file permissions and database credentials. If errors are found during this stage, they will be summarized and the script will exit.

    #####################################################################
    # Validation failed
    #####################################################################
    #####################################################################
    # Errors for host3
    #####################################################################
    ERROR >> host3 >> Password specified for app@% does not match the running instance on »
       tungsten@host3:13306 (WITH PASSWORD). This may indicate that the user has a password »
       using the old format. (MySQLConnectorPermissionsCheck)
    #####################################################################
    # Errors for host2
    #####################################################################
    ERROR >> host2 >> Password specified for app@% does not match the running instance on »
       tungsten@host2:13306 (WITH PASSWORD). This may indicate that the user has a password »
       using the old format. (MySQLConnectorPermissionsCheck)
    #####################################################################
    # Errors for host1
    #####################################################################
    ERROR >> host1 >> Password specified for app@% does not match the running instance on »
       tungsten@host1:13306 (WITH PASSWORD). This may indicate that the user has a password »
       using the old format. (MySQLConnectorPermissionsCheck)

    At this point you should verify the configuration settings and retry the tpm install command. Any errors found during this stage may be skipped by running tpm configure alpha --skip-validation-check=MySQLConnectorPermissionsCheck. When re-running the tpm install command this check will be bypassed.

  • Deploy and write configuration files

    If validation is successful, we will move on to deploying and writing the actual configuration files. The tpm command uses a JSON file that summarizes the configuration. The Tungsten processes use many different files to store the configuration and tpm is responsible for writing them.

    The /opt/continuent/releases directory will start to collect multiple directories after you have run multiple upgrades. We keep the previous versions in case a downgrade is needed or for review at a later date. If your upgrade has been successful, you can remove old directories. Make sure you do not remove the directory that is linked to by the /opt/continuent/tungsten symlink.

    Note

    Do not change configuration files by hand. This will cause future updates to fail. One of the validation checks compares the file that tpm written with the current file. If there are differences, validation will fail.

    This is done to make sure that any configuration changes made by hand are not wiped out without giving you a chance to save them. You can run tpm query modified-files to see what, if any, changes have been made.

  • Start Tungsten services

    After the installation is fully configured, the tpm command will start services on all of the hosts if the tpm option --start was set. This process is slightly different depending on if you are doing a clean install or and upgrade.

    • Install

      1. Check if --start or --start-and-report were provided in the configuration

      2. Start the Tungsten Replicator and Tungsten Manager on all hosts

      3. Wait for the Tungsten Manager to become responsive

      4. Start the Tungsten Connector on all hosts

    • Upgrade

      1. Put all dataservices into MAINTENANCE mode

      2. Stop the Tungsten Replicator and Tungsten Manager on all nodes

      3. Start the Tungsten Replicator and Tungsten Manager on all hosts if the services were previously running

      4. Wait for the Tungsten Manager to become responsive

      5. Stop the old Tungsten Connector and Start the new Tungsten Connector on all hosts. This step is done one host at a time so that there is always one Tungsten Connector running. If --no-connectors was provided on the command line then this will not occur. You must go to each server running Tungsten Connector and run tpm promote-connector.