Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2006-07-26 11:14:57
Size: 5401
Editor: ?fiandro
Comment: Created wiki page about cdebconf's web frontend
Revision 8 as of 2009-03-16 03:32:42
Size: 4918
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
This wiki page is about a frontend module for cdebconf, debian-installer's installation core, that i wrote to allow people to perform remote graphical Debian installations using a simple tool as a web browser on the client side. This wiki page is about a frontend module for [[cdebconf]], debian-installer's installation core, that i wrote to allow people to perform remote graphical Debian installations using a simple tool as a web browser on the client side.

Some [[http://nausicaa.polito.it/~attilio/debian/web_frontend/screenshots/|screenshots]] are available to illustrate what a typical web Debian installation would be.
Line 13: Line 15:
How about if you add ssh server to installer and do install with ssh conection? sshd.udeb maybe exsist already. Add pereseed file to install sshd.udeb and get root ssh key. After that do ssh connect and perform installation.
Line 15: Line 19:
You can download sourcecode and comanion CGI files from our SVN repository You can download sourcecode and comanion CGI files from this location
Line 18: Line 22:
svn co https://debian.polito.it/svn/centro_di_competenza/w-i/trunk/ w-i http://nausicaa.polito.it/~attilio/debian/web_frontend/web/
Line 23: Line 27:
Currently, no work has to be done yet to package the web frontend nor the web server for use in the d-i, so no standard installation images are available for testing, but it's possible performing a network-based debian installation by following the below described procedure (a bit hacky, but it works :).

Of course, you'll need two machines to perform a network instalation: a "browser" machine equipped with a web browser (at your choice) and a "target" machine and both machines will have to be network-connected togheter.

Also, this installation procedure is for i386 only asprecomiled web frontend was compiled for such architecture, but PPC or whatever else instalations can be done if you recompile sources.

After getting a standard i386 d-i installation image (miniiso images are small and suitable for testing the web frontend) and booting the target machine with it, configure the network settings on the target machine so that it can talk with the browser machine and viceversa.

Then, after the network is configured on the target machine, perform the following steps

 * Switch to VT2 by pressing ctrl-alt-F2
 * Download the tarball
 * Unpack the tarball into d-i filesystem
 * Run the d-i using the web frontend

with the following set of commands
Pick this installation ISO
Line 41: Line 30:
wget --no-check-certificate https://debian.polito.it/downloads/web_frontend/web.tgz
tar -xvzf w-i.tgz
export DEBIAN_FRONTEND=web /etc/init.d/thttpd start
debian-installer
http://nausicaa.polito.it/~attilio/debian/web_frontend/mini.iso
Line 47: Line 33:
Now, a web server should be running on the target machine, listening at port 8000: point your web browser at http://<target machine's ip address>:8000/cdebconf.cgi and have a happy network installation! :) boot it as usual, configure the network so that the target machine is reachable on your local net and then, by both opening a shell or switching to VT2, do

{{{
debian-installer-web
}}}

Now, a web server should be running on the target machine, listening at port 8000: point your web browser at
{{{
http://<target machine's ip address>:8000/cgi-bin/cdebconf.cgi
}}}

and have a happy web-installation! :)
Line 55: Line 52:
Currently, i'm using [http://www.acme.com/software/thttpd/ THTTPD] web server for testing in the d-i, as it proved to be small, well maintained and offers needed CGI suport, but the web frontend can cooperate with any existing, CGI caèable, web server. I successfully experimented [[http://www.acme.com/software/thttpd/|THTTPD]] web server: it proved to be small, well maintained and offers needed CGI suport, but of course the web frontend can cooperate with any existing, CGI capable, web server.
Line 59: Line 56:
== How can I help? ==
Currently, the web frontend module supports the whole DEBCONF protocol (including the PROGRESSCANCEL command) but a lot of testing is needed to find bugs and fix them.
== Pending issues ==
Line 67: Line 63:
== Further development ==
Line 68: Line 66:
 * The network board should be automatically configured at boot in order for the web installer to work: should it get a static IP address, like 10.x.x.x, should the IP address be preseeded or should it self configure as a DHCP client?
 * Using an SSL socket would allow secure remote installations over the internet, but i never experimented with THTTPD and SSL
 * An authentication function, that forces the user to enter username and password, may be desireable
Line 70: Line 71:
Line 76: Line 78:
Please contact me at fiandro@tiscali.it or at attilio.fiandrotti@multimedia.polito.it Please contact me at attilio.fiandrotti@gmail.com

Remotely installing Debian using a web browser

This wiki page is about a frontend module for ?cdebconf, debian-installer's installation core, that i wrote to allow people to perform remote graphical Debian installations using a simple tool as a web browser on the client side.

Some screenshots are available to illustrate what a typical web Debian installation would be.

Why was this built?

Imagine you're a sysadmin who has to install Debian on a blind target machine ( no monitor nor input devices available ), then you would probably have to remove the machine from its location, carry it to the laboratory, connect I/O devices, installing the software and moving back the server to its place (whew, what a sweat!).

Wouldn't be nice if you could boot the target machine with a cdrom and continue the installation from your office using a web browser ?

The idea is booting the target machine with a Debian installation image preseeded with a fixed / dynamicaly assigned ip address that start up a web server that allows the sysadmin to connect to with a simple web browser and perform the whole installation process comfortaby sat at his desk.

How about if you add ssh server to installer and do install with ssh conection? sshd.udeb maybe exsist already. Add pereseed file to install sshd.udeb and get root ssh key. After that do ssh connect and perform installation.

Where do i get it ?

You can download sourcecode and comanion CGI files from this location

http://nausicaa.polito.it/~attilio/debian/web_frontend/web/

Can i give it a try "on the road" ?

Pick this installation ISO

http://nausicaa.polito.it/~attilio/debian/web_frontend/mini.iso

boot it as usual, configure the network so that the target machine is reachable on your local net and then, by both opening a shell or switching to VT2, do

debian-installer-web

Now, a web server should be running on the target machine, listening at port 8000: point your web browser at

http://<target machine's ip address>:8000/cgi-bin/cdebconf.cgi

and have a happy web-installation! :)

