Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: kragsterman on September 23, 2012, 01:21:22 pm

Title: LTSP FAT Client applications
Post by: kragsterman on September 23, 2012, 01:21:22 pm
Hi there!

 I'm a long time user of LTSP.

I've been waiting for LTSP on Zentyal for a long time now, and I'm now very happy for the inclusion! And not only inclusion, you seem to have made up a lot of nice improvements on administration of the clients!

 I've yet not tested it, but it really looks promising! I will test it in the nearest future, and give it a review from my point of view.

 I've got a couple of questions, though:

 I intend to run several chroot's, like 32 bit thin client, and 64 bit fat client, and one or more special purpose chroot environments.

 Is it possible to have several chroot's of the same arch? I don't see a naming function in the creation page? Or are they just given a random name? I suppose I can change that in the config files if so?

In the FAT Client chroot, you have a feature to include applications to be run locally. How are these app's chosen? Are they only standard app's, or is it possible to include whatever...? I know I can include app's with just apt-get install in chroot, but perhaps this adds some other stuff as well?

 Thanks in advance, this is really good work...!!!

Regards Johan
Title: Re: LTSP FAT Client applications
Post by: jsalamero on September 23, 2012, 04:54:27 pm
Hi Johan,

you can only create one profile per architecture, localapps are only meant for thinclients, doesn't make sense on fat clients, as there, everything is run on the terminal.

Thanks for your feedback!!
Title: Re: LTSP FAT Client applications
Post by: kragsterman on September 23, 2012, 08:43:28 pm
Okay, then I have to build chroot's anyway with ltsp-build-client...not a big deal...

But are the clients built with this ltsp script  shown in the image repo? I guess not..?

Okay, so on the fat clients everything is run on the clients...? So when the fat client chroot is built, does it include all applications that is installed on the server? Or how does it choose the app's?

 Regrds Johan
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 24, 2012, 04:54:37 am
Its really strange how zentyal have installed ltsp as there is no difference in a fat image or thin image.

I think it would be a great addition to be able to have a list of images and get hold of the --client-desktop operator.

ps in the ltsp-build-client command the --fat-client directive just builds the current desktop the way to choose fat or thin is just a directive in the .conf file.
 
Title: Re: LTSP FAT Client applications
Post by: Neru on September 24, 2012, 06:09:02 pm
Hello kragsterman,

you can install additional applications in an image like "local apps". It doesn't matter wheter it is a thin or a fat image.

For the moment, there is only one chroot for arch (actually 2, one for thin and another one for fat clients), but you can create as many configuration profiles as you want.

Regards
Title: Re: LTSP FAT Client applications
Post by: kragsterman on September 28, 2012, 08:29:58 pm
Unfortunately, it doesn't seem to work with building additional thin or fat client images. It works fine with the first one, but second/third or forth doesn't build. Returns an error saying ""error building client". It was my second install, I did things a little bit different, but the error of building additional client images remains the same.
 The client environments gets installed, in the right place, but not the images.

 Anyone got ideas...?

Regards Johan
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 11:02:40 am
I am going to check the LTSP and install now.

I found that there was a problem on booting an image after creation and things needed a reboot.
Is it still the same after a reboot

I found quite a few probs with the LTSP implementation but it would be good to share and see how others are going.

My finding before http://pastebin.com/mSXnxCTv

Might of been fixed dunno but testing this morning.

Also I have a feeling that the env of LTSP_HANDLE_DAEMONS=false might be staying that way until reboot.

Going to check this things today and report.

Title: Re: LTSP FAT Client applications
Post by: kragsterman on September 29, 2012, 11:23:18 am
Hi!

I'm also on to it now...

I'm testing to build the client(s) with ltsp-build-client. I run it  a couple of times now, with different parameters, and I think I got it right now...

Will be back...

Rgrds Johan
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 11:28:22 am
Yeah same here :)

Just going to run through some things and do a style that suits myself so here is Zentyal LTSP for Dummies :)

Firstly building images takes a bit of time if you do build an image you can go on to your desktop and eventually it does stop building shame the progress bar doesn't move.

One thing is that building does take time and whilst building Zentyal sets a redis variable to say the system is building an image. This needs to be retained at a session level as a reboot will retain this and not have a script to end and clear it. Or stop you rebooting at this time.

I will post a tiny perl script to clear on pastebin http://pastebin.com/Zq9iJzzR (http://pastebin.com/Zq9iJzzR)

PS
[EDIT] the path is from memory and with me thats a dangerous method but hey if its wrong please say.
Title: Re: LTSP FAT Client applications
Post by: robb on September 29, 2012, 12:40:32 pm
Looks useful enough to add to the module. thnx for that.

jacalvo, is this an idea to implement in the thin client module? Or do you have other plans to represent the building time?
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 12:46:55 pm
I am just doing things my way which is a bit arse-face which is a northern english term blunt but probably makes sense.

I am doing an LTSP scenario and trying some techniques.

So standard ubuntu 32bit ISO apt-get update and apt-get upgrade on a bog standard install with just ssh server installed.

There are two trac entries and the later seems to miss the --key operations.

Use http://trac.zentyal.org/wiki/Documentation/Community/Installation/InstallationGuide (http://trac.zentyal.org/wiki/Documentation/Community/Installation/InstallationGuide)

Zentyal 3.0 packages

For Ubuntu 12.04 (Precise). You should install the server edition.

Add to your /etc/apt/sources.list:

sudo nano  /etc/apt/sources.list
deb http://ppa.launchpad.net/zentyal/3.0/ubuntu precise main
deb http://archive.zentyal.org/zentyal 3.0 main extra

In order to authenticate the packages in the PPA and Zentyal repository you can import its public key with the following command:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 10E239FF
wget -q http://keys.zentyal.org/zentyal-3.0-archive.asc -O- | sudo apt-key add -

sudo apt-get update is important as it well check things are right with the repos and make them fresh before you install zentyal.

sudo apt-cache search zentyal

so to get my minimum zentyal going I will

sudo apt-get install zentyal-core
sudo apt-get install zentyal-software

Keep the SQL root password blank for now and the default for https for the admin gui.

Afterwards from the initial boot screen you should be able to ssh and https://server-ip (https://server-ip) should work.

Then choose to proceed anyway because we know this is our self certified web-gui



Because I usually evalute on win7 putty or ssh into the dynamic ip and hopefully you should have an easy copy and paste interface for the above commands.
Title: Re: LTSP FAT Client applications
Post by: kragsterman on September 29, 2012, 01:16:45 pm
Hi again!

Hmm, the fat client image woun't bulid in the GUI. It works with the 32- and 64-bit thin images, but not with either 32- or 64-bit fat...

I also tried with building client's with ltsp-build-client --fat-client with different other parameters, but that didn't work either.. It complained over various options like --chroot or --arch, said it didn't recognize them...? I tried also --base, and that one worked, but no fat image...

 So, can you(Zentyal team) tell me what changes you have made to ltsp to get this not to work...?

I saw your directories and fiies under /usr/share/zentyal-ltsp/ , but I don't really got much out of them.

I'm thinking of something that showed up during my attempt to install through the console: It complained over not finding packet zendesktop...?

I'll be back...

Rgrds Johan
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 02:17:41 pm
Its  strange thing but the build commands are not the place for fat-client directives.
The conf files is it ? /var/lib/ltsp ? forgot where they are but you can simulate a fat client with the general options which are conf directives
Title: Re: LTSP FAT Client applications
Post by: kragsterman on September 29, 2012, 02:31:58 pm
There are many .conf files, which one are you refering to?

I don't want to simulate a fat client, I want true fat clients. In a normal ltsp environment(for instance ubuntu), I can build as many fat and thin client images I'd like to, and set them up to run different software and boot to different hardware. I thought Zentyal had successed to do this in a GUI environment, but I guess it isn't ready yet...

 But then I want to be able to do it the normal ltsp way, but that seem to be impossible too...?

So, how do you folks want to do it...?

Regards Johan
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 02:37:16 pm
The conf flies are located in corresponding image dirs it will be something like /var/lib/ltsp/i386 and fat-i386.
My memory is woefull but basically its the general options.

I spent ages looking around and the best place is sudo apt-cache search ltsp
and a sudo apt-get install ltsp-docs should of been an obvious start point but hey I did say I was a dummy.

In the build-client options which need to be set on image creation the --fat-client directive makes the image distro the same as installed and if you wish to include the zenbuntu-desktop then the following is required.

ltsp-build-client --arch $arch --purge-chroot --copy-sourceslist --apt-keys /etc/apt/trusted.gpg --chroot $chroot --fat-client

The --copy-sourceslist --apt-keys /etc/apt/trusted.gpg options will bring in the ones you have added for the zentyal ppa and archive.

The scripts for running zentyal-ltsp are in /usr/share/zentyal-ltsp/

The above is a hack of the normal build-image script.
What it will do is copy your servers source.list and also the keys automatically and the --fat-client directive builds your current DE
This way you don't have problems of build faults.

        EBox::Sudo::root("echo `date` $buildCmd >> /var/log/zentyal/ltsp.log");
        EBox::Sudo::root("$buildCmd >> /var/log/zentyal/ltsp.log");

I also like to get a bit more in the log and seeing the command is sort of usefull

Also interestingly in the general options put a value pair in the extra options.
LTSP_FATCLIENT and True

Hey presto is the word on that one.

Going back to the build-client script
 --chroot $chroot --fat-client-desktop lubuntu-desktop

Is another nice option where you can choose another desktop from the ubuntu repos

also the --distro options has a few supported distro's maybe older versions for limited hardware in the ltsp/scripts and plugins dirs

I had a bit of a hack with the update-image script and this keeps the kernels to a singular image and also bangs out an interesting log for having a view at the processes involved.

logging in update-image
#!/usr/bin/perl -s
 
use strict;
use warnings;
 
use EBox;
use EBox::Global;
 
if (scalar @ARGV == 2) {
    my $arch = $ARGV[0];
    my $fat  = $ARGV[1];
    my $chroot = ($fat ? "fat-$arch" : $arch);
    if ( -f "/opt/ltsp/images/$chroot.img" ) {
        EBox::init();
 
        my $ltsp = EBox::Global->modInstance('ltsp');
 
        $ltsp->st_set_string('work', 'update');
        print "Updating $chroot image...\n";
 
        my $CHROOT_DIR = "/opt/ltsp/";
        EBox::Sudo::root("echo `date` chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "
                         . "&& chroot $CHROOT_DIR$chroot mount -t proc none /proc >> /var/log/zentyal/ltsp.log "                         
                         . "&& echo `date` chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "                     
                         . "&& chroot $CHROOT_DIR$chroot apt-get update >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date` chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
                         . "&& chroot $CHROOT_DIR$chroot env LTSP_HANDLE_DAEMONS=false apt-get upgrade -y >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date` chroot $CHROOT_DIR$chroot autoremove -y >> /var/log/zentyal/ltsp.log "
                         . "&& chroot $CHROOT_DIR$chroot apt-get autoremove -y >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date` chroot $CHROOT_DIR$chroot clean >> /var/log/zentyal/ltsp.log "
                         . "&& chroot $CHROOT_DIR$chroot apt-get clean >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date`  umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "                       
                         . "&& umount /opt/ltsp/$chroot/proc >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date` ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
                         . "&& ltsp-update-kernels $CHROOT_DIR$chroot >> /var/log/zentyal/ltsp.log "
                         . "&& echo `date` ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log "                       
                         . "&& ltsp-update-image --image-only --arch $chroot >> /var/log/zentyal/ltsp.log");
        $ltsp->st_set_string('work', 'none');
    } else {
        print "/opt/ltsp/images/$chroot.img does not exist.\n";
    }
} else {
    print "Usage: update-image arch fat?\n";
}
 
lsb - Linux Standard Base 4.0 support package
if you run ltsp-info
it will tell you no modules loaded
apt-get install lsb

I am not really sure of the relationship between ltsp and LSB but if there are problems the LDM will report without a silent reboot.

Also restarting ndb-server doesn't sometimes seem to be enough and just so I know where I am I have rebooted zentyal on build or update.
sudo reboot !!! After they have finished.
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 03:34:03 pm
I am jumping around a tad but just to go back to adding zentyal and the initial minimal zentyal setup.

Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 03:36:37 pm
Should end up looking like this.
Title: Re: LTSP FAT Client applications
Post by: jsalamero on September 29, 2012, 07:29:26 pm
thanks for the feedback on the LTSP module guys, but I would like to remember that Zentyal 3 has been already released as stable version and won't get new features only bugfixes. Next time you want to push some feature requests, do it before the freeze, when we released the LTSP and we asked for feedback, we didn't get that much :P
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 29, 2012, 07:52:18 pm
Apols as I am a ltsp newbie if it wasn't for the Zentyal release I wouldn't of got as far.

