Chaos is the web service which can feed Navitia with real-time disruptions. It can work together with Kirin which can feed Navitia with real-time delays.
git clone [email protected]:CanalTP/Chaos.git
cd Chaos
- Install Python
sudo apt-get install python2.7 python2.7-dev
- Install pip
- Install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
Install protobuf v2.6.1
git submodule init
git submodule update
./setup.py build_pbf
sudo apt-get install postgresql libpq-dev
sudo -i -u postgres
# Create a user
createuser -P navitia (password "navitia")
# Create database
createdb -O navitia chaos
# Create database for tests
createdb -O navitia chaos_testing
ctrl + d
You can use honcho for managing Procfile-based applications.
pip install honcho
Write this line inside
CHAOS_CONFIG_FILE=default_settings.py
honcho run ./manage.py db upgrade
RabbitMQ is optional and you can deactivate it if you don't want to send disruptions to a queue.
# chaos/default_settings.py
ENABLE_RABBITMQ = False
honcho start
git clone [email protected]:CanalTP/Chaos.git
cd Chaos
git submodule init
git submodule update
docker-compose up -d
To watch logs output:
docker-compose logs -f
Chaos will be accessible on http://chaos_ws_1.docker if you are using the docker-gen-hosts tool, it will also be accessible on http://chaos-ws.local.canaltp.fr
The following commands for tests are also working in Docker environment, you just have to run before:
docker-compose exec ws bash
cd tests
honcho run nosetests
cd tests
honcho run lettuce
To stop directly on faulty test
honcho run lettuce --failfast