Thursday, September 12, 2019

Step by step on how to install a MapR Client on Windows 7 to access multiple secured clusters

Goal:

This article explains the detailed steps to install and configure a MapR Client on Windows 7 to access multiple secured MapR Clusters.

Env:

MapR 6.1 client on Windows 7
2 MapR 6.1 secured clusters running : ClusterA and ClusterB

Solution:

Note: The Windows command mentioned below should be typed using "cmd" tool.

1. MapR Client Installation

1.1 Install JDK 8 and then set environment variable JAVA_HOME

setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0_221"
Note: here we install JDK 8 because it is the supported JDK version based on the JDK support matrix.
https://mapr.com/docs/61/InteropMatrix/r_jdk_matrix.html

1.2 Create the directory and set environment variable MAPR_HOME

mkdir c:\opt\mapr
setx MAPR_HOME "c:\opt\mapr"

1.3 Download the MapR Client and install into MAPR_HOME

For example:
https://package.mapr.com/releases/v6.1.0/windows/mapr-client-6.1.0.20180926230239.GA-1.amd64.zip

1.4. Extract the archive by right-clicking on the file and selecting "Extract All"

Make sure the content is inside MAPR_HOME which is C:\opt\mapr

1.5 Configure the environment variable MAPR_TICKETFILE_LOCATION

mkdir c:\maprticket
setx MAPR_TICKETFILE_LOCATION "c:\maprticket\abc"

2. Configure MapR Cluster settings

2.1 Add etc/hosts entries

Right click "Notepad" and click "Run as Administrator".
Add both MapR Cluster A and B's hostname and IP into "C:\Windows\system32\drivers\etc\hosts".
For example:
10.xx.xx.1 v1.poc.com v1
10.xx.xx.2 v2.poc.com v2
10.xx.xx.3 v3.poc.com v3
10.xx.xx.4 v4.poc.com v4

10.xx.xx.5 s1.poc.com s1
10.xx.xx.6 s2.poc.com s2
10.xx.xx.7 s3.poc.com s3
10.xx.xx.8 s4.poc.com s4

2.2 Add mapr-clusters.conf enrties

Put both MapR Cluster A and B's /opt/mapr/conf/mapr-clusters.conf entries into %MAPR_HOME%\conf\mapr-clusters.conf
For example:
ClusterA secure=true v1.poc.com:7222,v2.poc.com:7222,v3.poc.com:7222
ClusterB secure=true s1.poc.com:7222,s2.poc.com:7222,s3.poc.com:7222

2.3 Merge the ssl_truststore from Cluster A and Cluster B

Copy the /opt/mapr/conf/ssl_truststore from Cluster B to Cluster A as "/tmp/ssl_truststore.b".
On Cluster A:
Copy the /opt/mapr/conf/ssl_truststore from Cluster A to "/tmp/ssl_truststore.a".
Run below command to merge /tmp/ssl_truststore.b into /tmp/ssl_truststore.a
/opt/mapr/server/manageSSLKeys.sh merge /tmp/ssl_truststore.b /tmp/ssl_truststore.a

2.4 Copy the merged /tmp/ssl_truststore.a to client under diretory c:\opt\mapr\conf

2.5 Generate MapR tickets for both MapR Clusters

cd %MAPR_HOME%\bin
maprlogin password -cluster ClusterA -user mapr
maprlogin password -cluster ClusterB -user mapr
Note: the ticket file should be located in c:\maprticket\abc as we set MAPR_TICKETFILE_LOCATION.

3. Test

Try "hadoop fs -ls" to access both MapR Clusters.
hadoop fs -ls maprfs://ClusterA/tmp
hadoop fs -ls maprfs://ClusterB/tmp

Reference:

https://mapr.com/docs/61/AdvancedInstallation/SettingUptheClient-windows.html
https://mapr.com/docs/61/SecurityGuide/RunningCommandsOnRemoteSecureClusters.html


No comments:

Post a Comment

Popular Posts