Updated on 2024-09-23 GMT+08:00

How Do I Access OBS Using an MRS Client Installed Outside a Cluster?

Scenario

In storage-compute decoupling scenarios where data is computed in an MRS cluster and stored in OBS buckets, you can obtain a temporary AK/SK using an agency and then use the AK/SK to access the OBS server. To access OBS from a client on a node outside the cluster, obtain an AK/SK through Guardian. Guardian is a component developed by the MRS team that allows clients outside the cluster to access OBS using temporary AKs/SKs.

This function is available in MRS 3.1.5 or later.

How Does Guardian Enable a Client on a Node Outside the Cluster to Access OBS?

  1. Install Guardian in the cluster.

    • For a new cluster in creation, select Guardian.
      Figure 1 Selecting Guardian
    • For an existing cluster, add the Guardian component in the Components tab.
      1. On the cluster details page, choose Components and click Add Service.
      2. In the service list, select the services to be added and click Next.
        Figure 2 Adding Guardian
      3. On the Topology Adjustment page, select the node where the service is to be deployed. (You are advised to deploy the Guardian service on the master node.)
      4. Click OK. After the service is added, you can view the added service on the Components page.

        The services added on the console are automatically synchronized to Manager.

  2. Configure storage and compute decoupling for the cluster by referring to Configuring a Storage-Compute Decoupled Cluster (Agency) or Configuring Fine-Grained Permissions for MRS Multi-User Access to OBS.
  3. Install or update the client.

  4. Once the installation is successful, you can access OBS. For example, access OBS from the HDFS client of an MRS cluster with Kerberos authentication disabled:

    1. Log in to the node where the client is installed as the client installation user.
    2. Go to the client installation directory and configure the environment variables:

      cd Client installation directory

      source bigdata_env

    3. Run the following command on the HDFS client to access OBS:

      hdfs dfs -ls obs://Directory of the OBS parallel file system

      If information similar to the following is displayed, the interconnection is successful: