install generic kernel in vm, that way it can boot of sata controller in virtualbox

This commit is contained in:
j 2012-03-23 21:57:43 +01:00
parent a4ac2e03d4
commit f3c08436b1
4 changed files with 34 additions and 34 deletions

43
README
View file

@ -13,7 +13,8 @@ python, bazaar, pip and virtualenv and several other python modules:
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 rabbitmq-server postgresql postgresql-contrib rabbitmq-server
apt-get install oxframe oxtimeline apt-get install oxframe oxtimeline
* Pan.do/ra * Pan.do/ra
@ -27,7 +28,10 @@ Get code from bazzar
bzr branch http://code.0x2620.org/oxjs bzr branch http://code.0x2620.org/oxjs
create settings_local.py and create site.jsonc create settings_local.py and create site.jsonc
(use settings.py / 0xdb.jsonc / padma.jsonc as example) do noy copy settings.py but only overwrite your changes in settings_local.py
(check https://wiki.0x2620.org/wiki/pandora/configuration
and use settings.py / 0xdb.jsonc / padma.jsonc as example)
create db create db
./manage.py syncdb ./manage.py syncdb
@ -37,7 +41,6 @@ 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).
@ -64,24 +67,7 @@ create / update static files
install qt-faststart from (ffmpeg/tools) install qt-faststart from (ffmpeg/tools)
to enable add "mp4" to video.formats in your config.jsonc to enable add "mp4" to video.formats in your config.jsonc
Running developer environment: == Deployment ==
in one terminal:
./manage.py runserver
and in another one:
./manage.py celeryd -Q default,encoding -B
=== Updating ===
To update a pandora installation get the latest version from bzr by running
./update.sh
this will pull pandora/oxjs/python-ox and list possible upgrades to the db
to update your database tables, use
./manage.py sqldiff -a
to check if there are changes and
./manage.py sqldiff -a | ./manage.py dbshell
to apply them.
== DEPLOYMENT ==
* Install upstart scripts * Install upstart scripts
check etc/init for upstart scripts, adjust path and user and put into /etc/init check etc/init for upstart scripts, adjust path and user and put into /etc/init
@ -103,3 +89,18 @@ 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
=== Updating ===
To update a pandora installation get the latest version from bzr by running
./update.sh
this will update pandora/oxjs/python-ox and list possible upgrades to the db
to update your database tables, use
./manage.py sqldiff -a
to check if there are changes and
./manage.py sqldiff -a | ./manage.py dbshell
to apply them.
=== Development ===
in one terminal:
./manage.py runserver

View file

@ -19,17 +19,17 @@ with that installed build image:
this will create a vdi image in pandora/ this will create a vdi image in pandora/
== VirtualBox Usage == == VirtualBox Usage ==
Now you can create a new VirtualBox machine, use vdi image as existing hard disk. Now you can create a new VirtualBox machine,
Before starting up you have to adjust some settings: select Linux/Ubuntu and use vdi image as existing hard disk.
In System -> Processor enable PAE/NX
In Storage remove disk from SATA Controller
add disk to IDE Controler and enable "Use host I/O cache"
Before starting up:
In Network -> Adpater 1 set to Bridged Adapter with your connected controller In Network -> Adpater 1 set to Bridged Adapter with your connected controller
== Use for development == == Use for development ==
Login via ssh or in terminal as pandora with password pandora Login via ssh or in terminal as pandora with password pandora
ssh pandora@pandora.local
Adjust your bzr configuration with bzr whoami: Adjust your bzr configuration with bzr whoami:
bzr whoami "Pando the Panda <pan.do@pan.do>" bzr whoami "Pando the Panda <pan.do@pan.do>"

View file

@ -3,6 +3,7 @@ base=$(pwd)
sudo vmbuilder vbox ubuntu --suite=oneiric \ sudo vmbuilder vbox ubuntu --suite=oneiric \
--verbose --debug \ --verbose --debug \
--arch i386 \ --arch i386 \
--flavour generic \
--dest $base/pandora \ --dest $base/pandora \
--hostname pandora \ --hostname pandora \
--swapsize 512 \ --swapsize 512 \

View file

@ -10,7 +10,7 @@ wget http://firefogg.org/nightly/ffmpeg2theora.linux -O /usr/local/bin/ffmpeg2th
chmod 755 /usr/local/bin/ffmpeg2theora chmod 755 /usr/local/bin/ffmpeg2theora
#postgresql #postgresql
apt-get -y install postgresql apt-get -y install postgresql postgresql-contrib
sudo -u postgres createuser -S -D -R pandora sudo -u postgres createuser -S -D -R pandora
sudo -u postgres createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora sudo -u postgres createdb -T template0 --locale=C --encoding=UTF8 -O pandora pandora
@ -21,6 +21,9 @@ rabbitmqctl add_vhost /pandora
rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*" rabbitmqctl set_permissions -p /pandora pandora ".*" ".*" ".*"
#pandora #pandora
HOST=$(hostname -s)
SITE_CONFIG="/srv/pandora/pandora/$HOST.jsonc"
test -e $SITE_CONFIG || cp /srv/pandora/pandora/0xdb.jsonc $SITE_CONFIG
cat > /srv/pandora/pandora/local_settings.py << EOF cat > /srv/pandora/pandora/local_settings.py << EOF
DATABASES = { DATABASES = {
'default': { 'default': {
@ -30,20 +33,15 @@ DATABASES = {
'PASSWORD': '', 'PASSWORD': '',
} }
} }
DEBUG = False DEBUG = False
DATA_SERVICE = "" DATA_SERVICE = ""
SITE_CONFIG = '/srv/pandora/pandora/pandora.jsonc' SITE_CONFIG = '$SITE_CONFIG'
BROKER_PASSWORD = "$RABBITPWD" BROKER_PASSWORD = "$RABBITPWD"
XACCELREDIRECT = True XACCELREDIRECT = True
EOF EOF
cd /srv/pandora/pandora cd /srv/pandora/pandora
sudo -u pandora python manage.py syncdb --noinput sudo -u pandora python manage.py syncdb --noinput
HOST=$(hostname -s)
echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | sudo -u pandora python manage.py dbshell echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | sudo -u pandora python manage.py dbshell