2010-11-28 15:06:48 +00:00
|
|
|
pan.do/ra - open media archive
|
|
|
|
|
|
|
|
== DEVELOPMENT ==
|
|
|
|
To setup a development instance of pan.do/ra,
|
|
|
|
you need python, bazaar, pip and virtualenv and several other python modules:
|
|
|
|
|
|
|
|
* Packages
|
|
|
|
apt-get install python-setuptools python-pip python-virtualenv ipython
|
2010-11-30 13:45:13 +00:00
|
|
|
apt-get install python-dev python-imaging python-numpy python-psycopg2
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-07-03 11:14:16 +00:00
|
|
|
bzr branch http://code.0x2620.org/pandora pandora
|
2010-02-16 10:22:34 +00:00
|
|
|
cd pandora
|
2009-12-31 15:04:32 +00:00
|
|
|
virtualenv .
|
|
|
|
pip -E . install -r requirements.txt
|
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
cd static
|
|
|
|
bzr branch http://code.0x2620.org/oxjs
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* Additional pandora tools:
|
|
|
|
You need current versions of mkvtoolnix, oxframe, oxtimeline installed.
|
|
|
|
For Ubuntu we provide these packages in a ppa:
|
|
|
|
sudo apt-get install python-software-properties
|
|
|
|
sudo add-apt-repository ppa:j/pandora
|
|
|
|
sudo add-apt-repository ppa:gstreamer-developers/ppa
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install oxframe oxtimeline mkvtoolnix
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* Database
|
|
|
|
We use postgresql but other databases might also work
|
|
|
|
(make sure you have the python bindings installed).
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
create a postgresql database and adjust settings in local_settings.py
|
|
|
|
and run python manage.py syncdb to populate the database
|
|
|
|
you might want to load example configurations from fixutes.
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* RabbitMQ
|
|
|
|
For background tasks we use RabbitMQ, to install rabbitmq:
|
2009-12-31 15:04:32 +00:00
|
|
|
sudo apt-get install rabbitmq-server
|
2010-11-28 15:06:48 +00:00
|
|
|
|
|
|
|
and create permissions according to BROKER_* in local_settings.py i.e.:
|
|
|
|
|
2010-06-25 11:53:57 +00:00
|
|
|
sudo rabbitmqctl add_user pandora box
|
2010-02-16 10:22:34 +00:00
|
|
|
sudo rabbitmqctl add_vhost /pandora
|
2010-06-25 11:53:57 +00:00
|
|
|
sudo rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* H264
|
|
|
|
to support h264 videos, install ffmpeg with x264 enabled,
|
|
|
|
install qt-faststart from (ffmpeg/tools)
|
|
|
|
set VIDEO_H264 = True in local_settings.py
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
Running developer environment:
|
|
|
|
in one terminal:
|
|
|
|
python manage.py runserver
|
|
|
|
and in another one:
|
|
|
|
python manage.py celeryd -Q default,encoding
|
2009-12-31 15:04:32 +00:00
|
|
|
|
2010-11-26 15:07:24 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
== DEPLOYMENT ==
|
|
|
|
To run pan.do/ra in production, we use nginx, using apache2 is also possible.
|
2010-11-26 15:07:24 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* nginx setup
|
2010-11-14 21:49:16 +00:00
|
|
|
sudo apt-get install nginx
|
2010-02-16 12:41:57 +00:00
|
|
|
|
2010-11-28 15:06:48 +00:00
|
|
|
* apache2 setup
|
|
|
|
sudo apt-get install apache2-mpm-prefork
|
2010-11-14 21:49:16 +00:00
|
|
|
sudo apt-get install libapache2-mod-xsendfile
|
2010-09-07 13:08:23 +00:00
|
|
|
|