Updated on 2024-07-30 GMT+08:00

Batch Installing Proxy Clients

Prerequisites

  • The disaster recovery gateway of 24.6.0 or later has been installed.
  • The usernames, passwords, and port numbers used for logging in to the production site servers have been obtained. Ensure that all of the production site servers run Linux.
  • The network between the gateway server and production site servers is connected. Remote login using SSH is available.
  • The expect command is installed and supported on the gateway server.

Procedure

In the following example, sdrs_linux_amd64_24.6.0.20240627203949.tar.gz is the proxy client package (24.6.0) used for illustration.

  1. Remotely log in to the gateway server and run the following command to check whether the expect command is available. If not, configure the yum source and obtain and install the command first.

    /bin/expect -v

  2. Generate the Linux installation package sdrs_linux_amd64_24.6.0.20240627203949_with_certs.tar.gz including the certificate file on the gateway server. For details, see section "Installing a Proxy Client."
  3. Use the following command to create the linux-host-list.txt file and add the private IP addresses, login ports, usernames, and passwords of the production site servers to the file.

    Ensure that the following command format is used:

    echo "IP address Port user userPassword rootPassword drmIp hostagentIp" >> linux-host-list.txt

    Command parameters are described as follows:

    IP address: The IP address of the production site server for remote login.

    Port: The port for remote login.

    user: The username for remote login.

    userPassword: The password for remote login. If root is used for login, use the rootPassword value for userPassword.

    rootPassword: The password of the root user.

    drmIp: The IP address of the gateway server.

    hostagentIp: The IP address of the primary NIC on the production site server.

    A complete example command is as follows:

    echo "192.168.0.1 22 user userPassword rootPassword 192.168.0.10 192.168.0.1" >> linux-host-list.txt

    To add information of multiple production site servers, separate the information of each server with a line separator.

    An example is provided as follows:

    echo "192.168.0.6 22 user userPassword rootPassword 192.168.0.202 192.168.0.6" >> linux-host-list.txt
    echo "192.168.0.188 22 user userPassword rootPassword 192.168.0.202 192.168.0.188" >> linux-host-list.txt 
    echo "192.168.0.204 22 user userPassword rootPassword 192.168.0.202 192.168.0.204" >> linux-host-list.txt

  4. Check whether all of the information is added.

    cat linux-host-list.txt

  5. Run the following command as user root to install proxy clients in batches:

    /opt/cloud/sdrs/sidecar/script/cmd_tools.sh install --host-list=host_list_file_path --package=package_path --timeout=cmd_timeout_in_s

    Command parameters are described as follows:

    --host-list: The path of the linux-host-list.txt file.

    --package: The path of the Linux installation package sdrs_linux_amd64_24.6.0.20240627203949_with_certs.tar.gz.

    --timeout: The command timeout interval, in seconds. The default value is 300. You are advised to set the timeout interval based on the number of production site servers. The formula is as follows: Number of production site servers x 200 (time required for installing a proxy client)

    A complete example command is as follows:

    /opt/cloud/sdrs/sidecar/script/cmd_tools.sh install --host-list=linux-host-list.txt --package=sdrs_linux_amd64_24.6.0.20240627203949_with_certs.tar.gz --timeout=600

  6. If "install SDRS successfully" is returned in the command output, the proxy client is successfully installed on all production site servers.

  7. Delete the linux-host-list.txt file to prevent password leakage.

    rm -rf linux-host-list.txt

Troubleshooting

If "error: install SDRS timeout" is returned, the script execution timed out. Perform the following steps on the gateway server to troubleshoot the fault:

  1. Check whether the expect command is supported.

    /bin/expect -v

  2. Check the "IP address install successfully" information in the command output for production site servers with proxy client successfully installed. For those whose client installation failed, check whether the usernames and passwords in linux-host-list.txt are correct. Use the following command to check whether a server can be logged in to:

    /bin/ssh -t -p Port Username @IP address