5.2.2. Install Elasticsearch Applier

Installation of the Elasticsearch replication requires special configuration of the master and slave hosts so that each is configured for the correct datasource type.

  1. Before installing the applier, the following addition needs adding to the extractor configuration. Apply the following parameters on the extractor host, update the extractor using the details below, and then install the applier

    • For Staging Install:

      shell> cd tungsten-replicator-6.1.0-54
      shell> ./tools/tpm configure alpha \
        --repl-svc-extractor-filters=colnames,pkey \
        --property=replicator.filter.pkey.addColumnsToDeletes=true \
        --property=replicator.filter.pkey.addPkeyToInserts=true
      shell> ./tools/tpm update
    • For INI Installs: Add the following the /etc/tungsten/tungsten.ini

      [alpha]
      ...Existing Replicator Config...
      repl-svc-extractor-filters=colnames,pkey
      property=replicator.filter.pkey.addColumnsToDeletes=true
      property=replicator.filter.pkey.addPkeyToInserts=true
      
      
      shell> tpm update
  2. Unpack the Tungsten Replicator distribution in staging directory:

    shell> tar zxf tungsten-replicator-6.1.0-54.tar.gz
  3. Change into the staging directory:

    shell> cd tungsten-replicator-6.1.0-54
  4. Configure the installation using tpm:

    Show Staging

    Show INI

    shell> ./tools/tpm configure defaults \
        --reset \
        --user=tungsten \
        --install-directory=/opt/continuent \
        --profile-script=~/.bash_profile
    
    shell> ./tools/tpm configure alpha \
        --topology=master-slave \
        --master=sourcehost \
        --members=localhost \
        --datasource-type=elasticsearch \
        --replication-user=root \
        --replication-password=null \
        --replication-port=9200 \
        --property=replicator.stage.q-to-dbms.filters=casetransform \
        --property=replicator.filter.casetransform.to_upper_case=false
    
    shell> vi /etc/tungsten/tungsten.ini
    [defaults]
    user=tungsten
    install-directory=/opt/continuent
    profile-script=~/.bash_profile
    
    [alpha]
    topology=master-slave
    master=sourcehost
    members=localhost
    datasource-type=elasticsearch
    replication-user=root
    replication-password=null
    replication-port=9200
    property=replicator.stage.q-to-dbms.filters=casetransform
    property=replicator.filter.casetransform.to_upper_case=false
    

    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.

  5. If your MySQL source is a Tungsten Cluster, ensure the additional steps below are also included in your applier configuration

    First, prepare the required filter configuration file as follows on the Elasticsearch applier slave host(s) only:

    shell> mkdir -p /opt/continuent/share/
    shell> cp tungsten-replicator/support/filters-config/convertstringfrommysql.json /opt/continuent/share/

    Then, include the following parameters in the configuration

    property=replicator.stage.remote-to-thl.filters=convertstringfrommysql
    property=replicator.filter.convertstringfrommysql.definitionsFile=/opt/continuent/share/convertstringfrommysql.json
    
  6. Once the prerequisites and configuring of the installation has been completed, the software can be installed:

    shell> ./tools/tpm install

If you encounter problems during the installation, check the output of the /tmp/tungsten-configure.log file for more information about the root cause.

Once the service is configured and running, the service can be monitored as normal using the trepctl command. See Section 5.2.4, “Management and Monitoring of Elasticsearch Deployments” for more information.