Updated on 2024-12-24 GMT+08:00

Preparing an ECS

If the client tool runs on Linux, you need to prepare a Linux ECS that is in the VPC as a CloudTable cluster and the Linux ECS serves as a client host. If you use the following client tools to access a cluster, you are advised to use the HBase shell, a Linux ECS.

If the client tool runs on Windows, you need to prepare a Windows ECS that is in the VPC as a CloudTable cluster and the Windows ECS serves as a client host.

Preparing an ECS

For details about how to purchase a Linux or Windows ECS, see how to purchase an ECS in the Elastic Cloud Server Getting Started.

The purchased ECS must meet the following requirements:

  • The ECS must have the same region, AZ, VPC, and subnet as the CloudTable cluster.

    For details about how to create a VPC, see User Guide > VPC and Subnet in Virtual Private Cloud.

  • The ECS must have the same security group as the CloudTable cluster.

    For more information about security groups, see Security Group in the Virtual Private Cloud User Guide.

    When cross-VPC communication is used to access a CloudTable cluster, the network administrator needs to authorize the access to the VPC, security group, and subnet where the cluster resides.

    Check whether the outbound rule of the security group contains the following rule:

    • Protocol & Port: All
    • Type: IPv4
    • Destination: 0.0.0.0/0
    If the preceding rules do not exist, add the following outbound rule according to Figure 1.
    • Protocol: TCP
    • Port: 80
    • Destination: Select IP address and set it to 0.0.0.0/0.
    Figure 1 Adding an outbound rule
  • When purchasing an ECS, you need to set EIP to Automatically assign. Alternatively, you can bind an EIP to an ECS after the ECS is created.
  • To access a Linux ECS, you are advised to use an SSH password.

    For details about how to log in to a Linux ECS, see Logging In to a Linux ECS in the Elastic Cloud Server User Guide.

  • To access a Windows ECS, you are advised to use the MSTSC-based remote desktop connection tool.

    For details, see Logging In to a Windows ECS.

Configuring the DNS Address and hosts File for the Linux ECS

You do not need to perform this operation when you install the HBase shell by deploying a client in one click. In other cases, perform the following steps to configure the DNS address and the hosts file for the Linux ECS:

  1. Configure /etc/hosts.

    Configure the host IP address in the /etc/hosts file to accelerate the access to the CloudTable cluster.

    To configure /etc/hosts for a Linux ECS, perform the following steps:

    1. Log in to the Linux ECS as user root.
    2. Run the hostname command to query the host name.
      [root@euler ~]# hostname
      euler.novalocal
    3. Run the ifconfig command to query the IP address of the local host.
      Figure 2 Querying the IP address
    4. Run the vi /etc/hosts command to edit the file and add the host configuration.
      192.168.0.58 euler.novalocal
      127.0.0.1 euler.novalocal
    5. Press Esc and enter :wq to save the settings and exit.
    6. Run the following command to check whether the IP address is successfully added:
      cat /etc/hosts
    7. Run the following command to check whether the host name can be resolved:
      ping Host name

  2. Configure the DNS.

    The DNS server is used to resolve the domain name in the CloudTable cluster link, for example, the ZooKeeper link. Set the private DNS server address based on the region where the CloudTable cluster is located. For details about the DNS server addresses in each region, see What Are the Private DNS Server Addresses Provided by the DNS Service? in the Domain Name Service FAQs.

    To configure DNS for a Linux ECS, perform the following steps:

    1. Log in to the Linux ECS as user root.
    2. Run the vi /etc/resolv.conf command to edit the /etc/resolv.conf file and add the nameserver configuration.
      Above the Internet IP address, add two lines to input the DNS server IP addresses in the following format.
      nameserver 100.125.1.250
    3. Press Esc and enter :wq to save the settings and exit.
    4. Run the following command to check whether the IP address is successfully added:
      cat /etc/resolv.conf
    5. Run the following command to check whether an IP address can be resolved from the access domain name.
      ping Access domain name

      Access domain name indicates the domain name in the CloudTable cluster link, for example, the ZooKeeper link. On the CloudTable management console, click the cluster name to go to the basic cluster information page and obtain the link of CloudTable. The obtained link contains three private domain names separated by commas (,). You can ping any of the private domain names.

Configuring DNS Address for a Windows ECS

  1. Log in to the Windows ECS as user Administrator.
  2. On the Windows ECS, choose Start > Control Panel > Network and Sharing Center.
  3. In the Network and Sharing Center window, click Change adapter settings on the right.
  4. Right-click the network adapter name and choose Properties from the shortcut menu. The Properties dialog box is displayed.
  5. Click Internet Protocol Version 4 (TCP/IPv4). The Internet Protocol Version 4 (TCP/IPv4) Properties dialog box is displayed.
    Figure 3 Internet protocol version 4 (TCP/IPv4) properties
  6. In the dialog box shown in Figure 3, select Use the following DNS server addresses, enter the IP address of the DNS server in the Preferred DNS server textbox, and click OK.

    The DNS server is used to resolve the domain name in the CloudTable cluster link, for example, the ZooKeeper link. Set the private DNS server address based on the region where the CloudTable cluster is located. For details about the DNS server addresses in each region, see What Are the Private DNS Server Addresses Provided by the DNS Service? in the Domain Name Service FAQs.

  7. Click Start, enter cmd in the search box, and press Enter. The CLI is displayed.
  8. Run the following command on the CLI to check whether the DNS is successfully configured:
    ping Access domain name

    Access domain name indicates the domain name in the CloudTable cluster link, for example, the ZooKeeper link. On the CloudTable management console, click the cluster name to go to the basic cluster information page and obtain the link of CloudTable. The obtained links contain three private domain names separated by commas (,). You can ping any of the private domain names.