Sorry, but i don't have time to write any proper documentation, hopefully you can figure it out for yourself.
The source is just a standard ruby on rails app, if you know anythign about them you should be able to figure it out.
How it works
The system is composed of:
* the dhcpd server which tells the machines to boot from PXE (see PXE Setup)
* the tftp server which issues kernels, ramdisks and configs to the machines including the bootloader pxelinux.0
* A set of shell scripts which do "utility tasks" running on a web server (on grendel-head) in /remotescripts
* A ruby on rails web app which modifies the pxelinux boot configuration files for each machine and stores task results.
Tasks
The system stores a set of tasks, each task consists of:
* a kernel filename (stored in /tftpboot)
* an initrd (also stored in /tftpboot)
* some parameters
Default task
the default boot task just boots the normal SUSE kernel with the default parameters
Utility Tasks
Utility tasks (like rsync operations) boot the normal kernel with a minial utility root filesystem in the initrd, this contains busybox and a bootstrap script.
to create a new utility task:
* write a script for the task and put it in /srv/grendelsrv/remotescripts (look in there for examples). The script must run under the busybox shell (similar to bash but without "function" and couple of other things)
* create a new task entry in the interface : http://grendel-head.cs.bath.ac.uk/grendelsrv/task/
* specify the kernel (vmlinux)
* specify the ramdisk (grendelutilroot.img.gz)
* for the parameters (append) use sommething like:
ramdisk_size=8192 root=/dev/ram0 do_script=http://grendel-head.cs.bath.ac.uk/grendelsrv/remotescripts/rsyncup
where the bit after do_script is replaced by the url of your new script
Rsync tasks
rsyncup
Sends an image of this machine to the rsync server, this ignores some files, to specify these files look in
/srv/grendelsrv/remotescripts/rsync_excludes
rsyncdown
updates this machine to correspond to the image and refreshes the ssh keys for this machine
Rsync Versions
Each time you rsync a machine up to the server it registers a new image version in grendelsrv, the version number of the current image is stored in
/.grendel_rsync_version
Each time a machine is rsynced down (or reboots) it notifies grendelsrv of its current version.
Machines
To list and modify the machine configurations go to: http://grendel-head.cs.bath.ac.uk/grendelsrv/machines/
For each machine in the cluster grendesrv needs to know:
* the machine's MAC address
* the machine's SSH public host key (just the key part)
* the machine's fully qualified domain name
Machine boot script
the script "grendelsrv_doneboot" should be installed in the /etc/init.d and added to the rc.d startup scripts for each machine (at the end of boot) this notifies grendelsrv that machines successfully booted, uploads ther boot logs and registers the current image version.
Useful URLs
* http://grendel-head.cs.bath.ac.uk/grendelsrv/td/ssh_known_hosts generates the current known_hosts file
* http://grendel-head.cs.bath.ac.uk/grendelsrv/td/shosts.equiv genereates the current shosts.equiv file