User Tools

Site Tools


doc:howto:tce

This is an old revision of the document!


X2Go-ThinClientEditon (TCE, TCE-NG, TCE-New)

This page is very much Work in Progess. Please leave a note on x2go-user@lists.x2go.org if you're interested in trying this out, so we can guide you along if something goes wrong.

:FIXME: This whole process could probably streamlined into an x2go-tce.deb

Ideas:

  • instead of the “exports” stuff, use a config file e.g. under /etc/x2go/x2go-tce/config and source its contents
  • instead of copy-pasting the build commands, turn most of it into a script as /usr/bin/x2go-tcebuilder or something (the remaining config parts in the copy-paste block would have to be moved into the config file)
  • our config would be used as suggestion by linking to it; a user could create their own by replacing the link with a regular file (similar to how /etc/x2go/applications works)
  • our additional live-scripts would be shipped similar to how apache does it with sites-available and sites-active
  • store the results somewhere under /var/x2go-tce/ or whatever the proper place according to FHS and Debian would be
  • turning it into a package would mean we could add dependencies as well, so the manual apt-get install would not be neccessary

History, Rationale, Outlook

During the time of Debian Wheezy being Debian's stable release, we started developing a new ThinClientEdition (TCE) - one that is based on Debian-Live and thus does no longer rely on NFS. Instead, the entire image is loaded into the RAM of the ThinClient machine.

The disadvantage is that your ThinClient now needs at least 1 GB of RAM (see below).

However, the huge advantage is that there no longer is a need for any high-availibility setup concerning NFS. All you need is an HTTP or FTP server with a dedicated IP, if you want to use netbooting. It is also possible to deploy the image to the ThinClient's local storage, if present, and have it update in the background. Also, making changes/updating the NFS-based TCE was rather finicky - with the current TCE, you build and deploy a new image every time you make a change, and you can test it on a single client without interrupting your production environment.

We've also received reports that the old NFS-based TCE wouldn't work with Jessie, or at least it was very hard to get it to work. Our current TCE works just fine with Jessie, and we expect it to work in Stretch and hopefully in Buster (Stretch+1) as well. The one catch is that the live-build package in Debian/the Debian-Live project is currently looking for a new maintainer - so there is a slim chance that live-build might be removed from Debian Buster, especially if no new maintainer steps up and the live-build replacement that is currently in the works contains all the required functionality of live-build by then.

ThinClient prerequisites for all variants

  • At least 1 GB of RAM
  • At least an i586-compatible CPU
  • Capability to boot via PXE or sufficient local storage (expect 250-450 MB, depending on what you decide to include)
  • A graphics card and input devices (Keyboard, Mouse/Trackball/Touchpad/Trackpoint/Touchscreen, …) that are supported by the stock Debian X Server

Build system prerequisites for all variants

  • You need a Debian Jessie system to build the image. (Other distributions based on Debian might work, but this is untested.)
  • We suggest using a 64-Bit system, though it should be possible to use a 32-Bit system if you don't want to build a 64-Bit ThinClient image.
  • We suggest leaving at least 4 GB of free disk space so the build won't abort due to insufficient disk space.
  • Make sure your package list is up to date by running:
    sudo apt-get update 
  • Install the required packages by running:
    sudo apt-get install git-core lzma live-build live-config-doc live-manual-html live-boot-doc
  • export the following variables:
    # Point this to the git repository you wish to use
    export LBX2GO_CONFIG='http://git-server-and-project::branch'
    
    # Select ONE of the following LBX2GO_ARCH lines and comment out the others 
    # (feel free to use long or short options)
    # for 64-Bit builds, use:
    # export LBX2GO_ARCH='-a amd64 -k amd64' 
    # 32-Bit, larger memory footprint, but faster performance on i686 and newer
    # export LBX2GO_ARCH='-a i386 -k 686-pae'
    # 32-Bit, smallest memory footprint
    export LBX2GO_ARCH='--architectures i386 --linux-flavours 586' 
    
    # These options are meant to reduce the image size.
    # Feel free to adapt them after consulting "man lb_config"
    export LBX2GO_SPACE='--checksums none --apt-indices none --cache false 
                         --win32-loader false --memtest none
                         --firmware-binary false --initramfs-compression lzma'
    
    # These are default values that should not require tuning
    export LBX2GO_DEFAULTS='--initsystem sysvinit --security true --updates true 
                            --apt-recommends false --firmware-chroot true   
                            --backports true'
    export LBX2GO_ARCHIVE_AREAS="main contrib non-free"

