update readme and vm build script

This commit is contained in:
j 2012-04-19 14:43:54 +02:00
parent 03163692fd
commit e80aa30746
3 changed files with 33 additions and 20 deletions

37
README
View file

@ -1,24 +1,32 @@
pan.do/ra - open media archive pan.do/ra - open media archive
== SETUP == == SETUP ==
To setup pan.do/ra, you need pan.do/ra is known to work with Ubuntu 12.04, older versions of
python, bazaar, pip and virtualenv and several other python modules: Ubuntu or other distributions should work
if the dependencies are up to date.
To setup pan.do/ra, you need python, bazaar, pip and virtualenv
and several other python modules:
* Packages * Packages
(add pandora ppa to get all packages in the required version)
apt-get install python-software-properties apt-get install python-software-properties
add-apt-repository ppa:j/pandora add-apt-repository ppa:j/pandora
apt-get update apt-get update
(install dependencies)
apt-get install bzr git subversion mercurial \ apt-get install bzr git subversion mercurial \
python-setuptools python-pip python-virtualenv ipython \ python-setuptools python-pip python-virtualenv ipython \
python-dev python-imaging python-numpy python-psycopg2 \ python-dev python-imaging python-numpy python-psycopg2 \
python-geoip python-html5lib python-lxml \ python-geoip python-html5lib python-lxml \
postgresql postgresql-contrib rabbitmq-server postgresql postgresql-contrib rabbitmq-server \
ffmpeg2theora ffmpeg \
apt-get install oxframe oxtimeline python-ox oxframe oxtimeline
* Pan.do/ra * Pan.do/ra
Get code from bazzar Get code from bazzar
cd /srv/
bzr branch http://code.0x2620.org/pandora pandora bzr branch http://code.0x2620.org/pandora pandora
cd pandora cd pandora
virtualenv . virtualenv .
@ -27,21 +35,19 @@ Get code from bazzar
cd static cd static
bzr branch http://code.0x2620.org/oxjs bzr branch http://code.0x2620.org/oxjs
create local_settings.py and create site.jsonc create local_settings.py and create site.jsonc in /srv/pandora/pandora
do noy copy settings.py but only overwrite your changes in local_settings.py do noy copy settings.py but only add your changes to local_settings.py
(check https://wiki.0x2620.org/wiki/pandora/configuration (check https://wiki.0x2620.org/wiki/pandora/configuration
and use settings.py / 0xdb.jsonc / padma.jsonc as example) and use settings.py / 0xdb.jsonc / padma.jsonc as example)
create db create and configure database as described below
after that
./manage.py syncdb
create / update static files create / update static files
./manage.py update_static ./manage.py update_static
./manage.py compile_pyc ./manage.py compile_pyc
* Database * Database
We use postgresql but other databases might also work We use postgresql but other databases might also work
(make sure you have the python bindings installed). (make sure you have the python bindings installed).
@ -70,6 +76,7 @@ create / update static files
echo "DB_GIN_TRGM = True" >> local_settings.py echo "DB_GIN_TRGM = True" >> local_settings.py
* RabbitMQ * RabbitMQ
For background tasks RabbitMQ is required, to install rabbitmq: For background tasks RabbitMQ is required, to install rabbitmq:
@ -83,8 +90,9 @@ create / update static files
* H264 * H264
for h264 videos, you need to compile ffmpeg with x264 and libfaac enabled, for h264 videos, you need ffmpeg with x264 and libfaac enabled,
you also need to install qt-faststart (from ffmpeg/tools) you also need to install qt-faststart (from ffmpeg/tools)
(you can use medibuntu.org packages or compile ffmpeg yourself)
to enable h264 derivatives add "mp4" to video.formats in your config.jsonc to enable h264 derivatives add "mp4" to video.formats in your config.jsonc
@ -110,6 +118,11 @@ To run pan.do/ra in production, we use nginx, using apache2 is also possible.
setup apache according to etc/apache2/vhost.in setup apache according to etc/apache2/vhost.in
now you can start pandora services:
service pandora start
service pandora-tasks start
service pandora-encoding start
=== Updating === === Updating ===
To update a pandora installation get the latest version from bzr by running To update a pandora installation get the latest version from bzr by running
./update.sh ./update.sh

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
base=$(pwd) base=$(pwd)
sudo vmbuilder vbox ubuntu --suite=oneiric \ sudo vmbuilder vbox ubuntu --suite=precise \
--verbose --debug \ --verbose --debug \
--arch i386 \ --arch i386 \
--flavour generic \ --flavour generic \
@ -37,8 +37,9 @@ sudo vmbuilder vbox ubuntu --suite=oneiric \
--addpkg python-html5lib \ --addpkg python-html5lib \
--addpkg oxtimeline \ --addpkg oxtimeline \
--addpkg oxframe \ --addpkg oxframe \
--addpkg ffmpeg \
--addpkg ffmpeg2theora \
--addpkg mkvtoolnix \ --addpkg mkvtoolnix \
--execscript=$base/install.sh \ --execscript=$base/install.sh \
--firstboot=$base/firstboot.sh --firstboot=$base/firstboot.sh
#kvm-img convert -O vdi pandora/*.qcow2 pandora.vdi

View file

@ -2,12 +2,11 @@
#fails in bootstrap #fails in bootstrap
apt-get -y install ipython ntp apt-get -y install ipython ntp
#ffmpeg #ffmpeg installed as apt package
wget http://firefogg.org/nightly/ffmpeg.linux -O /usr/local/bin/ffmpeg #wget http://firefogg.org/nightly/ffmpeg.linux -O /usr/local/bin/ffmpeg
chmod 755 /usr/local/bin/ffmpeg #chmod 755 /usr/local/bin/ffmpeg
#wget http://firefogg.org/nightly/ffmpeg2theora.linux -O /usr/local/bin/ffmpeg2theora
wget http://firefogg.org/nightly/ffmpeg2theora.linux -O /usr/local/bin/ffmpeg2theora #chmod 755 /usr/local/bin/ffmpeg2theora
chmod 755 /usr/local/bin/ffmpeg2theora
#postgresql #postgresql
apt-get -y install postgresql postgresql-contrib apt-get -y install postgresql postgresql-contrib