Configuring Gateways for Table Replication on Secure Clusters

This task steps through how to configure gateways for table replication from a MapR source cluster to a MapR destination cluster when both clusters are secure.

Note: If you want to configure your secure cluster environment so that you can run commands on a secure "remote" cluster from a secure "administrative" cluster, see Running Commands on Remote Secure Clusters.
  1. On the source cluster, ensure that the user has a MapR user ticket. See Generating a MapR User Ticket for more information.
  2. On the destination cluster, generate a MapR user ticket and append the ticket to the MapR user ticket on the source cluster.
  3. On the destination cluster, install the mapr-gateway package on each node where you want to run a gateway on. See Installing MapR Software.
    Note: On the gateway nodes in the destination cluster, when you run (or re-run) the script (in addition to your regular parameters) be sure to specify the -N parameter (with the cluster name that the gateway belongs to) and the -S parameter is set to true (for a secure cluster). See for more information about usage, options, and examples.
  4. If you want to change the port that a gateway is using (by default, gateways use port 7660):
    1. On the node where the gateway is running, edit the /opt/mapr/conf/gateway.conf file, uncommenting the line #gateway.port=7660 and changing the port number.
    2. After saving the file, restart the gateway by running this command: maprcli node services -name gateway -action restart
  5. On every node in the source cluster, specify the destination cluster name and gateway nodes by using one of the following methods. See Managing Gateways for more information about using these methods.
    • Running the maprcli cluster gateway set command.
      maprcli cluster gateway set -dstcluster <cluster name> -gateways "<space-delimited list of gateways>"
    • Adding a DNS record to your DNS server's zone file for your domain.
  6. Add a cross-cluster ticket on the source cluster. See Adding Cross-Cluster Tickets to Secure Clusters for more information.
    1. On the destination cluster, generate a cross-cluster ticket:
      maprlogin generateticket -type crosscluster 
          -out <path and filename for the cross-cluster ticket> 
          -duration <lifetime of the ticket>
      Note: For cross-cluster and service tickets, the default duration value is LIFETIME.
    2. On a CLDB node in the source cluster, append the cross-cluster ticket to the maprserverticket file.
      cat <path and filename for the cross-cluster ticket> >> /opt/mapr/conf/maprserverticket
  7. On all the other CLDB nodes in the source cluster, copy the maprserverticket file to the /opt/mapr/conf/ directory.
  8. Setup table replication between your clusters. See table replica, See table replica add for registering a table as a replica of another. See table replica autosetup for information about setting up automatic replication between a source table to a replica table.