Engine New Node Environment Preparation
HENGSHI SENSE comes with built-in Greenplum/Doris engine support for multi-node deployment to build cluster solutions. This document mainly introduces the environment preparation work for adding engine computation nodes.
- Variable Description
- The variable
node-1used in this document represents the hostname of an already deployed engine node. - The variable
node-2used in this document represents the hostname of the new node.
- The variable
New Node Environment Preparation Work
Node Port Opening Instructions
The new node requires all default (tcp/udp) ports to be mutually open with the already deployed engine nodes.Add execution user, with the username
hengshias an example.bashgrep hengshi /etc/passwd > /dev/null || sudo useradd -m hengshi sudo mkdir -p /opt/hengshi && sudo chown hengshi:hengshi /opt/hengshiConfigure the server-side
sshdto listen on a non-22 port.
For machines involved in the installation, including the local machine and those configured in theHS_ENGINE_SEGMENTSvariable, if there are non-ssh 22 ports, you need to configure the actual port for each host in the deployment user's~/.ssh/config.
The local machine needs to configure the ports forlocalhostand the domain name returned by thehostnamecommand. For example: if the hostname of the new machine isNode-AandHS_ENGINE_SEGMENTS=(Node-A), the corresponding listening ports are all122.
The.ssh/configconfiguration file should include the following settings:Host localhost Port 122 Host Node-A Port 122Configure passwordless SSH login on the new machine.
Create the installation path, with
/opt/hengshias the example installation path.bashsudo mkdir -p /opt/hengshi && sudo chown hengshi:hengshi /opt/hengshiInstall HENGSHI SENSE.
shsudo su - hengshi # Switch to the product runtime user cd ~/pkgs/hengshi-sense-[version] # Navigate to the extracted target directory ./hs_install -p /opt/hengshi # Execute the installationInitialize the OS under sudo privileges.
bashsudo su - hengshi # Switch to the product runtime user cd /opt/hengshi # Navigate to the installation target directory bin/hengshi-sense-bin init-os all # Initialize the OSWhen the query engine type is Greenplum, check the Greenplum versions in the old and new environments to ensure consistency.
In the HENGSHI installation directory underlib, thegpdbsymbolic link points to the currently used Greenplum version. Check whether thegpdbsymbolic link in the old machine and the new expansion machine points to the same version. If not, copy the Greenplum from the old machine to the new machine and modify thegpdbsymbolic link on the new machine to point to the Greenplum version of the old machine.
For example:
On the old machinenode1:shellhengshi@node1$ cd /opt/hengshi hengshi@node1$ ls lib/gpdb -l lrwxrwxrwx 1 hengshi hengshi 20 Oct 11 23:03 lib/gpdb -> gpdb-6.2.1.1-centos7On the new machine
node2:shellhengshi@node2$ cd /opt/hengshi hengshi@node2$ ls lib/gpdb -l lrwxrwxrwx 1 hengshi hengshi 21 Oct 11 23:03 lib/gpdb -> gpdb-6.18.1.1-centos7At this point, the two
gpdbversions are inconsistent:gpdb-6.2.1.1-centos7 != gpdb-6.18.1.1-centos7. Since the installation package used by the new machine is not the same as the one used in the old machine environment, you need to copy thegpdbfrom the old machine to the new machine and modify thegpdbsymbolic link on the new machine.shell$ ssh node1 hengshi@node1$ cd /opt/hengshi/lib hengshi@node1$ rsync -avzP gpdb-6.2.1.1-centos7 node2:/opt/hengshi/lib/ hengshi@node1$ ssh node2 "cd /opt/hengshi/lib; rm -f gpdb; ln -s gpdb-6.2.1.1-centos7 gpdb"When the query engine type is Doris, check the Doris versions in the old and new environments to ensure consistency.
In the HENGSHI installation directory underlib, thedoris-beanddoris-fesymbolic links point to the currently used Doris version. Check whether thedoris-beanddoris-fesymbolic links in the old machine and the new expansion machine point to the same version. If not, copy thedoris-beanddoris-fefrom the old machine to the new machine and modify thedoris-beanddoris-fesymbolic links on the new machine to point to the Doris version of the old machine.
For example:
On the old machinenode1:shellhengshi@node1$ cd /opt/hengshi hengshi@node1$ ls lib/doris-be -l lrwxrwxrwx 1 hengshi hengshi 20 Oct 11 23:03 doris-be -> doris-be-1.2.1.2-linux-64 hengshi@node1$ ls lib/doris-fe -l lrwxrwxrwx 1 hengshi hengshi 20 Oct 11 23:03 doris-fe -> doris-fe-1.2.1.2-linux-64On the new machine
node2:shellhengshi@node2$ cd /opt/hengshi hengshi@node2$ ls lib/doris-be -l lrwxrwxrwx 1 hengshi hengshi 20 Oct 11 23:03 doris-be -> doris-be-1.2.2.2-linux-64 hengshi@node2$ ls lib/doris-fe -l lrwxrwxrwx 1 hengshi hengshi 20 Oct 11 23:03 doris-fe -> doris-fe-1.2.2.2-linux-64At this point, the two Doris versions are inconsistent:
doris-be-1.2.1.2-linux-64 != doris-be-1.2.2.2-linux-64anddoris-fe-1.2.1.2-linux-64 != doris-fe-1.2.2.2-linux-64. Since the installation package used by the new machine is not the same as the one used in the old machine environment, you need to copy thedoris-feanddoris-befrom the old machine to the new machine and modify thedoris-feanddoris-besymbolic links on the new machine.shell$ ssh node1 hengshi@node1$ cd /opt/hengshi/lib hengshi@node1$ rsync -avzP doris-fe-1.2.1.2-linux-64 node2:/opt/hengshi/lib/ hengshi@node1$ rsync -avzP doris-be-1.2.1.2-linux-64 node2:/opt/hengshi/lib/ hengshi@node1$ ssh node2 "cd /opt/hengshi/lib; rm -f doris-fe doris-be; ln -s doris-fe-1.2.1.2-linux-64 doris-fe;ln -s doris-be-1.2.1.2-linux-64 doris-be"