Batch Installing Linux Proxy Clients
Prerequisites
- It is recommended that you deploy the disaster recovery gateway and proxy client in the same security group and only allow ECSs within the security group to communication with each other. For details, see Security Group Configuration Examples.
- Ensure that the ports listed in Port Description (Asynchronous Replication) are not used.
- If the firewall is enabled on the ECS where you want to deploy the proxy client, enable port 59526 on the firewall.
- 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_xxxx_24.9.0.xxxx.tar.gz is the proxy client package (24.9.0) used for illustration.
- 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
- Generate the Linux installation package sdrs_xxxx_24.9.0.xxxx.tar.gz_with_certs.tar.gz including the certificate file on the gateway server. For details, see section "Installing a Proxy Client."
- 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.
Command format:
echo "IP address Port user userPassword rootPassword drmIp hostagentIp" >> linux-host-list.txt
Parameter description:
IP address: The IP address of the production site server used 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.
Example:
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
- Check whether all of the information is added.
cat linux-host-list.txt
- Run the following command as user root to install proxy clients in a batch:
/opt/cloud/sdrs/sidecar/script/cmd_tools.sh install --host-list=host_list_file_path --package=package_path --timeout=cmd_timeout_in_s
Parameter description:
--host-list: The path of the linux-host-list.txt file.
--package: The path of the Linux installation package sdrs_xxxx_24.9.0.xxxx.tar.gz_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_xxxx_24.9.0.xxxx.tar.gz_with_certs.tar.gz --timeout=600
- Check the command output. If "install SDRS successfully" is returned, the proxy client is successfully installed on all production site servers.
- 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:
- Check whether the expect command is supported.
/bin/expect -v
- 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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot