MRKAVANA (mrkavana@gmail.com) - www.facebook.com/kavanathai

Jul 21, 2011

Ultra Monkey Cluster on Debian/Ubuntu Server

Installing ultra-monkey

The ultra monkey3 website provides instructions for Debian sarge: http://www.ultramonkey.org/3/installation-debian.sarge.html
What follows is a streamlined report on our installation steps:
  • Modify the /etc/apt/sources.list as follows to enable the download and installation of the ultra-money3 packages:
deb http://www.ultramonkey.org/download/3/ sarge main
deb-src http://www.ultramonkey.org/download/3 sarge main
  • apt-get update
  • apt-get install ultramonkey
  • answer the questions as noted on the ultra-monkey website:
During the instalation of the ipvsadm package you may be asked to configure
/etc/ipvsadm.rules. You should select <No> as this conflicts with the way that 
Ultra Monkey configures ipvsadm.
During the instalation of the ipvsadm package you may be also asked to 
configure the IPVS synchronisation daemon. It is recommended thhat you select none as 
configuration of the synchronisation daemon is not covered in the Ultra Monkey 
documentation and in some cases conflicts with the way that conflicts with the way that 
Ultra Monkey runs LVS.

Configuring ultramonkey

  • Packet Forwarding
The linux-director must be able to route traffic from the external network to the server network and vice versa. Specifically, in addition to correctly configuring the interfaces and routes IPV4 forwarding must be enabled. This is done by adding configuration of net.ipv4.ip_forward to /etc/sysctl.conf as follows:
# Enables packet forwarding
net.ipv4.ip_forward = 1
For these changes to take effect the sysctl command may be used:
/sbin/sysctl -p
net.ipv4.ip_forward = 1
  • Installing ldirectord service
/usr/sbin/update-rc.d ldirectord defaults 
  • configure /etc/ha.d/ldirectord.cf
get information from man ldirectord and the url http://www.ultramonkey.org/3/topologies/lb-eg.html
# Global Directives 
checktimeout=10 
checkinterval=2 
#fallback=127.0.0.1:80 
autoreload=no 
#logfile="/var/log/ldirectord.log" 
logfile="local0" 
quiescent=yes 
 
 
virtual=131.247.168.48:10666 
        real=192.168.0.64:22 masq 
        real=192.168.0.65:22 masq 
        service=none 
        scheduler=wlc 
        persistent=600 
        protocol=tcp 
  • verify everything is fine
softice:/etc/ha.d# /etc/init.d/ldirectord start
Starting ldirectord... success
softice:/etc/ha.d# ipvsadm -L IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP softice.lklnd.usf.edu:10666 wlc persistent 600
-> node0001:ssh                 Masq    1      0          0         
 -> node0000:ssh                 Masq    1      0          0         
 -> node0000:10666               Masq    0      0          0         
 -> node0001:10666               Masq    0      0          0         
softice:/etc/ha.d#

  • remark: if you are testing several ssh login from the same host, the load balancing won't show since the connection is meant to be persistant

configuring ipvsadm

you shouldn't need to do this but the following examples might put you at ease with the ipvsadm command: We are going to use the ipvsadm command to add on the master node several services to be redirected to cluster node. During the testing period, we are going to leave alone SSH port on the master node (22 tcp) so that we can still connect to it and use instead a custom port (e.g.10666) that we will redirect to the cluster nodes' SSH ports (22)
  • ivpsadm --add-service --tcp-service 131.247.168.48:10666 --scheduler wlc --persistent
  • ipvsadm --add-server -t 131.247.168.48:10666 --real-server 192.168.0.64:22 --weight 1 --masquerading

No comments:

Post a Comment