Netbooting

Prerequisites

  • You need an existing DHCP/PXE/TFTP setup with the usual pxelinux.0/pxelinux.cfg boot and configuration files, and a directory where kernel and initrd can be stored. This is not covered here, though we might add a separate howto for that some time later on.
  • You will also need an HTTP/FTP server with a dedicated IP (no name-based virtual hosts) for the squashfs image.
    • This image cannot be deployed via TFTP as it is too large - some TFTP servers refuse to serve files lager than 32MB, and some TFTP clients have problems with that as well.
    • Also, even if you have a TFTP server/client combination that handles files larger than 32 MB, it will still be waaaay slower than the HTTP/FTP transfer.

Building your own netbootable X2Go-TCE image

Starting the build

Change to a directory where you want to save your builds, and run the following commands:

# Set everything up for netboot-image creation
LBX2GO_IMAGETYPE='netboot'

# Create Timestamp
LBX2GO_TIMESTAMP=$(date +"%Y%m%d%H%M%S") 

# Set Directory name
LBX2GO_TCEDIR=./live-build-x2go-$LBX2GO_TIMESTAMP

if [ -z "$LBX2GO_ARCH" ] ||
   [ -z "$LBX2GO_SPACE" ] ||
   [ -z "$LBX2GO_CONFIG" ] ||
   [ -z "$LBX2GO_DEFAULTS" ] ||
   [ -z "$LBX2GO_IMAGETYPE" ] ||
   [ -z "$LBX2GO_TIMESTAMP" ] ||
   [ -z "$LBX2GO_ARCHIVE_AREAS" ]; then
    echo -e "One or more of the following variables is unset:"
    echo -e "LBX2GO_ARCH: '${LBX2GO_ARCH}'"
    echo -e "LBX2GO_SPACE: '${LBX2GO_SPACE}'"
    echo -e "LBX2GO_DEFAULTS: '${LBX2GO_DEFAULTS}'"
    echo -e "LBX2GO_CONFIG: '${LBX2GO_CONFIG}'"
    echo -e "LBX2GO_IMAGETYPE: '${LBX2GO_IMAGETYPE}'"
    echo -e "LBX2GO_TIMESTAMP: '${LBX2GO_TIMESTAMP}'"
    echo -e "LBX2GO_ARCHIVE_AREAS: '${LBX2GO_ARCHIVE_AREAS}'"
    echo -e "Please visit http://wiki.x2go.org/doku.php/doc:howto:tce"
    echo -e "and read up on the general prerequisites for X2Go-TCE"
else
    # This will create a timestamped subdirectory for the build
    mkdir -p $LBX2GO_TCEDIR
    cd $LBX2GO_TCEDIR

    lb config $LBX2GO_ARCH $LBX2GO_SPACE $LBX2GO_DEFAULTS \
       --config $LBX2GO_CONFIG --binary-images $LBX2GO_IMAGETYPE \
       --archive-areas "$LBX2GO_ARCHIVE_AREAS"
    if lb build ; then
        echo -e "Build is done: '$LBX2GO_TCEDIR'"
        ln ./tftpboot/live/vmlinuz ./x2go-tce-vmlinuz
        ln ./tftpboot/live/initrd.img ./x2go-tce-initrd.img
        ln ./binary/live/filesystem.squashfs ./x2go-tce-filesystem.squashfs
        lb clean
        rm -rf ./cache
    else
        echo -e "Build failed: '$LBX2GO_TCEDIR'"
    fi
    cd ..
fi
doc/howto/tce.1481766697.txt.gz · Last modified: 2016/12/15 01:51 by stefanbaur