5.4.2. Installing Vertica Replication

Vertica replication may be installed using either the Staging or INI methods, described below.

5.4.2.1. Installing Vertica Replication (Staging Method)

Configuration of the replication deployment to Vertica can be made using a single tpm staging-based deployment. However, because the configuration must be different for the master and slave hosts, the configuration must be performed in multiple steps.

  1. Unpack the Tungsten Replicator distribution in staging directory:

    shell> tar zxf tungsten-replicator-tungsten-replicator-4.0.7-696.tar.gz
  2. Locate the Vertica JDBC driver. This can be downloaded separately from the Vertica website. The driver will need to be copied into the Tungsten Replicator lib directory.

    shell> cp vertica-jdbc-7.1.2-0.jar tungsten-replicator-4.0.7-696/tungsten-replicator/lib/
  3. Change into the staging directory:

    shell> cd tungsten-replicator-tungsten-replicator-4.0.7-696
  4. Configure the main parameters for the replicator service:

    shell> ./tools/tpm configure alpha \
        --master=mysqldb01 \
        --members=mysqldb01,vertica01 \
        --install-directory=/opt/replicator \
        --disable-relay-logs=true \
        --skip-validation-check=HostsFileCheck \
        --enable-heterogeneous-service=true \
        --start

    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. Configure the parameters for the master host which will extract the information from MySQL:

    shell> ./tools/tpm configure alpha \
        --hosts=mysqldb01 \
        --replication-user=tungsten \
        --replication-password=password \
        --enable-heterogeneous-master=true 

    This operation sets the user and password information for accessing the MySQL server; this is required by some of the filters which extract information from the running service.

    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.

  6. Configure the parameters for the slave host that will apply the events to Vertica:

    shell> ./tools/tpm configure alpha \
        --hosts=vertica01 \
        --replication-user=dbadmin \
        --replication-password=password \
        --batch-enabled=true \
        --batch-load-template=vertica \
        --batch-load-language=js \
        --datasource-type=vertica \
        --vertica-dbname=bigdata \
        --replication-host=vertica01 \
        --replication-port=5433 \
        --skip-validation-check=InstallerMasterSlaveCheck \
        --svc-applier-block-commit-size=25000 \
        --svc-applier-block-commit-interval=30s

    This configure the Vertica slave to accept replication data from the master.

    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.

  7. Install the services:

    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.4.3, “Management and Monitoring of Vertica Deployments” for more information.

5.4.2.2. Installing Vertica Replication (INI Method)

INI configuration of the replication deployment to Vertica is done by specifying a different INI configuration for the master and slave hosts.

  1. Configure the ini parameters for the master replicator service:

    [defaults]
    user=tungsten
    install-directory=/opt/replicator
    replication-port=3306
    profile-script=~/.bashrc
    skip-validation-check=HostsFileCheck
    start-and-report=true
    
    [alpha]
    master=mysqldb01
    members=mysqldb01,vertica01
    replication-user=tungsten
    replication-password=secret
    disable-relay-logs=true
    enable-heterogeneous-service=true
    
    

    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.

  2. Configure the ini parameters for the slave host that will apply the events to Vertica:

    [defaults]
    user=tungsten
    install-directory=/opt/replicator
    replication-port=3306
    profile-script=~/.bashrc
    skip-validation-check=HostsFileCheck
    skip-validation-check=InstallerMasterSlaveCheck 
    start-and-report=true
    
    [alpha]
    master=mysqldb01
    members=mysqldb01,vertica01
    replication-user=dbadmin
    replication-password=password
    disable-relay-logs=true
    enable-heterogeneous-service=true
    batch-enabled=true 
    batch-load-template=vertica 
    batch-load-language=js 
    datasource-type=vertica 
    vertica-dbname=bigdata 
    replication-host=vertica01 
    replication-port=5433 
    svc-applier-block-commit-size=25000 
    svc-applier-block-commit-interval=30s

    This configures the Vertica slave to accept replication data from the master.

    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.

  3. Using the INI method requires that the following steps be performed on EVERY node:

    1. Unpack the Tungsten Replicator distribution in the staging directory:

      shell> tar zxf tungsten-replicator-tungsten-replicator-4.0.7-696.tar.gz
    2. This step should only be performed on any replicator slave node that will be applying to Vertica.

      Locate the Vertica JDBC driver. This can be downloaded separately from the Vertica website. The driver will need to be copied into the Tungsten Replicator lib directory.

      shell> cp vertica-jdbc-7.1.2-0.jar tungsten-replicator-4.0.7-696/tungsten-replicator/lib/
    3. Change into the staging directory:

      shell> cd tungsten-replicator-tungsten-replicator-4.0.7-696
    4. Install the services:

      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.4.3, “Management and Monitoring of Vertica Deployments” for more information.