Inicio Linux & Systems Networks & Infrastructure Cybersecurity Cloud & DevOps SIEM & Monitoring DFIR & Threat Intel Development & Other Todas las categorias Herramientas

Instalación Zevenet community en cluster

Instalación Zevenet community  en cluster

Tabla de contenidos

¿Que es Zevenet?

Zevenet es una solución para el balanceo de carga  que proporciona una alta disponibilidad para servicios TCP, UDP, HTTP y HTTPS.

Instalación

Debemos instalar dos nodos (master y backup), en el sistema de instalación solo mostrare la instalaciónde un nodo dado que es como si instalasemos un Debian normal y corriente,

para comenzar accedemos al repositorio y nos descargamos la ultima versión de Zevenet Comunity

https://sourceforge.net/projects/zevenet/files/latest/download

Iniciamos mediante el CD-ROM y presinamos a instalar.

Zevenet0001

Seleccionamos idioma

Zevenet0002

Zevenet0003

Confiugramos el idioma del teclado.

Zevenet0004

Configuramos el direccionamiento IP

Zevenet0005 Zevenet0006 Zevenet0007 Zevenet0008

Otorgamos un nonbre al servidor.

Zevenet0009

Dominio.

Zevenet0010

Contraseña de root

Zevenet0012 Zevenet0011

Zona horaria.

Zevenet0013

Para que el manual no se alargue voy a configurar que utilice todo el disco a la hora de realizar el particonado.

Zevenet0014 Zevenet0015 Zevenet0016 Zevenet0017 Zevenet0018

Empieza a realizar la instalación del sistema.

Zevenet0019

Zevenet0020

Accedemos mediante SSH y configuramos el repositorio (ambos nodos)

bash
echo «deb http://repo.zevenet.com/ce/v5/ stretch main» >> /etc/apt/sources.list
wget -O – http://repo.zevenet.com/zevenet.com.gpg.key | apt-key add –
apt-get install zevenet

Instalamos el paquete del cluster (ambos nodos)

bash
apt-get install zevenet-ce-cluster

A continuación configuramos el VRRP

Nodo Master:

bash
cat /usr/local/zevenet/app/ucarp/etc/zevenet-cluster.conf
############
###UCARP config section
#############
#Configuration section for zevenet-ce-cluster service UCARP SERVICE
######
#binary for ucarp
$ucarp=»/usr/local/zevenet/app/ucarp/sbin/ucarp»;
#deadratio value, for cloud 10 secs is recommended, for physical 2 secs commended.
$dead_ratio=»2″;
#interface used for the cluster where is configured local_ip and remote_ip
$interface=»eth0″;
#local IP to be monitored, i e 192.168.0.101
$local_ip=»10.191.236.9″;
#remote IP to be monitored, i e 192.168.0.102
$remote_ip=»10.191.236.10″;
#used password for vrrp protocol communication
$password=»secret»;
#unique value for vrrp cluster in the network
$cluster_id=»3122″;
#used virtual IP in the cluster, this ip will run always in the master node
$cluster_ip=»10.191.236.7″;
#script executed when node becomes MASTER
$up_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-start»;
#script executed when node becomes BACKUP
$down_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-stop»;
#script executed when node needs to send an advertisement
$adver_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-advertisement»;
############
##ZENINOTIFY config section
############
#Configuration section for zeninotify service
####
#replication config dir
$configdir=»/usr/local/zevenet/config»;
#replication of rt_tables file
$rttables=»/etc/iproute2/rt_tables»;
#where to save logs
$zeninolog=»/var/log/zeninotify.log»;
#binary for rsync
$rsync=»/usr/bin/rsync»;
#params for rsync
$zenrsync=»-auzv –delete»;
#IMPORTANT!!!!! remote IP,ssh without password required use id_rsa.pub key
#used variable $remote_ip
########
##exclude files to be replicated, management interface should be included, ie eth0
###ie, file1 and file2 need to be excluded: «–exclude file1 –exclude file2″
########
$exclude=»–exclude if_eth0_conf»;

Nodo BACKUP

bash
############
###UCARP config section
#############
#Configuration section for zevenet-ce-cluster service UCARP SERVICE
######
#binary for ucarp
$ucarp=»/usr/local/zevenet/app/ucarp/sbin/ucarp»;
#deadratio value, for cloud 10 secs is recommended, for physical 2 secs commended.
$dead_ratio=»2″;
#interface used for the cluster where is configured local_ip and remote_ip
$interface=»eth0″;
#local IP to be monitored, i e 192.168.0.101
$local_ip=»10.191.236.10″;
#remote IP to be monitored, i e 192.168.0.102
$remote_ip=»10.191.236.9″;
#used password for vrrp protocol communication
$password=»secret»;
#unique value for vrrp cluster in the network
$cluster_id=»3122″;
#used virtual IP in the cluster, this ip will run always in the master node
$cluster_ip=»10.191.236.7″;
#script executed when node becomes MASTER
$up_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-start»;
#script executed when node becomes BACKUP
$down_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-stop»;
#script executed when node needs to send an advertisement
$adver_script=»/usr/local/zevenet/app/ucarp/sbin/zevenet-ce-cluster-advertisement»;
############
##ZENINOTIFY config section
############
#Configuration section for zeninotify service
####
#replication config dir
$configdir=»/usr/local/zevenet/config»;
#replication of rt_tables file
$rttables=»/etc/iproute2/rt_tables»;
#where to save logs
$zeninolog=»/var/log/zeninotify.log»;
#binary for rsync
$rsync=»/usr/bin/rsync»;
#params for rsync
$zenrsync=»-auzv –delete»;
#IMPORTANT!!!!! remote IP,ssh without password required use id_rsa.pub key
#used variable $remote_ip
########
##exclude files to be replicated, management interface should be included, ie eth0
###ie, file1 and file2 need to be excluded: «–exclude file1 –exclude file2″
########
$exclude=»–exclude if_eth0_conf»;

Accedemos mediante nuestro navegador al nodo master por el puerto 444

Zevenet0021

Nos vamos a Network > Virtual Interfaces > Create Virtual Iface y generamos un dirección virtual para la VIP del VRRP

Zevenet0022

Comprobamos que inicia correctamente la interfaz

Zevenet0023

Iniciamos en ambos nodos el servicio de cluster

text
/etc/init.d/zevenet-ce-cluster start

Si accedemos a los dos servidores ahora por SSH tenemos que observar que el promt nos aparece lo siguiente:

bash
Master:

[master] root@lb1>
Backup:

[backup] root@lb2>

:wq!

Comentarios