remsnet
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia
Contact: Website Yahoo Messenger

Linux IPVS{heartbeat} with rasperry PI using Rasberian

Mon Jan 28, 2013 9:04 pm

''Rasperry PI :: IPVS on RPI ''

Code: Select all


1. - Hardware Requirements  - 1x per each PI:

for                    |    what                      |   why               | Vendor 
-----------------------------------------------------------------------------------
USB Path                   |  Powered USB HUB             |   Multible USB dev  | i.e Belkim
IPVS Cluster sync      |  GPIO RS232 Serial adaper    |  avoid split brains | https://www.adafruit.com/products/954 
Linux Console          |  usb serial Adapter          | Serial Console      | multible , look for an linux supported one
2. USB Ethernet 100MB  |  usb ethernet adapter        | Heartbeat sync      |  multible , look for an linux supported one

The 2. usb ethernet may optional . read the http://www.linuxvirtualserver.org/software/ipvs.html pages.
Myself hate  not stable clusters ;-) . 

You need an Serial NULLmodem kabel - Google "serial null modem cable" , or look for an local vendor nearby.


2. - Software Requirements :

 Debian 6 for PI seems NOT deliver the IPVS Modules .
 Fedora Remix 17/18 seems to deliver the IPVS Modules . 

 As kernel recompile take 6-9h , and i wanted no manual kernel updates.
 I chosed FC remix 18 rasp !! 


3. IPVS Planing

IPVS Beginners :  RTFM - read the Fucking manuals :-)

  -> http://www.linuxvirtualserver.org/docs/ha/heartbeat_ldirectord.html
 -> http://www.linuxvirtualserver.org/software/ipvs.html
 -> http://www.linux-ha.org/wiki/Pacemaker
 -> http://www.linux-ha.org/wiki/Heartbeat
  .. some more wikis exist On Internet for detailed  HowTows.


4. IPVS with PI - Hardware setup

A -> setup 2 Pi with FC 18 rasp , 
       Both the same config , 
       Same Netmask , 
       same serials
       same software

B -> change serial console to /dev/USB01 
    for this you need to update the boot config , change console=  to an USB tty.
    see this page : http://www.irrational.net/2012/04/19/using-the-raspberry-pis-serial-port/

C -> install  an GPIO RS 232 adapter
   i.e https://www.adafruit.com/products/954
   i.e http://wolfpaulus.com/journal/embedded/raspberry_serial
   
D -> Plug an Serial Nullmodem Cabel between the both GPIO RS 232 adapter 
     
  see : http://en.wikipedia.org/wiki/Null_modem
  see : http://www.linux-archive.org/centos/188608-cluster-heart-beat-using-cross-over-cable.html

  Test with minicom : https://nmi.cs.wisc.edu/node/878

If the Test hast been succeed in both directions ,  
 then you ready to use it for the "ANTI SPLIT BRAIN " crossover heartbeat cable.
 
 ..RTFM..


5 -> install required IPVS RPMs( FC 18-2 ):

[root@lb1 ha.d]# rpm -qa | egrep -e '(ipvsadm|pacemaker|drbd-|httpd-|mon.armv5tel|bind-)' | egrep -v '(libmicro|rpcbind)'
bind-dyndb-ldap-2.3-2.fc18.armv5tel
drbd-pacemaker-8.3.13-1.fc18.armv5tel
bind-lite-devel-9.9.2-6.P1.fc18.armv5tel
drbd-8.3.13-1.fc18.armv5tel
pacemaker-cli-1.1.8-3.fc18.armv5tel
ipvsadm-1.26-6.fc18.armv5tel
bind-sdb-9.9.2-6.P1.fc18.armv5tel
bind-to-tinydns-0.4.3-9.fc18.armv5tel
drbd-heartbeat-8.3.13-1.fc18.armv5tel
pacemaker-doc-1.1.8-3.fc18.armv5tel
pacemaker-libs-devel-1.1.8-3.fc18.armv5tel
pacemaker-cluster-libs-1.1.8-3.fc18.armv5tel
bind-libs-9.9.2-6.P1.fc18.armv5tel
bind-chroot-9.9.2-6.P1.fc18.armv5tel
bind-pkcs11-9.9.2-6.P1.fc18.armv5tel
drbd-utils-8.3.13-1.fc18.armv5tel
drbd-bash-completion-8.3.13-1.fc18.armv5tel
pacemaker-libs-1.1.8-3.fc18.armv5tel
pacemaker-1.1.8-3.fc18.armv5tel
bind-license-9.9.2-6.P1.fc18.noarch
bind-9.9.2-6.P1.fc18.armv5tel
bind-devel-9.9.2-6.P1.fc18.armv5tel
drbd-udev-8.3.13-1.fc18.armv5tel
bind-libs-lite-9.9.2-6.P1.fc18.armv5tel
bind-utils-9.9.2-6.P1.fc18.armv5tel
pacemaker-cts-1.1.8-3.fc18.armv5tel

6. HA Setup

Bring IP apache, bind  on each LB.
Setup Minimalistc test pages as Wikis suggest
Setup NTP Both LB require to have the same date & Time !!
Setup i.e Bind as local cache, this speedup lookups for ldirectord.

Bring UP heartbeat , configure it 
Bring UP ldirectord , configure it 
TEST the cluster , poweroff one LB node,  the second must take over !

If you want , Bring UP pacemaker , configure it ..
Myself not Run X11 on  the LB..

Asume you have allready REAL servers setup , so start using them 


Follow i.e http://www.linuxjournal.com/article/9838 / 
          http://www.linuxvirtualserver.org/docs/ha/heartbeat_ldirectord.html


ALL well done ?, have FUN ;-)
Cheers.

Last edited by remsnet on Thu Dec 19, 2013 9:08 pm, edited 3 times in total.

remsnet
Posts: 151
Joined: Wed Dec 19, 2012 7:32 pm
Location: Planet Gaia
Contact: Website Yahoo Messenger

Re: Linux IPVS{heartbeat} with rasperry PI using Rasberian

Thu Dec 19, 2013 9:03 pm

remsnet wrote:''Rasperry PI :: IPVS on Fedora Remix 18-2 ''

I wiped just my Loadbalancer Rasperry PI ´s that run Corosync heartbeat3 with ldirectrord
with lastest TEST rasberian.
Works fine with betta kernels.

NOTE : debian ipvsadm "stable" are still UNPachted and buggy. and no backports of v1.27 on arm avalible.

Therefore you must manualy download the ipvsadm 1.27 and compile & install it for use IPVS on RPI.

Return to “Advanced users”