Virtual LTSP server project automates installation and configuration of LTSP server with vagrant. It is the easiest way to set up LTSP yet. LTSP allows computers of a LAN to boot through the network from a single server. Same LTSP server can be set up on VirtualBox. So we have created a provisioner script to install and configure LTSP to a vagrant box. Also created other scripts to create LTSP clients, start a proxy DHCP server, etc.
LTSP server has two main modes of operation: standalone and normal. These depend on whether we have a DHCP server in the LAN or not.
-
Standalone means that the LTSP server provides DHCP services to the clients. Clients have access to the internet through LTSP server. Hence the LTSP server is the gateway to the internet. Note that in case of standalone mode the router should be configured to not provide DHCP services. Otherwise, the setup will not work since the client will not be able to get ip address.
-
Normal (proxy DHCP) means that the LTSP server does not provide DHCP service to the clients. Instead there is an existing DHCP server in the LAN that does this. In this case, the LTSP server usually is not the gateway to the Internet. Here LTSP server just provides booting information.
You can refer to wiki pages for more information on modes of operation - dev--LTSP/wiki/Mode-of-operation-LTSP
For this project, there are two requirements. Also, it is recommended to use the latest version for these two -
-
Virtualbox - Installation is different in different distributions. Best option is to visit - https://www.virtualbox.org/wiki/Downloads
-
Vagrant - you may install latest version of vagrant by -
VAGRANT_VERSION=2.1.2 wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb sudo dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb
git clone https://github.com/docker-scripts/dev--LTSP.git -b bionic
cd dev--LTSP
- Open
settings.sh - Set the interface you want to use by changing
LAN_IFand save it. - Do a
vagrant up - You will have ltsp-server setup in normal mode
- Do a
./client.shto start the virtual client
- Open
settings.sh - Change the
STANDALONEvariable toyes - Set the interface you want to use by changing
LAN_IF - Change the
LAN_IPvariable to whichever IP address you want for ltsp server and save it. - Do a
vagrant upfrom the terminal - You will have ltsp-server setup in standalone mode.
- Do a
./client.shto start the virtual client
Virtual ltsp server project supports automated testing. It is meant to be done with a single computer. test.sh script is used for that.
./test.sh [start/stop]
- Change the
STANDALONEtoyesornoto set the mode of operation of ltsp server. - do a
./test.sh startto start testings. you should see client booting from the server at the end of it - do a
./test.sh stopto stop after the test is completed. It will destroy virtual interface, ltsp-server and client.
-
vagrant upThis command will start the vagrant box and also install and configure LTSP if ran for the first time.
-
vagrant statusThis will tell the current state of the vagrant box. Whether it is running, powered off or not created.
-
vagrant provisionThis will run the provisioner script defined.
-
vagrant haltThis stops the ltsp server vagrant box.
-
vagrant destroyThis command will completely destroy the ltsp server.
More information about vagrant can be found on their official documentation - https://www.vagrantup.com/docs/
Please refer to the wiki page for more details regarding Virtual LTSP Server project - https://github.com/docker-scripts/dev--LTSP/wiki
This project is developed and maintained by Deepanshu Gajbhiye. It is one of the Google Summer of code Project. Here is the final report for it:
https://gist.github.com/d78ui98/138c986dffc4d7a094e3ec1c63b545ba
I would like to thank Dashamir Hoxha and Akash Shende for guiding, helping and mentoring for this project.