[[PageOutline]] = ImageServer installation = First download the stable version of SALI from: - ftp://ftp.surfsara.nl/pub/sali/sali.tar.gz. Extract the tarball {{{ #!sh # cd /var/tmp # wget ftp://ftp.surfsara.nl/pub/sali/sali.tar.gz # tar xvf sali.tar.gz }}} All files are available in the directory `sali-VERSION` == DHCP configuration == For PXE booting you will need to install a DHCP server. On our site we use the [http://www.isc.org/software/dhcp ISC DHCP server]. The configuration here below shows an example on how to configure the pxeboot functionality on your network. {{{ # define the option option sali-imgsrv code 224 = ip-address; # Admin network # subnet 192.168.144.0 netmask 255.255.248.0 { # The value for sali-imgsrv has to be an ip address option sali-imgsrv 192.168.146.10; next-server 192.168.146.10; filename "pxelinux.0"; }/ }}} Optional you can specify a special dhcp option that SALI uses to identify which imageserver must be used. We have chosen for option code 224. == TFTP/PXE environment == Make sure that the your PXE-enabled network card is your first boot device. So you will have complete control of your node. === TFTP === To setup a TFTP enviroment you can visit one of the following pages - RedHat/Centos/Fedora, http://www.thelinuxdaily.com/2010/02/guide-on-tftp-server-setup-in-fedora/ - Ubuntu/Debian, http://mohammadthalif.wordpress.com/2010/03/05/installing-and-testing-tftpd-in-ubuntudebian/ - SUSE/OpenSuse, http://sellingfreesoftwareforaliving.blogspot.nl/2011/11/install-and-configure-tftp-server-for.html Copy the following files from the extracted tar.gz to your tftp directory. Depending on your operating systems this can be `/srv/tftpboot, /var/lib/tftboot`. In our examples we shall use `/data/tftp` {{{ # cd /data/tftp # mkdir sali # cd sali/ # cp -a /var/tmp/sali-1.5.8/x86_64 . # ls -1 x86_64/ initrd.img kernel # ln -s x86_64 default }}} === PXE === To setup a dynamic PXE environment visit our project [https://oss.trac.surfsara.nl/pxeconfig pxeconfig] If you have setup your PXE environment, copy the example file to the `pxelinux.cfg` directory in your `tftp` root. {{{ # cd /var/tmp/sali-1.5.8/examples # cp pxelinux.example /data/tftp/pxelinux.cfg/default.sali_test }}} The default action of the `default.sali_test` is starting a SALI rescue shell: {{{ # pxeconfig -f default.sali_test }}} == SALI Server Tools == The SALI server Tools consists of: - Bittorrent client - Torrent tracker - Monitoring (Currently not stable) - Rsync configuration file generator - Imaging a node via rsync - Automatically converting rsync images to torrent images === Installation === Requirements: - Python > 2.5 < 3.0 - rsync ==== Ubuntu/Debian installation ==== Make sure that the following packages are installed - `cdbs` Now create a debian package {{{ # cd /var/tmp/sali-1.5.8/server # ./debian/rules binary }}} Finally you can install the created debian package {{{ # cd /var/tmp/sali-1.5.8 # dpkg -i sali_1.5.8-1_all.deb }}} ==== Installation for other distributions ==== {{{ # cd /var/tmp/sali-1.5.8 # python setup.py install }}} After you have installed SALI you have to install some files manually: {{{ # cd /var/tmp/sali-1.5.8 # cp debian/init /etc/init.d/sali # cp debian/default /etc/default/sali }}} ==== Directory structure ==== Default SALI installation needs the following directory structure: {{{ /data/sali/ /data/sali/images/ /data/sali/notorrent/ /data/sali/scripts/ /data/sali/torrents/ /var/log/sali/ }}} Installing some example scripts {{{ # cd /data/sali/scripts # cp -a /var/tmp/sali-1.5.8/example/post-install . # cp /var/tmp/sali-1.5.8/example/masterscript.new base_script # cd /etc/sali # cp -a /var/tmp/sali-1.5.8/example/sali_image_dir_exclude exclude }}} We have written a small wrapper script around the `sali getimage` command. {{{ # cd /usr/sara/sbin # cp /var/tmp/sali-1.5.8/contrib/getimage . }}} === Starting the services === To start SALI initiate the following: {{{ /etc/init.d/sali start }}} This will not start the `rsync` server. For this you must use the rsync init script supplied by your distribution. For example debian: {{{ sali rsync /etc/init.d/rsync start }}} The `sali rsync` command will generate a rsyncd.conf file in `/etc/rsyncd.conf`. If you want to save the rsyncd.conf in a different location adjust the `/etc/sali/sali.cfg` file. === Checking if SALI is running === First check on what the PID number is of the `sali_server` process: {{{ # ps -ef|grep sali_serverroot 2952 1 0 Jan26 ? 00:44:19 /usr/bin/python /usr/sbin/sali_server /etc/sali/sali.cfg star }}} And with the command `lsof` we can check on which ports `sali_server` is listening: {{{ # lsof -p 2952 | egrep "TCP|UDP" python 2952 root 13u IPv4 10559 0t0 TCP *:8181 (LISTEN) python 2952 root 17u IPv4 10560 0t0 TCP *:6969 (LISTEN) python 2952 root 18u IPv4 10567 0t0 TCP *:22456 (LISTEN) }}}