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-1
used in this document represents the hostname of an already deployed engine node. - The variable
node-2
used 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
hengshi
as an example.bashgrep hengshi /etc/passwd > /dev/null || sudo useradd -m hengshi sudo mkdir -p /opt/hengshi && sudo chown hengshi:hengshi /opt/hengshi
Configure the server-side
sshd
to listen on a non-22 port.
For machines involved in the installation, including the local machine and those configured in theHS_ENGINE_SEGMENTS
variable, 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 forlocalhost
and the domain name returned by thehostname
command. For example: if the hostname of the new machine isNode-A
andHS_ENGINE_SEGMENTS=(Node-A)
, the corresponding listening ports are all122
.
The.ssh/config
configuration file should include the following settings:Host localhost Port 122 Host Node-A Port 122
Configure passwordless SSH login on the new machine.
Create the installation path, with
/opt/hengshi
as the example installation path.bashsudo mkdir -p /opt/hengshi && sudo chown hengshi:hengshi /opt/hengshi
Install 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 installation
Initialize 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 OS
When 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
, thegpdb
symbolic link points to the currently used Greenplum version. Check whether thegpdb
symbolic 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 thegpdb
symbolic 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-centos7
On 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-centos7
At this point, the two
gpdb
versions 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 thegpdb
from the old machine to the new machine and modify thegpdb
symbolic 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-be
anddoris-fe
symbolic links point to the currently used Doris version. Check whether thedoris-be
anddoris-fe
symbolic links in the old machine and the new expansion machine point to the same version. If not, copy thedoris-be
anddoris-fe
from the old machine to the new machine and modify thedoris-be
anddoris-fe
symbolic 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-64
On 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-64
At this point, the two Doris versions are inconsistent:
doris-be-1.2.1.2-linux-64 != doris-be-1.2.2.2-linux-64
anddoris-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-fe
anddoris-be
from the old machine to the new machine and modify thedoris-fe
anddoris-be
symbolic 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"