How to configure a cluster in Zevenet Community Edition v.5.0

Zevenet Cluster Service can be configured like an independent piece of software outside of Zevenet CE core package, this new Zevenet cluster service has been developed with the idea of being easily managed and modified by sysadmins in order to adapt it to the needs of any network architecture.
The next procedure describes how to install and configure Zevenet Cluster in case of High availability for your Load Balancer is required.

Configure our official APT repository as follows:

How to configure APT repository for Zevenet Community Edition

Use Zevenet 5.0 Section.

Install Zevenet CE cluster package

Once the local database pository is updated please search the cluster package zevenet-ce-cluster as follows:

root@lb1 > apt-cache search zevenet-ce-cluster
zevenet-ce-cluster - Zevenet Load Balancer Community Edition Cluster Service

root@lb1 > apt-cache show zevenet-ce-cluster
Package: zevenet-ce-cluster
Version: 1.0
Maintainer: Zevenet SL 
Architecture: i386
Depends: zevenet (>=5.0), liblinux-inotify2-perl, ntp
Priority: optional
Section: admin
Filename: pool/main/z/zevenet-ce-cluster/zevenet-ce-cluster_1.0_i386.deb
Size: 43350
SHA256: e39bb9b8283904db2873287147c885637178e179be5dee67b2c7044039899f35
SHA1: 425d742cde523c93a55b25e96447a8088663a028
MD5sum: 123abcf0eab334a18054802962287dc7
Description: Zevenet Load Balancer Community Edition Cluster Service
 Cluster service for Zevenet CE, based in ucarp for vrrp implementation and zeninotify for configuration replication. VRRP through UDP is supported in this version.
Description-md5: 5b668a78c0d00cdf89ac66c47b44ba28

root@lb1 > apt-get install zevenet-ce-cluster
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
Suggested packages:
The following NEW packages will be installed:
  liblinux-inotify2-perl zevenet-ce-cluster
0 upgraded, 2 newly installed, 0 to remove and 37 not upgraded.
Need to get 43.4 kB/61.4 kB of archives.
After this operation, 60.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 stretch/main i386 zevenet-ce-cluster i386 1.0 [43.4 kB]
Fetched 43.4 kB in 0s (57.3 kB/s)        
Selecting previously unselected package liblinux-inotify2-perl.
(Reading database ... 57851 files and directories currently installed.)
Preparing to unpack .../liblinux-inotify2-perl_1%3a1.22-3_i386.deb ...
Unpacking liblinux-inotify2-perl (1:1.22-3) ...
Selecting previously unselected package zevenet-ce-cluster.
Preparing to unpack .../zevenet-ce-cluster_1.0_i386.deb ...
Unpacking zevenet-ce-cluster (1.0) ...
Setting up liblinux-inotify2-perl (1:1.22-3) ...
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db ( ...
Setting up zevenet-ce-cluster (1.0) ...
Completing the Zevenet CE Cluster installation...

Notice that Zevenet CE Cluster use VRRP and the syncronization time is mandatory for this protocol, so ensure your ntp service is properly configured and ntp servers are reachable from the Load Balancer.

Configure Zevenet CE cluster package

Once the installation is concluded, please configure the cluster service as follows:

Open the configuration file in the path /usr/local/zevenet/app/ucarp/etc/zevenet-cluster.conf

The most important parameters are described next:

#interface used for the cluster where is configured local_ip and remote_ip

#local IP to be monitored, i e

#remote IP to be monitored, i e

#used password for vrrp protocol communication

#unique value for vrrp cluster in the network

#used virtual IP in the cluster, this ip will run always in the master node

# if the nic used for cluster is different to eth0 then please change the exclude conf file in following line
$exclude="--exclude if_eth0_conf";

Notice that zevenet cluster is managed by root user and it replicates the configuration from master node to backup through rsync (ssh) so ssh without password between nodes need to be configured.

Once the configuration parameters are done as needed start the cluster in both nodes as follows:

root@lb1[] > /etc/init.d/zevenet-ce-cluster start

Make the service bootable after any reboot as follows:

root@lb1[] > update-rc.d zevenet-ce-cluster defaults

Logs and troubleshootings

  1. SSH without password is required between both cluster nodes
  2. ntp is required to be configured in both cluster nodes
  3. Zeninotify service only will run in the master node, please confirm zeninotify is running with the following command:
    root@lb1 [master]> ps -ef | grep zeninotify
    root     16912     1  0 03:20 ?        00:00:00 /usr/bin/perl /usr/local/zevenet/app/zeninotify/
    root@lb2 [backup]> ps -ef | grep zeninotify
    root@zva51 [backup]> 
  4. Logs for ucarp service are sent to syslog /var/log/syslog
  5. Logs for zeninotify replication service are sent to /var/log/zeninotify.log
  6. Cluster status is shown in the prompt and it is updated after any command execution, additionally the cluster status is saved in config file: /etc/zevenet-ce-cluster.status, if this file doesn’t exist then cluster service is stopped.
  7. At the moment of the cluster node promotes to MASTER the following script is executed: /usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-start
  8. At the moment of the cluster node promotes to BACKUP the following script is executed: /usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-stop
  9. At the moment of the cluster node needs to run advertisements the following script is executed: /usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-advertisement
  10. In case you need to change any parameter in the ucarp execution you can modify the execution function for ucarp in the script /etc/init.d/zevenet-ce-cluster subrutine run_cluster()
Share on:

Documentation under the terms of the GNU Free Documentation License.

Was this article helpful?

Related Articles