In this example, the installation path is /opt/hengshi, the download path is ~/pkgs, preparation files are introduced in the section Installation.
$ sudo su - hengshi #Switch to the product runtime user
$ cd /opt/hengshi #Enter the installation target directory
$ bin/hengshi-sense-bin stop all #Stop the old version services
Please first check if the contents of the two configuration files, hosts and vars.yml, in the directory cluster-conf, which is at the same level as the "hengshi-sense-[version]" directory, are correct. Refer to the section introduced in Installation - Setting Up Cluster Information
$ sudo su - hengshi #Switch to the product runtime user
$ cd ~/pkgs/hengshi-sense-[version] #Switch to the decompression target directory
$ ./hs_install -m cluster -c ../cluster-conf #Execute cluster installation
The installation program reports the following information, the status of each node [unreachable=0, failed=0], indicating the installation is successful:
PLAY RECAP ****************************************************************
Node-A : ok=18 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
Node-B : ok=18 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
Node-C : ok=18 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
This step requires the executing user to have sudo permissions on each machine. After successful execution, you can close the sudo permissions (the program does not need sudo permissions for daily operation)
$ sudo su - hengshi #Switch to the product runtime user
$ cd /opt/hengshi #Enter the installation target directory
$ bin/hengshi-sense-bin init-os all #Initialize OS
After execution, confirm the operation status and service status in sequence
$ sudo su - hengshi #Switch to the product runtime user
$ cd /opt/hengshi #Enter the installation target directory
$ bin/hengshi-sense-bin start all #Start new version services
PLAY RECAP ***********************************************************************
Node-A : ok=4 changed=3 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
Node-B : ok=3 changed=2 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
Node-C : ok=3 changed=2 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0