[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Thin clients, Diskless Workstations, LTSP and Lessdisks



As Some of you may have noticed there has been some discisions about something called Half-thick clients in Debian-edu. Some has in fact sold this concept as the next thing to come, and that it will work without problems. Well - it might come and it might not come. And if it works without problems - well - You have to judge for yourself. I have written a lengthy email about the issue earlier, and you may find that posting at gmane: http://article.gmane.org/gmane.linux.debian.devel.education/3184

Well here is kind of stage 2: Since some time in December 2004, lessdisks has been included on the CD's that I build for sarge. They are not part of the official sarge autobuilds of debian-edu, which Joeyh is building. And I'm not sure if they should be a part of it. That is a decision for later. But if you are curious then read on.

I have added som preseeding for lessdisks, and added a script to install lessdisks. For now, it asumes that you've already installed a LTSP-server, and just want to add lessdisks workstation. It is possible to add lessdisks xterminal as well, but since this is a replacement of ltsp, I have not focused on that yet. But Vagrant has asked for help to get a better way of setting up a xterminal as well, so I might just do that at some point. And it is in fact possible to have a client autodetect if it is powerfull enough to run as a diskless workstation, or if it should run as a xterminal. I'm not sure if we are going to to that, in the project I'm working on now, it's at the bottom of the list.

First some definitions (These are my definitions):
 Workstation - A machine were you work (?) localy, it might mount remote
               filesystem from lets say a main-server
 XTerminal   - A Machine who runs the XServer, but connects to a server
               were the application is running. This is also called a
               Thin Client
 Application Server - A powerfull machine were you run Mozilla,
               OpenOffice, KDE, and all sort of applications
 Diskless    - A Machine which runs with no local disk
 Boot server - A server which provides boot-images and root filesystem
               to diskless clients.
 Thin Client Server - a Combination of Boot-server and Application
               server, In Debian-edu often refered to as LTSP-Server
 Thin Client - a diskless xterminal that boots from and connects to
               applications on a Thin Client server
 Diskless Workstation - a diskless powerfull client that fetches it's
               files from a bootserver, but runs them locally

LTSP and thinclients and Thin client servers is together with apps like OpenOffice.org, Mozilla and KDE, and the well defined network layout and a set off network services the reason why Skolelinux/Debian-edu is such a success. Now why change a success. Well, the reason is
 - Thin clients using the X-Protocoll are using a lot of bandwidth, and
   when you add some clients to it, you also need a powerfull server.
 - Applications using java or flash (I like none of them, but we have to
   face them) makes the thin clients use even more bandwidth.
- If you buy used computers in Norway these days, it's getting harder
   to find a client with a weaker CPU then PIII, and with less than
   128MB Memory. And if you buy a new computer you are even worse off.

How can we lower the demands on the server and the bandwidth, and use the powerfull client machines ? Well, we have to use the client machine to do more of the work. Sure - we could add more applications to the LTSP root filesystem, I'm sure we could add both the openOffice binary, and the Mozilla binary in there - I can even imagine that we could add some kde binaries. Or we could build the applications within the ltsp build environment. Anyone Tried to build LTSP, KDE, Mozilla and Openoffice from source ? I have and if that are the way to include a diskless workstation, then I dont want to be a part of the security team. And I dont think we would be able to include everything on one CD.

When I first started to build sarge-cd's for Debian-edu, I thought of LTSP. LTSP is not a part of Debian, and I dont think it will ever be, LTSP is more like it's own Distribution. And I dont think it would be that difficult to add LTSP to a NFS-server running Windows 2k(3) or something else. I thought of including the Old debs, and I actually did. But some people complained about the lack of support for new hardware, and we really should have ltsp4 or later. For Guadec I added LTSP4 manually, using the binaries from LTSP, and it worked - together with Gnome. I looked at how to make debian-packages for LTSP, possibly using the same method as System-imager, but found that it was a huge task. better leave that to Ragnar and Jim. Then I started to look at other ways to do this, and came up with the Idea of pulling together the same tools that LTSP provides, using std Debian-Packages. I Started to look into different NFS-root packages were in debian, and foun dthat one of them actually did almost what I wanted. Lessdisks installes itself into a chroot, does some repackageing of the kernel and initrd to make them netbootable, and then does som hardware detection while booting the diskless client. Finally there are 3 ways of running:
 x-terminal      - connects to a Thin-client-server as LTSP does
 sdm-terminal    - using secure connection to the Thin-client-server
 cloner-terminal - I think this is something like System-imager but I'm
                   not sure, maybe vagrant or Jonas could explain

I wanted to use boot and the root-filesystem to install a full Debian-edu Workstation. I have taken some wrong turns on the way. but Last week I succeded in installing the workstation profile and making it boot. The result is a script that actually does the work. I did some measurement on network usage to see what we actually could gain by doing this

First some info about the hardware used for this test
 Main server:
  OS: Skolelinux Venus (Woody)
  CPU: Dual Celeron 500MHz
  Memory: 256 MB
  Installed as a combined main/LTSP-server
 ltspserver00:
  OS: Debian-Edu Sarge (Image 29/12)
  CPU: PentiumIII 450
  Memory: 128 MB
  Installed as LTSPserver
  - Added lessdisk-x-terminal (a replacement for LTSP)
  - Added lessdisks-terminal, (not X, sdm nor clone, but just pure
    terminal) then added Workstation profile with KDE 3.3
 Diskless1:
  Dell Latitude CPi
OS: lessdisk-boot-files on disk, since it's unable to boot from pcmcia
      NIC
  CPU: Mobile PentiumII 400MHz
  Memory: 256 MB
 Diskless2:
  Toshiba Tecra 8000
OS: lessdisk-boot-files on disk, since it's unable to boot from pcmcia
      NIC
  CPU: PentiumII 266MHz
  Memory: 128 MB


In/out is seen from the server, measured with nload
First I used User1, on Diskless1

                 Incomming              Outgoing
               avg.   max  total     avg.   max   total
              kbit/s kbit/s MByte   kbit/s kbit/s MByte
boot           1300   7300    22     4800  46194    76
KDM             900   3512    35     4000  24425   110
KDEDesktop      450   3132    42    11400  29863   178
ooWriter                      44                   199
Mozilla                       48                   204
KDM                           56                   213
ooWriter                      58                   215
Mozilla                       59                   215
After 30 minutes of use       71                   236
      The next morning
KDM                          304                   559
Desktop                3500  312            3500   569
ooWriter                     313                   570
Mozilla                      315                   571
java applet                  318                   586
      This was the first time I started the java applet, a simple game
      called "driver" from popit.no
      Since I logged in the first time I played a Music-CD locally on
      the diskless, using the local CDrom
      Then I created a new user, New setting was created and saved as I
      logged inn and started to use the applications
KDM                          326                   605
Desktop User1                338                   627
ooWriter                     345                   640
Mozilla                      347                   642
KDM                          350                   648
Desktop User2                358                   657
ooWriter                     359                   658
Mozilla                      361                   659
KDM                          364                   663
Desktop User1                372                   671
ooWriter                     373                   672
Mozilla                      374                   673
Java applet                  376                   686
KDM                          364                   663
      Switching to Diskless2
KDM                          408                   774
Desktop User1                419                   807
ooWriter                     422                   879
Mozilla                      424                   925
KDM                          440                   992
Desktop User2                438                   989
ooWriter:                    443                  1055
Mozilla:                     446                  1105

Memory Usage on the LTSPserver:
        total       used       free     shared    buffers     cached
Mem:   127392     123868       3524          0       4052      71296
-/+ buffers/cache: 48520      78872
Swap:  262136      13008     249128

Memory usage on the Diskless2:
  Installed 128M
  In Use    124M
  Cached     55M

On diskless1 the memory usage was about the same, except there were more free memory (Diskless1 has 256 installed)

OK - how to install this thing:

If you have a recent debian-edu-install (I have 0.644+cvs20050107-2), run /usr/lib/debian-edu-install/debian-edu-lessdisks
The script takes one argument, either
 xterminal - to create a ltsp-client replacement - note that you have to
             do some editing afterwards
 workstation - To create a Diskless Debian-edu workstation

If you run
 /usr/lib/debian-edu-install/debian-edu-lessdisks workstation
The script will:
- create a large enough /var/lib/lessdisks partition on lvm
- export /var/lib/lessdisks through /etc/exports
- restart the NFS-server
- install the server-part of lessdisks
- install the terminal part of lessdisks
- create some configuration files for Debian-edu-workstation
- install debian-edu-install and educations-tasks
- hack some of the base-config scripts
- run base-config, which will install debian-edu-workstation
- make xdebconfiurator run on each boot, if it cant find a
  XF86Config.<macaddr> or XF86Config.default
- modify pxebooting, so that you will get a nice menu to select
  boot-target. If you want to boot ltsp, enter ltsp and press Enter, to
  boot lessdisk, enter lessdisks and press enter. If you let the menu
  time out, it will boot ltsp

then you should be done.

known bugs:
- Automounting using LDAP dont work in sarge, look in [1] for a known
  workaround
- locale is not set, I dont think its a nb_NO specific problem.
  workaround:
    lessdisks-chroot -- dpkg-reconfigure locales
- the keyboard layout for console and X is not set
  workaround for console:
    lessdisks-chroot -- dpkg-reconfigure console-data
  workaround for X (Alternative1):
    ( echo -n "xserver-xfree86 "
      echo -n "xserver-xfree86/config/inputdevice/keyboard/layout "
      echo -n "string "
      debconf-show xserver-xfree86 | grep layout | cut -f2 -d: ) |\
      lessdisks-chroot -- debconf-set-selections
  workaround for X (Alternative2):
     Use Kontrol Center in KDE to set your Keyboard layout
- kdm wont start after booting
  workaround (if you're fast)
press any key (shift, enter, space, anything) when you get the console login prompt.
  workaround (if you're not fast enough)
      logg in as root, and run
        /etc/init.d/kdm restart
  Workaround if you're lacy:
     install gdm, configure it to use ldap authentication
     (help is on it's way)

- kde wont start first time after logging in using kdm (it works with
  gdm !!). See [1] for known workaround.

[1]http://developer.skolelinux.no/dokumentasjon/debian-edu_sarge_installation.txt



Reply to: