[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltsp-discuss
Subject:    Re: [Ltsp-discuss] Deploying LTSP In The Cloud.
From:       Mahmoud Ramadan <mahmoud.ramadan.aly () gmail ! com>
Date:       2015-09-07 9:27:18
Message-ID: CADk0r2KYyn4i3fgS2S7=48M9t1M-G2-WZ+Hvy-vZ70sdxQaipw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Helmu,
Thanks for the help and addressing that this is a valid deployment...i will
test this and contact you if something goes wrong.Thanks again.

Best Regards,

Mahmoud Ramadan Ali

Network and VOIP Specialist.

Mobil: (+2) 01276877112

Blog <http://hotciscolabs.blogspot.com/>| Website
<http://telecomandsecurity.com/>| LinkedIn
<http://ch.linkedin.com/pub/mahmoud-ali/99/923/421/en>

On Mon, Sep 7, 2015 at 10:00 AM, Helmut Lichtenberg <heli@tzv.fal.de> wrote:

> Mahmoud Ramadan schrieb am 05.09.2015 19:27:
> > I have NO problem to deploy one server in each remote site to push the
> > Thin/Fat client images to the clients in the LAN just to preserve more
> > bandwidth on the WAN then i place the LTSP servers in the cloud.
> >
> > In other words, I'm thinking to deploy TFTP and PXE in each remote site
> so
> > the clients in the LAN can PXE boot and download their images
> locally,then
> > point them in the configuration file to LTSP servers in the cloud BUT i
> do
> > NOT know what modifications i need to do to point the Thin / Fat clients
> to
> > LTSP servers other than the servers running the TFTP service? If anyone
> can
> > clear that it will be appreciated !
>
> I have separated all these services for years, and I like it. :^)
>
> 1. dhcp
> The client's PXE/dhcp requests are served by a separate dhcp server. In the
> dhcpd.conf file I have an entry like this:
>
> group {
>         # tsi2, Image ist Debian Jessie 32-bit (i386):
>         next-server 10.1.3.30;
>         option root-path "/opt/ltsp/i386";
>         if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient"
> {
>             filename "/ltsp/i386/pxelinux.0";
>         } else {
>             filename "/ltsp/i386/vmlinuz";
>         }
>         host otc3 { hardware ethernet 00:e0:c5:45:2b:85; fixed-address
> otc3; }
>         host c474 { hardware ethernet 00:01:2e:64:b5:3e; fixed-address
> c474; }
>         host hp7 { hardware ethernet c8:cb:b8:2e:0b:6e; fixed-address hp7;
> }
> }
>
> 2. ltsp image
> The dhcp server points to my image server (tsi2, 10.1.3.30). This server
> provides the nbd image (or nfs if you prefer), the tftp service, and keeps
> the
> configuration file lts.conf.
>
> In the lts.conf on tsi2 I have entries like:
>
> [c474]
>     LTS_SERVERS      = lts2 lts3
>
> [otc3]
>     LTS_SERVERS      = lts3
>
>
> 3. ltsp application server
> On my LTSP application servers (lts2, lts3), where all users work on, I
> have these
> (Debian) packages installed:
>    ldm-server
>    ldm-themes
>    ltsp-docs
>    ltsp-server
>    ltspfs
>
> 4. Selecting the least loaded terminal server at thin client boot time for
>    some basic load balancing (maybe you don't need/want this):
>
> Note: The variable LTS_SERVERS is home brewed, not standard. It is used by
> the
> script /opt/ltsp/i386/usr/share/ltsp/get_hosts. Maybe the default ltsp
> variable
> LDM_SERVER is for just this purpose. Can someone confirm this?
>
> Anyway, here's my script (shamelessly stolen from some nice guy):
>
> #!/bin/bash
>
> ##############################################################################
> # /opt/ltsp/i386/usr/share/ltsp/get_hosts
>
> ##############################################################################
>
> echo `date` >/tmp/lts-serverlist
> LIST=""
>
> # Load query on all servers
> for i in $LTS_SERVERS; do
>     LOAD=`nc $i 9571|grep rating|cut -d: -f2`
>     if test $LOAD; then
>         # add to the list
>         LIST="$LIST$LOAD $i\n"
>     fi
> done
>
> # Now LIST contains the list of servers sorted by load
> LIST=`echo -e $LIST | sort -nr`
> echo $LIST >>/tmp/lts-serverlist
>
> # Check if the 1st items have the same load. If so, randomly choose one.
> OLDIFS=$IFS
> IFS="
> "
> BESTLIST=( )
> I=0
> for LINE in $LIST ;do
>     LOAD=`echo $LINE|cut -f 1 -d " "`
>     if [ "$OLDLOAD" -a "$LOAD" != "$OLDLOAD" ] ;then
>         break
>     fi
>     BESTLIST[$I]="$LINE"
>     OLDLOAD=$LOAD
>     I=$((I+1))
> done
> RAND=$(( $RANDOM % $I ))
> # print the choosen host
> echo ${BESTLIST[$RAND]} | cut -f 2 -d " "
>
> # and once again into a file for logging:
> echo The Best: >>/tmp/lts-serverlist
> echo ${BESTLIST[$RAND]} | cut -f 2 -d " " >>/tmp/lts-serverlist
>
> exit 0
>
> ##############################################################################
>
> HTH
> Regards
> Helmut
>
> --
> -------------------------------------------------------------------------
> Helmut Lichtenberg  <Helmut.Lichtenberg@fli.bund.de>  Tel.: 05034/871-128
> Institut für Nutztiergenetik (FLI)         31535 Neustadt         Germany
> -------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> _____________________________________________________________________
> 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
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi <span name="Helmut Lichtenberg" \
class="">Helmu,<br></span></div><span name="Helmut Lichtenberg" class="">Thanks for \
the help and addressing that this is a valid deployment...i will test this and \
contact you if something goes wrong.Thanks again.<br> </span></div><div \
class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div \
dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p><span \
style="line-height:107%"><font face="georgia, serif" size="2">Best \
Regards,</font></span></p><p><span style="line-height:107%"><font face="georgia, \
serif" size="2">Mahmoud Ramadan Ali</font></span></p><p><span \
style="line-height:107%"><font face="georgia, serif" size="2">Network and VOIP \
Specialist.</font></span></p><p>





</p><p><font face="georgia, serif" size="2"><span \
style="line-height:107%">Mobil:</span><span \
style="line-height:107%;color:rgb(31,73,125)"> </span><span \
style="line-height:107%">(+2) 01276877112</span></font></p><p><span \
style="line-height:107%"><font face="georgia, serif" size="2"><a \
href="http://hotciscolabs.blogspot.com/" target="_blank">Blog </a>| <a \
href="http://telecomandsecurity.com/" target="_blank">Website </a>| <a \
href="http://ch.linkedin.com/pub/mahmoud-ali/99/923/421/en" \
target="_blank">LinkedIn</a></font></span></p></div></div></div></div></div></div></div>
 <br><div class="gmail_quote">On Mon, Sep 7, 2015 at 10:00 AM, Helmut Lichtenberg \
<span dir="ltr">&lt;<a href="mailto:heli@tzv.fal.de" \
target="_blank">heli@tzv.fal.de</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">Mahmoud Ramadan schrieb am 05.09.2015 \
19:27:<br> &gt; I have NO problem to deploy one server in each remote site to push \
the<br> &gt; Thin/Fat client images to the clients in the LAN just to preserve \
more<br> &gt; bandwidth on the WAN then i place the LTSP servers in the cloud.<br>
&gt;<br>
&gt; In other words, I&#39;m thinking to deploy TFTP and PXE in each remote site \
so<br> &gt; the clients in the LAN can PXE boot and download their images \
locally,then<br> &gt; point them in the configuration file to LTSP servers in the \
cloud BUT i do<br> &gt; NOT know what modifications i need to do to point the Thin / \
Fat clients to<br> &gt; LTSP servers other than the servers running the TFTP service? \
If anyone can<br> &gt; clear that it will be appreciated !<br>
<br>
</span>I have separated all these services for years, and I like it. :^)<br>
<br>
1. dhcp<br>
The client&#39;s PXE/dhcp requests are served by a separate dhcp server. In the<br>
dhcpd.conf file I have an entry like this:<br>
<br>
group {<br>
            # tsi2, Image ist Debian Jessie 32-bit (i386):<br>
            next-server 10.1.3.30;<br>
            option root-path &quot;/opt/ltsp/i386&quot;;<br>
            if substring( option vendor-class-identifier, 0, 9 ) = \
&quot;PXEClient&quot; {<br>  filename &quot;/ltsp/i386/pxelinux.0&quot;;<br>
            } else {<br>
                  filename &quot;/ltsp/i386/vmlinuz&quot;;<br>
            }<br>
            host otc3 { hardware ethernet 00:e0:c5:45:2b:85; fixed-address otc3; \
                }<br>
            host c474 { hardware ethernet 00:01:2e:64:b5:3e; fixed-address c474; \
                }<br>
            host hp7 { hardware ethernet c8:cb:b8:2e:0b:6e; fixed-address hp7; }<br>
}<br>
<br>
2. ltsp image<br>
The dhcp server points to my image server (tsi2, 10.1.3.30). This server<br>
provides the nbd image (or nfs if you prefer), the tftp service, and keeps the<br>
configuration file lts.conf.<br>
<br>
In the lts.conf on tsi2 I have entries like:<br>
<br>
[c474]<br>
      LTS_SERVERS         = lts2 lts3<br>
<br>
[otc3]<br>
      LTS_SERVERS         = lts3<br>
<br>
<br>
3. ltsp application server<br>
On my LTSP application servers (lts2, lts3), where all users work on, I have \
these<br> (Debian) packages installed:<br>
     ldm-server<br>
     ldm-themes<br>
     ltsp-docs<br>
     ltsp-server<br>
     ltspfs<br>
<br>
4. Selecting the least loaded terminal server at thin client boot time for<br>
     some basic load balancing (maybe you don&#39;t need/want this):<br>
<br>
Note: The variable LTS_SERVERS is home brewed, not standard. It is used by the<br>
script /opt/ltsp/i386/usr/share/ltsp/get_hosts. Maybe the default ltsp variable<br>
LDM_SERVER is for just this purpose. Can someone confirm this?<br>
<br>
Anyway, here&#39;s my script (shamelessly stolen from some nice guy):<br>
<br>
#!/bin/bash<br>
##############################################################################<br>
# /opt/ltsp/i386/usr/share/ltsp/get_hosts<br>
##############################################################################<br>
<br>
echo `date` &gt;/tmp/lts-serverlist<br>
LIST=&quot;&quot;<br>
<br>
# Load query on all servers<br>
for i in $LTS_SERVERS; do<br>
      LOAD=`nc $i 9571|grep rating|cut -d: -f2`<br>
      if test $LOAD; then<br>
            # add to the list<br>
            LIST=&quot;$LIST$LOAD $i\n&quot;<br>
      fi<br>
done<br>
<br>
# Now LIST contains the list of servers sorted by load<br>
LIST=`echo -e $LIST | sort -nr`<br>
echo $LIST &gt;&gt;/tmp/lts-serverlist<br>
<br>
# Check if the 1st items have the same load. If so, randomly choose one.<br>
OLDIFS=$IFS<br>
IFS=&quot;<br>
&quot;<br>
BESTLIST=( )<br>
I=0<br>
for LINE in $LIST ;do<br>
      LOAD=`echo $LINE|cut -f 1 -d &quot; &quot;`<br>
      if [ &quot;$OLDLOAD&quot; -a &quot;$LOAD&quot; != &quot;$OLDLOAD&quot; ] \
;then<br>  break<br>
      fi<br>
      BESTLIST[$I]=&quot;$LINE&quot;<br>
      OLDLOAD=$LOAD<br>
      I=$((I+1))<br>
done<br>
RAND=$(( $RANDOM % $I ))<br>
# print the choosen host<br>
echo ${BESTLIST[$RAND]} | cut -f 2 -d &quot; &quot;<br>
<br>
# and once again into a file for logging:<br>
echo The Best: &gt;&gt;/tmp/lts-serverlist<br>
echo ${BESTLIST[$RAND]} | cut -f 2 -d &quot; &quot; &gt;&gt;/tmp/lts-serverlist<br>
<br>
exit 0<br>
##############################################################################<br>
<br>
HTH<br>
Regards<br>
<span class="HOEnZb"><font color="#888888">Helmut<br>
<br>
--<br>
-------------------------------------------------------------------------<br>
Helmut Lichtenberg   &lt;<a \
href="mailto:Helmut.Lichtenberg@fli.bund.de">Helmut.Lichtenberg@fli.bund.de</a>&gt;   \
Tel.: 05034/871-128<br> Institut für Nutztiergenetik (FLI)              31535 \
                Neustadt              Germany<br>
-------------------------------------------------------------------------<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
------------------------------------------------------------------------------<br>
_____________________________________________________________________<br>
Ltsp-discuss mailing list.     To un-subscribe, or change prefs, goto:<br>
         <a href="https://lists.sourceforge.net/lists/listinfo/ltsp-discuss" \
rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/ltsp-discuss</a><br>
 For additional LTSP help,     try #ltsp channel on <a href="http://irc.freenode.net" \
rel="noreferrer" target="_blank">irc.freenode.net</a><br> \
</div></div></blockquote></div><br></div>



------------------------------------------------------------------------------


_____________________________________________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic