Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Description of how to install the software needed for Lobber.

Hosts

Hostname

Use

app-dev.lobber.se

Web application server

db-dev.lobber.se

PgSQL server

tracker-dev.lobber.se

BT Tracker

sn-dev.lobber.se

Storage Node

All hosts are running Ubuntu (9.10 from day 0) with the following extra packages and customizations.

common to all

Code Block
apt-get install git-core git-doc ssl-cert git-core
Code Block
apt-get install postfix
# local only configuration!

app-dev.lobber.se

Code Block
apt-get install python-django apache2 libapache2-mod-shib2 python-libtorrent \
   python-bittorrent python-django-doc python-egenix-mxdatetime python-egenix-mxtools \
   python-psycopg2 python-pycurl python-openssl postgresql-client-8.4 python-twisted \
   python-setuptools python-pysqlite2 libapache2-mod-python python-django-tagging \
   python-werkzeug python-django-extensions python-django-evolution deluge-common

python-setuptools gives us easy-install which we use for installing some stuff not packaged in Debian packages:

Code Block
# easy_install orbited
# easy_install stompservice

Get a 3.x version of stomp.py from http://code.google.com/p/stomppy/ and install:

Create /etc/orbited.cfg:

Code Block
[listen]
http://:9001
stomp://:61613

[access]
* -> localhost:61613

[static]

[global]
session.ping_interval = 300
user=www-data

[logging]
debug=STDERR,debug.log
info=STDERR,info.log
access=STDERR,info.log
warn=STDERR,error.log
error=STDERR,error.log

#Don't enable debug by default
enabled.default=info,access,warn,error

och se till att orbited startas: orbited -c /etc/orbited.cfg vid boot (/etc/rc.local till nöds)

and make sure that orbited is started like this automatically at boot: orbited -c /etc/orbited.cfg

Activate some Apache modules:

Code Block
# a2enmod shib2
# a2enmod headers
# a2enmod rewrite
# a2enmod proxy
# a2enmod proxy_http

Set up cron jobs for expiring old torrents, keys and peers.

Code Block
# m h dom mon dow command
*/5 * * * * cd /../lobber/src/ && ./dev-django-admin.sh expire_peers 5 /dev/null 2>&1
0 0 * * * cd /../lobber/src/ && ./dev-django-admin.sh expire_torrents >/dev/null 2>&1
5 0 * * * cd /../lobber/src/ && ./dev-django-admin.sh expire_keys >/dev/null 2>&1 

Finally, make sure that Lobber can send email. This is done via STOMP messages to a twisted. Run this (in the src directory):

Code Block
# env PYTHONPATH=`pwd`:$PYTHONPATH twistd -y sendmail.tac

sn-dev.lobber.se

See Running a storage node

Note that app-dev is a storage node too nowadays – that's how we do file upload.

db-dev.lobber.se

Code Block
apt-get install postgresql

Setting up your own sandbox

  1. apt-get install virtualenv
  2. virtualenv /mina/envs/lobber
  3. . /mina/envs/lobber/bin/activate
  4. pip install django django-extensions django-tagging orbited uuid django-evolution stomp.py werkzeug
  5. apt-get deluge
  6. git clone git@git.nordu.net:lobber.git (alt. git pull)
  7. cd lobber
  8. git checkout embedded-tracker
  9. mkdir db
  10. mkdir logs
  11. cd src
  12. ./dev-django-admin.sh syncdb
  13. ln -s /mina/envs/lobber env
  14. ln -s env/lib/python2.6/site-packages/django/contrib/admin/media admin-media
  15. Edit paths in settings.py
  16. ./dev-django-admin.sh runserver_plus