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.
- On the source cluster, ensure that the user has a MapR user ticket. See Generating a MapR User Ticket for more information.
- On the destination cluster, generate a MapR user ticket and append the ticket to the MapR user ticket on the source cluster.
On the destination cluster, install the
mapr-gatewaypackage 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
configure.shscript (in addition to your regular parameters) be sure to specify the
-Nparameter (with the cluster name that the gateway belongs to) and the -S parameter is set to true (for a secure cluster). See configure.sh for more information about
configure.shusage, options, and examples.
If you want to change the port that a gateway is using (by default, gateways
use port 7660):
On the node where the gateway is running, edit the
/opt/mapr/conf/gateway.conffile, uncommenting the line
#gateway.port=7660and changing the port number.
After saving the file, restart the gateway by running this command:
maprcli node services -name gateway -action restart
- On the node where the gateway is running, edit the
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
- Running the
maprcli cluster gateway setcommand.
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.
- Running the
Add a cross-cluster ticket on the source cluster.
See Adding Cross-Cluster Tickets to Secure Clusters for more information.
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.
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
- On the destination cluster, generate a cross-cluster ticket:
- On all the other CLDB nodes in the source cluster, copy the maprserverticket file to the /opt/mapr/conf/ directory.
- 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.