Configure-crosscluster.sh Examples

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

This section contains some examples to show how to run the configure-crosscluster.sh utility.

These examples are valid only for installations in which:
  • Both the local and remote clusters consist of all FIPS-enabled nodes.
  • Both the local and remote clusters consist of all non-FIPS-enabled nodes.
The examples are not valid for installations in which a local or remote cluster has a mix of FIPS and non-FIPS-enabled nodes. To configure cross-cluster security where local and/or remote clusters consist of a combination of FIPS and secure non-FIPS nodes, see Configuring Cross-Cluster Security for a Mixed (FIPS and Non-FIPS) Configuration.

Example 1

Release 7.0.0 and later require specifying passwords for the local and remote trust stores:
$ /opt/mapr/server/configure-crosscluster.sh create all \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.163.166.251

Example 2

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1

Example 3

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

$ /opt/mapr/server/configure-crosscluster.sh create server \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1 \
    -localuser admin \
    -remoteuser mapr

Example 4

Assume that the local cross-cluster user defaults to the local cluster administrative user, and the remote cross-cluster user defaults to the remote cluster 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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1 \
    -localcrossclusteruser crosscluster

Example 5

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1 \
    -localport 10022

Example 6

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1 \
    -localhosts /tmp/local \
    -remotehosts /tmp/remote

Example 7

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1

Example 8

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -remoteip 10.10.1.1

Example 9

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 \
    -localtruststorepassword kfSLfzJSIkv_DH7EK \
    -remotetruststorepassword m83SymAwcRXD1MndJFXXpha1008HD0eC \
    -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.