Load balancing with Debian i386 Wheezy LTSP-PNP. One root server and three application servers.
If you have dhcp-server somewhere in your LAN - choose LTSP-PNP. When you have very old thin clients [1], you need 486 kernel. Only Debian have package for that [2]. 1. LTSP-PNP Use Debian Wheezy i386 LXDE for root server and for three application servers [3]. Here are servers in this setup: 192.168.0.105 debian-ltsp-pnp 192.168.0.106 debian-app-01 192.168.0.107 debian-app-02 192.168.0.108 debian-app-03 A. Install LTSP-PNP in root server. # apt-get install dnsmasq ltsp-server-standalone ltsp-client # ltsp-config dnsmasq # ltsp-config nbd-server # sed -i -e 's,BOOT_METHODS=.*,BOOT_METHODS=NBD,g' /etc/ltsp/update-kernels.conf # echo 'IPAPPEND=3' >> /etc/ltsp/update-kernels.conf # /usr/share/ltsp/update-kernels # ltsp-update-image --cleanup / # ltsp-config nbd-server # service nbd-server restart # root@debian-ltsp-pnp:~# ltsp-info server information: No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.6 (wheezy) Release: 7.6 Codename: wheezy server packages: ii ldm 2:2.2.11-2 ii ldm-server 2:2.2.11-2 ii ldm-themes 12.07.1 ii ltsp-client 5.4.2-6+deb7u1 ii ltsp-client-core 5.4.2-6+deb7u1 ii ltsp-docs 1.1-1 ii ltsp-server 5.4.2-6+deb7u1 ii ltsp-server-standalone 5.4.2-6+deb7u1 un ltsp-utils <none> ii ltspfs 1.1-2 ii ltspfsd 1.1-2 ii ltspfsd-core 1.1-2 found image: /opt/ltsp/images/i386.img # root@debian-ltsp-pnp:~# uname -a Linux debian-ltsp-pnp 3.2.0-4-486 #1 Debian 3.2.60-1+deb7u3 i686 GNU/Linux B. Install LDM-server in application servers. # apt-get install ldm-server C. Modify root server for load balancing. 1. # touch /opt/ltsp/i386/usr/share/ltsp/get_hosts # nano /opt/ltsp/i386/usr/share/ltsp/get_hosts #!/bin/bash # Prioritize the server list contained in MY_SERVER_LIST parameter based on server rating TMP_LIST="" SHUFFLED_LIST="" if [ -z "$MY_SERVER_LIST" ]; then SHUFFLED_LIST=$SERVER else for i in $MY_SERVER_LIST; do rank=$(netcat $i 9571 | grep rating | cut -d: -f2) if [ -n "$rank" ]; then TMP_LIST="$TMP_LIST\n${rank}_$i" fi done TMP_LIST=$(echo -e $TMP_LIST | sort -r) for i in $TMP_LIST; do SHUFFLED_LIST="$SHUFFLED_LIST $(echo $i | cut -d_ -f2)" done fi echo $SHUFFLED_LIST # chmod 755 /opt/ltsp/i386/usr/share/ltsp/get_hosts 2. # nano /var/lib/tftpboot/ltsp/i386/lts.conf [Default] LDM_DIRECTX=True [--] MY_SERVER_LIST="192.168.0.106 192.168.0.107 192.168.0.108" 3. # touch /etc/ltsp/ssh_known_hosts.auto # ltsp-update-sshkeys 192.168.0.106 debian-app-01 192.168.0.107 debian-app-02 192.168.0.108 debian-app-03 # ltsp-update-image -c / D. Users Be sure that every application servers are able to accept users (rsync/unison passwd, group, shadow or OpenLDAP). Share /home with NFS. # root@debian-ltsp-pnp:~# cat /etc/exports # /home 192.168.0.106(rw,no_root_squash,no_subtree_check) 192.168.0.107(rw,no_root_squash,no_subtree_check) 192.168.0.108(rw,no_root_squash,no_subtree_check) # root@debian-app-01:~# cat /etc/fstab # 192.168.0.105:/home /home nfs hard,intr,rsize=8192,wsize=8192,bg 0 0 E. Verify that users are able to log in. Here is three thin clients, three users, three application servers, load balancing is working. root@debian-app-01:~# ps ax | grep ltsp 3145 ? Ss 0:00 sshd: ltsp002 [priv] 3150 ? S 0:00 sshd: ltsp002@pts/0 3178 ? Ss 0:00 bash -c LTSP_CLIENT=192.168.0.26 LTSP_CLIENT_HOSTNAME=ltsp26 LTSP_CLIENT_MAC=08:00:27:D5:2E:14 LIBGL_ALWAYS_INDIRECT=true LC_ALL=fi_FI.UTF-8 LANGUAGE=fi_FI.UTF-8 LANG=fi_FI.UTF-8 DISPLAY=192.168.0.26:7 PULSE_SERVER=tcp:192.168.0.26:4713 ESPEAKER=192.168.0.26:16001 LTSP_ALSA_DEFAULT=pulse /etc/X11/Xsession "default" < /dev/null > /dev/null ; /usr/sbin/ltspfsmounter all cleanup 3251 ? S 0:00 openbox --config-file /home/ltsp002/.config/openbox/lxde-rc.xml 3467 pts/2 S+ 0:00 grep ltsp root@debian-app-02:~# ps ax | grep ltsp 3131 ? Ss 0:00 sshd: ltsp003 [priv] 3136 ? S 0:00 sshd: ltsp003@pts/0 3163 ? Ss 0:00 bash -c LTSP_CLIENT=192.168.0.12 LTSP_CLIENT_HOSTNAME=ltsp12 LTSP_CLIENT_MAC=08:00:27:2C:BE:71 LIBGL_ALWAYS_INDIRECT=true LC_ALL=fi_FI.UTF-8 LANGUAGE=fi_FI.UTF-8 LANG=fi_FI.UTF-8 DISPLAY=192.168.0.12:7 PULSE_SERVER=tcp:192.168.0.12:4713 ESPEAKER=192.168.0.12:16001 LTSP_ALSA_DEFAULT=pulse /etc/X11/Xsession < /dev/null > /dev/null ; /usr/sbin/ltspfsmounter all cleanup 3236 ? S 0:00 openbox --config-file /home/ltsp003/.config/openbox/lxde-rc.xml 3487 pts/2 S+ 0:00 grep ltsp root@debian-app-03:~# ps ax | grep ltsp 3300 ? Ss 0:00 sshd: ltsp001 [priv] 3325 ? S 0:00 sshd: ltsp001@pts/1 3352 ? Ss 0:00 bash -c LTSP_CLIENT=192.168.0.13 LTSP_CLIENT_HOSTNAME=ltsp13 LTSP_CLIENT_MAC=08:00:27:CC:7A:AB LIBGL_ALWAYS_INDIRECT=true LC_ALL=fi_FI.UTF-8 LANGUAGE=fi_FI.UTF-8 LANG=fi_FI.UTF-8 DISPLAY=192.168.0.13:7 PULSE_SERVER=tcp:192.168.0.13:4713 ESPEAKER=192.168.0.13:16001 LTSP_ALSA_DEFAULT=pulse /etc/X11/Xsession "default" < /dev/null > /dev/null ; /usr/sbin/ltspfsmounter all cleanup 3429 ? S 0:00 openbox --config-file /home/ltsp001/.config/openbox/lxde-rc.xml 3910 pts/0 S+ 0:00 grep ltsp [1] http://h10010.www1.hp.com/wwpc/pscmisc/vac/us/product_pdfs/t5135_Data_Sheet_02-26-07.pdf [2] https://packages.debian.org/wheezy/linux-image-3.2.0-4-486 [3] http://cdimage.debian.org/debian-cd/7.6.0/i386/iso-cd/debian-7.6.0-i386-lxde-CD-1.iso ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net