Configure-crosscluster.sh Examples

Demonstrates how to use the configure-crosscluster.sh utility.

Example 1

Suppose both the local and remote cluster administrator usernames are mapr, and both the local and remote cross-cluster users for mirroring and gateway/streams replication are also mapr, specify only the -remoteip argument for a fresh run:

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.1

Example 2

Assume that the local MapR administrator username defaults to mapr, and the remote MapR administrator username defaults to the local MapR administrator username. Specify different user names for the local and remote MapR administrator using the -localuser and -remoteuser arguments. For example, if the local MapR administrator username is admin and the remote MapR administrator username is mapr:

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.1 -localuser admin -remoteuser mapr

Example 3

Assume that the local cross-cluster user defaults to the local MapR administrative user, and the remote cross-cluster user defaults to the remote MapR administrative user. To use a different cross-cluster user for mirroring or gateway/streams replication, specify the -localcrossclusteruser and/or -remotecrossclusteruser parameters. For example, if the local cross-cluster username is crosscluster, run the utility as follows:

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.1 -localcrossclusteruser crosscluster

Example 4

By default, the utility performs ssh and scp operations between the node where the utility is running and the other nodes in the local and remote clusters, using the default SSH port 22. To use a non-default SSH port, either for the local or remote clusters, specify the port number using the -localport or the -remoteport option. For example, if the SSH port for the local cluster is 10022, run the utility as follows. The remote SSH port is the default value of 22 if the -remoteport argument is not specified:

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.1 -localport 10022

Example 5

By default, the utility runs the maprcli node list command on both the local and remote nodes to determine the list of hosts in the local and remote clusters, and updates the configuration for all the nodes in the local and remote clusters. To update the configuration only for a subset of nodes in either the local or remote cluster, such as when you want to update only the CLDB nodes, specify the path to the file containing the list of hosts, one per line, using the -localhosts and -remotehosts options respectively. For example, to update the configuration for only the local nodes specified in the file /tmp/local and the remote nodes specified in the file /tmp/remote, run:

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.1 -localhosts /tmp/local -remotehosts /tmp/remote

Example 6

To configure cross-cluster functionality for a user without setting up server cross-cluster functionality, specify user as the parameter. This parameter allows users to run commands such as maprcli node list using the -cluster parameter, and the remote cluster name:

$ /opt/mapr/server/configure-crosscluster.sh create user -remoteip 10.10.1.1

Example 7

To configure both user and server cross-cluster functionality, specify all as the parameter, instead of user or server:

$ /opt/mapr/server/configure-crosscluster.sh create all -remoteip 10.10.1.1

Example 8

To copy the configuration files from the most recently failed run, use the -recover option. To update the configuration for a specified list of local or remote hosts, use the -recover option together with the -localhosts and -remotehosts options.

$ /opt/mapr/server/configure-crosscluster.sh create server -remoteip 10.10.1.103 -localuser admin -remoteuser mapr -recover latest -localhosts local -remotehosts remote

See Sample Failure, Troubleshooting, and Recovery Session for more information.