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
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
- apt-get install virtualenv
- virtualenv /mina/envs/lobber
- . /mina/envs/lobber/bin/activate
- pip install django django-extensions django-tagging orbited uuid django-evolution stomp.py werkzeug
- apt-get deluge
- git clone git@git.nordu.net:lobber.git (alt. git pull)
- cd lobber
- git checkout embedded-tracker
- mkdir db
- mkdir logs
- cd src
- ./dev-django-admin.sh syncdb
- ln -s /mina/envs/lobber env
- ln -s env/lib/python2.6/site-packages/django/contrib/admin/media admin-media
- Edit paths in settings.py
- ./dev-django-admin.sh runserver_plus