Many Thanks.

I have a few things that would be good to get some community collaboration as I struggle in the network arena.

Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 30, 2012, 11:58:47 am
There is always a catch-22 with the firewall and that is if you make a mistake with your internal lan you can end up with no access.

So when your testing and evaluating it makes sense to punch a couple of holes in the external dynamic for those just in case moments.

In the services I am going to make a https service for port 443.
After making that service I am going go to the firewall >> packet filter and allow ssh and 443 so I have a totally open admin scenario whilst I set things up.

These will be removed when all methods are implemented and the server is ready to go live.


Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 30, 2012, 12:53:38 pm
Then I am going to jump ahead a little and install a DHCP server on the static IP declaration and give it a range of x.x.x.16 to x.x.x.254
Install LTSP and before I create any users ensure that LDAP users have pam accounts.

Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 30, 2012, 01:34:15 pm
So in the dhcp In the advanced options I set the NEXT server to Zentyal LTSP and create a user.

Build an image in this case 32bit thin.

I am using a VM for my client and with virtualbox only the AMD PC-Net Fast III suports PXE.
So I have disabled all other boot methods and pushed up network to the top of the boot order and enabled.

This works and the client boots but at logon I just get a message "No response from server, restarting"

Dunno why but building a client or updating an image seems to require a server reboot.

I know from experience that this isn't going to work as I have a headless server trying to run an x11 session.

Firstly I don't what the connection is between LTSP and LSB but my first awareness of LSB was by running ltsp-info

webadmin@zentyal:~$ ltsp-info
server information:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise

server packages:
ii ldm-server 2:2.2.9-1ubuntu0.1
ii ltsp-server 5.3.7-0ubuntu2.2
un ltsp-utils <none>
ii ltspfs 1.1-2

packages in chroot: /opt/ltsp/i386
ii ldm 2:2.2.9-1ubuntu0.1
un ldm-themes <none>
ii ldm-ubuntu-theme 2:2.0.47
un ldm-ubuntu-themes <none>
ii ltsp-client 5.3.7-0ubuntu2.2
ii ltsp-client-core 5.3.7-0ubuntu2.2
ii ltspfsd 1.1-2
ii ltspfsd-core 1.1-2

found: /opt/ltsp/i386/etc/lts.conf

found image: /opt/ltsp/images/i386.img


No LSB modules are available. Makes me think that maybe they should be.

So scratching my head I am going to do two things
apt-get install lsb and LDM_DEBUG_TERMINAL = True in the general options should hopefully give me a log of whats going on.

Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 30, 2012, 02:07:23 pm
Sep 30 12:44:46 zentyal nbd_server[2364]: Authorized client
Sep 30 12:44:46 zentyal nbd_server[4010]: Starting to serve
Sep 30 12:44:46 zentyal nbd_server[4010]: Size of exported file/device is 267427840
Sep 30 12:44:46 zentyal nbd_server[4010]: Disconnect request received.
Sep 30 12:44:46 zentyal nbd_server[2364]: Child exited with 0

Also the options directive gives me a new log /var/log/zentyal/access-desktop-services.log
But unfortunately empty

Because LSB is now installed I get a message telling me that there is no .xsession files or windowmanger or session to run a session.
Syslog gives some info but not much Child exited with 0 ?

https://wiki.edubuntu.org/LTSPLoginAndSessionHandling

This also lends weight to a hunch that something is wrong with the Zentyal implementation as when you do install a DE that the session is running on the server rather than the chroot that has been created. Or that is the manner its supposed to?

This is also something that I don't like the idea of as firstly it would seem that I am having to butcher my clean headless server further to that I am beginning to install apps such as libre office and gimp so that my thin clients have those applications.

I keep thinking this can't be right surely but if so then I have another option to the 340mb install of LSB before we get to lubuntu-desktop and applications on my PDC.

Its not image size that I am worried about though in a server especially a pdc shouldn't we have some isolation?
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on September 30, 2012, 09:38:18 pm
I have been working on the premise that I am not happy with the additions LTSP brings to my server.

I have the horsepower (quad processor) and ram available so I am thinking yeah an LXC container would provide better performance than a hypervisor whilst providing the isolation I wish for.

I am stuck on the networking side and you help would be greatly appreciated.