How does it work?

Two distinct components take part to a Debian web installation on the target machine side: a cdebconf frontend module and a generic HTTP server capable of CGI support: original project included developing a minimal web server for the frontend living in its own thread, but later i had second toughts as i felt i was "reinventing the wheel" because many reliable CGI capable small web servers already exist.

The HTTP server is started togheter with the debian-installer and listens for user's input at a fixed IP address and user input is sent through unix pipes to the frontend module by a simple bash script that operates as a CGI application.

I successfully experimented THTTPD web server: it proved to be small, well maintained and offers needed CGI suport, but of course the web frontend can cooperate with any existing, CGI capable, web server.

The frontend module parses the input string coming from the pipe, replies back to cdebconf, waits for the next question(s) to be displayed to arrive and sends an HTML page back to the HTTP server as final answer to the user.

Pending issues

Specific issues that already have been spotted and need to be fixed include

  • Currently, the "Continue" button is placed on the left of the "Back" button: some css work has to be done here to swap places
  • When a page is displayed to the user, the first of the displayed questions should get the focus
  • Sometimes, the HTML page generated by the frontend is not correcty displayed in UTF-8 encoding

Further development

Some ideas for further development

  • The network board should be automatically configured at boot in order for the web installer to work: should it get a static IP address, like 10.x.x.x, should the IP address be preseeded or should it self configure as a DHCP client?
  • Using an SSL socket would allow secure remote installations over the internet, but i never experimented with THTTPD and SSL
  • An authentication function, that forces the user to enter username and password, may be desireable
  • A double click on a single SELECT question should activates the "Continue" button
  • Some kind of "syncookie" mechanism has to be implemented to prevent out-of-order replies by multiple HTTP clients

Also, any future integration in the d-i would require packaging both the web frontend and the web server into udebs and some work to fit everything into the iso building process: here help would be needed in the case the d-i team should decide to include this frontend module into the d-i.

Contacts

Please contact me at attilio.fiandrotti@gmail.com