Using an MRS Client on Nodes Outside a MRS Cluster

Scenario

After a client is installed, you can use the client on a node outside an MRS cluster.

Prerequisites

Procedure

  1. Create an ECS that meets the requirements.
  2. Perform NTP time synchronization to synchronize the time of nodes outside the cluster with the time of the MRS cluster.

    1. Run the vi /etc/ntp.conf command to edit the NTP client configuration file, add the IP address of the Master node in the MRS cluster, and comment out the IP addresses of other servers.
      server master1_ip profer
      server master2_ip 
      Figure 1 Adding the Master node IP addresses
    2. Run the service ntpd stop command to stop the NTP service.
    3. Run the /usr/sbin/ntpdate IP address of the active Master node command to manually synchronize the time.
    4. Run the service ntpd start or systemctl restart ntpd command to start the NTP service.
    5. Run the ntpstat command to check the time synchronization result:

  3. Perform the following steps to download the cluster client software package from FusionInsight Manager, copy the package to the ECS node, and install the client:

    1. Log in to FusionInsight Manager and download the cluster client to the specified directory on the active management node.
    2. Log in to the active management node as user root.

      sudo su - omm

    3. Run the following command to copy the client to the node where the client is to be installed:

      scp -p /tmp/FusionInsight-Client/FusionInsight_Cluster_1_Services_Client.tar IP address of the node where the client is to be installed:/tmp

    4. Log in to a node on which the client is to be installed as the client user.

      Run the following command to install the client. If you do not have the file operation permission, change the file permission as user root.

      cd /tmp

      tar -xvf FusionInsight_Cluster_1_Services_Client.tar

      tar -xvf FusionInsight_Cluster_1_Services_ClientConfig.tar

      cd /tmp/FusionInsight_Cluster_1_Services_ClientConfig

      ./install.sh /opt/mrsclient

    5. Run the following commands to switch to the client directory and configure environment variables:

      cd /opt/mrsclient

      source bigdata_env

    6. If the Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user. If Kerberos authentication is disabled for the current cluster, skip this step:

      kinit MRS cluster user

      Example: kinit admin

    7. Run the client command of a component directly.

      For example, run the hdfs dfs -ls / command to view files in the HDFS root directory.