Skip to content

Chroot environment

bwyss edited this page Mar 1, 2011 · 2 revisions

Instructions for Ubuntu 10.04 LTS 32bit

Within a chrooted environment you can install and run OpenQuake without affecting your local environment. First of all we need to create the environment. Open a terminal, and type:

sudo apt-get install debootstrap
sudo mkdir -p /var/chroot/ubuntu-lucid
sudo debootstrap --variant=buildd --arch i386 lucid \
     /var/chroot/ubuntu-lucid http://archive.ubuntu.com/ubuntu
# wait that the bootstrap of the chroot environment finishes
sudo echo "[lucidchroot]
description=Ubuntu lucid
directory=/var/chroot/ubuntu-lucid
priority=3
root-groups=root
type=directory
">>/etc/schroot/schroot.conf

schroot -l # to see if lucidchroot exists
schroot -c lucidchroot # to access to the chroot
cd $HOME

We are now in the chroot environment and we can install the minimal Ubuntu packages through apt:

apt-get install language-pack-en # type Y to continue
apt-get install ubuntu-minimal
echo "deb http://archive.ubuntu.com/ubuntu lucid main universe" > /etc/apt/sources.list
apt-get update

If you have RabbitMQ already running stop it (with /etc/init.d/rabbitmq-server stop outside the chroot), and type:

mkdir /root/src ; cd /root/src

You can now follow the Ubuntu tutorial here, but skipping:

echo "export JAVA_HOME=/usr/lib/jvm/java-6-openjdk" >> $HOME/.bashrc

It’s time now to start the services. We have two options here, with or without screen. If you don’t know how to use the package screen follow these instructions:

redis-server > /dev/null &
cd /root/src/openquake
JAVA_HOME=/usr/lib/jvm/default-java celeryd 2> /dev/null &
JAVA_HOME=/usr/lib/jvm/default-java python run_tests.py

Otherwise, if you want to use screen, install/launch it with:

apt-get install screen
screen

And start Redis server with:

redis-server

In another screen launch Celery inside the OpenQuake directory:

cd /to/your/openquake/dir/
JAVA_HOME=/usr/lib/jvm/default-java celeryd

Finally we can run the tests suite. Open another screen and type:

JAVA_HOME=/usr/lib/jvm/default-java python run_tests.py

Remember that for further assistance you can get help through our mailing list or on irc.freenode.net (freenode network) at #openquake.
Back to Installation

Clone this wiki locally