I am also waiting for samba4 to be a little more stable so I am using the ldap slave to create a second instance of zentyal.
The ldap slave seems to be only able to support a singular instance but when samba4 becomes a little more hardened then replication becomes very easy.
So I can have various ltsp servers offering different distro's and with a little tinkering they will be available when needed.

lxc has some great commands lxc-clone just makes it child's play to use a template and make a couple of changes.

Also lxc-start-ephemeral is great as it means what ever changes made during use will just return back to the original blank canvas on reuse.
 
That way I get my favourite server web gui and all the goodies it supplies.

I could use anything for the container and it might be fedora or bodhi for arm clients.

I will just run through the lxc side of getting things going.

sudo apt-get install lxc
sudo lxc-create -t ubuntu -n zentyal1
sudo lxc-start --name zentyal1

the default logon is ubuntu|ubuntu
and there I am straight away in a another version of ubuntu server
its minimal install so I am going to add a bit more guts
sudo apt-get install ubuntu-standard
I am going to do the standard install of zentyal and thats why I included all the previous stuff about doing it on a standard ubuntu install. So add the debs and update install core and software and build a ltsp server that is a slave of the host.

This way I have a separate ltsp server with a desktop and applications loaded.

Its really simple but the only place I am struggling is the networking.
So that the host zentyal knows that the lxc-zentyal is internal and safe I am thinking that the eth ports should be defined in the host and picked up in lxc-zentyal with the =phys directive.

So what I am trying is to create a virtual eth on vlan-internal which will be lxc-zental wan and then have a second eth port that is separate based on another subnet from the normal internal lan.
My normal internal lan is on vlan100 and 192.168.3.0 and what I am trying to do is have a thin client network on 192.168.4.0.

Those bits look like they should work and in lxc-zentyal I should be able to grab hold with -phys declaration.
What I am confused about is that firstly I would like to say hey this network is safe but I am not going to provide any routing and leave this subnet as safe but not routable unless its going through lxc-zentyal and subsequently host-zentyal.

I created a normal internal vlan v100 and created a virtual eth v1 on 192.168.3.2 which I wanted to pass to lxc-zentyal as its wan port.

I have rebooted and this port is not turning up in the desktop or interfaces?

Also I think hopefully you might know what I am trying to achieve but I am going about this the wrong way?

 
The default bridge lxcbr0 is because I haven't specified any in lxc.conf so its has created one for me.
Title: Re: LTSP FAT Client applications
Post by: FarquahrWindsor on October 02, 2012, 01:24:45 pm
Sep 30 12:44:46 zentyal nbd_server[2364]: Authorized client
Sep 30 12:44:46 zentyal nbd_server[4010]: Starting to serve
Sep 30 12:44:46 zentyal nbd_server[4010]: Size of exported file/device is 267427840
Sep 30 12:44:46 zentyal nbd_server[4010]: Disconnect request received.
Sep 30 12:44:46 zentyal nbd_server[2364]: Child exited with 0

Also the options directive gives me a new log /var/log/zentyal/access-desktop-services.log
But unfortunately empty

Because LSB is now installed I get a message telling me that there is no .xsession files or windowmanger or session to run a session.
Syslog gives some info but not much Child exited with 0 ?

https://wiki.edubuntu.org/LTSPLoginAndSessionHandling

This also lends weight to a hunch that something is wrong with the Zentyal implementation as when you do install a DE that the session is running on the server rather than the chroot that has been created. Or that is the manner its supposed to?

This is also something that I don't like the idea of as firstly it would seem that I am having to butcher my clean headless server further to that I am beginning to install apps such as libre office and gimp so that my thin clients have those applications.

I keep thinking this can't be right surely but if so then I have another option to the 340mb install of LSB before we get to lubuntu-desktop and applications on my PDC.

Its not image size that I am worried about though in a server especially a pdc shouldn't we have some isolation?

Anybody out there able to tell me where LTSP operates is it just a simple x11 session actually at server level?

I have been trying to run in an lxc container so I get isolation and I have managed to slave a full zentyal and grabbed a second subnet vlan200

But I hit a problem. LXC is basically a super chroot so I guess its no possible to chroot a chroot?
sudo chroot /opt/ltsp/i386 mount -t proc proc /proc
mount: block device proc is write-protected, mounting read-only
mount: cannot mount block device proc read-only