SALI Server suite
Here at SARA we have developed a SALI server suite that replaces the Systemimager server software. It consists of:
- Bittorrent client
- Torrent tracker
- Monitoring (Currently not stable)
- Image creator for bittorrent
Installation
- Export the source of SALI through svn
dennis@saralt0179:~/Development/sali$ svn export https://subtrac.sara.nl/oss/sali/svn/trunk/server A server A server/debian A server/debian/control A server/debian/pyversions A server/debian/compat <CUT> A server/SaliBitTornado/SocketHandler.py A server/SaliBitTornado/parseargs.py Exported revision 531. dennis@saralt0179:~/Development/sali$
Then there are currenlty two ways to install the SALI server tools. Via the debian package management or via Python distutils.
Installation via debian package management
- Make sure that you have the following debian packages installed; cdbs and fakeroot
- Change your directory to the exported svn directory
dennis@saralt0179:~/Development/sali$ cd server/ dennis@saralt0179:~/Development/sali/server$
- Run the debian/rules makefile
dennis@saralt0179:~/Development/sali/server$ fakeroot ./debian/rules binary pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions test -x debian/rules dh_testroot dh_clean -k dh_clean: dh_clean -k is deprecated; use dh_prep instead dh_installdirs -A mkdir -p "." /usr/share/cdbs/1/rules/buildcore.mk:109: WARNING: DEB_STRIP_EXCLUDE is a deprecated variable mkdir -p debian/python-module-stampdir cd . && \ python setup.py build \ --build-base="/home/dennis/Development/sali/server/./build" <CUT> dh_md5sums -psali dh_builddeb -psali dpkg-deb: building package `sali' in `../sali_1.5.0-6_all.deb'. dennis@saralt0179:~/Development/sali/server$
- Install the generated deb package
sudo dpkg -i ../sali_1.5.0-6_all.deb
other linux distributions
- Change your directory to the exported svn directory
dennis@saralt0179:~/Development/sali$ cd server/ dennis@saralt0179:~/Development/sali/server$
- Install SALI server tools with python; python setup.py install
- Copy the file debian/init to /etc/init.d/sali`
- Copy the file debian/default to /etc/default/sali
Configuration
There are two main configuration files. They are located at /etc/default/sali and /etc/sali/sali.cfg.
The configuration file /etc/default/sali has three options:
option | description |
---|---|
SALI_ENABLED | Should SALI be started when your machine is started, (also check update-rc.d and chkconfig) |
SALI_CMD | Where is the SALI command, i.e. /usr/sbin/sali_server |
SALI_CONFIG | Where is the main configuration of SALI server located, i.e. /etc/sali/sali.cfg |
For more information about sali.cfg. See the information here below.
DEFAULT
option | description |
---|---|
maindir | The main location of SALI where the data is stored, i.e. /data/sali |
logdir | The location where SALI should store the log files, i.e. /var/log/sali |
loglevel | Number from 1 (more) until 5 (less) |
pidfile | Where should the pidnumber be stored, i.e. /var/run/sali.pid |
serveraddress | On which address must the server listen, i.e. 0.0.0.0 |
rsync
option | description |
---|---|
stubdir | Location of the rsync stub files, i.e. /etc/sali/rsync_stubs |
configfile | Where must the rsync file be written to, i.e. /etc/sali/rsyncd.conf |
stubsext | The extension of the stub file, so only that type of file is included |
monitor
Is not working correctly, advise is to disable this function.
option | description |
---|---|
enabled | Should the monitor be enabled, True/False |
port | On which port must the monitor use, i.e. 8181 |
filedestination | The destination of the monitor data (new format) |
si_monitortk | Enable/disable backwards compatibility with the si_monitortk tool of systemimager (currently not working), True/False |
si_client | Where is the clients.xml located. i.e. /var/lib/systemimager/clients.xml |
update
option | description |
---|---|
enabled | Should we automatically create torrent images, True/False |
imagedir | Where are the images located, i.e. /data/sali/images |
images | Which images must be enabled for torrent (separated with ,) |
sleeptime 300 | How long should we wait to check for image updates |
compress | Should we compress the image (with gzip), True/False |
tarcommand | Which tar command must we use, leave empty to auto detect |
trackeradress | Specify the tracker address. Se below for extra explanation |
trackeradress
There are 3 ways to specify a tracker address.
Single tracker:
http://192.168.1.1:6969/announce
Multiple trackers:
http://192.168.1.1:6969/announce, http://172.16.1.1:6969/announce, http://10.0.0.1:6969/announce
Wilcard tracker:
http://0.0.0.0:6969/announce
Here at SARA we use the wildcard method, with this method the SALI server tools will detect all your network interfaces and replaces the 0.0.0.0 with an actual ip for every interface. So the generated torrent file has multiple tracker locations. Uses the ip command.
bittorrent
option | description |
---|---|
torrentsdir | Where are the torrent images located, i.e. /data/sali/torrents |
enable_bittorrent | Should we enable bittorrent client, True/False |
enable_tracker | Must the tracker be started, True/False |
tracker
See all options in the online man page: http://pwet.fr/man/linux/commandes/bttrack_bittornado
We are using the following options:
option | value | description |
---|---|---|
port | 6969 | Start the tracker on the default port 6969 |
logfile | /var/log/sali/tracker.log | Enable logging |
dfile | /var/log/sali/dstate | This option is required when the tracker is enabled |
allow_get | 1 | Allows you to download the torrent file from the tracker web interface |
seeder
See all options in the online man page: http://pwet.fr/man/linux/commandes/bittorrent_downloader_bittornado
option | value | description |
---|---|---|
rerequest_interval | 1 | Allow more peer request per second |
max_upload_rate | 0 | Allow unlimited upload |