This project aim to ease the initialization of a local virtual machine with a full installation of OpenStreetMap Osmose tool. This local virtual machine is for new analysis modules developpment only, and does not intend to be a multi-users instance.
To install this virtual machine, here are the steps :
- install vagrant and the trigger plugin (
vagrant plugin install vagrant-triggers
) - Clone this repository and set current directory to local directory
- run
vagrant up
in your repository - run
vagrant ssh
to connect to the virtual machine - run one test
bash /data/tests/test_avignon.sh
- run
cd /data/ && bash update_frontend_db.sh
- Open your favorite browser and go to
http://localhost;8888
!
Frontend and Backend are connected, but only for a limited list of tests.
The activated tests are listed in the ./backend/osmose_config.py
file and configued in the ./setup4_front_back_link.sh
file
Be careful : when accessing vagrant by ssh, the backend virtualenv will be activated and the current directory will be /data
This may be caused by a misconfiguration of the frontend database. Follow the folling steps :
- login in your virtual machine (
vagrant ssh
) - run
cd /data/ && bash update_frontend_db.sh
To run a test, you need to :
- login in your virtual machine (
vagrant ssh
) - go to the backend dir
cd /data/backend
- activate python virtualenv
source osmose-backend-venv/bin/activate
- run
python osmose_run.py -h
to see all available commands
Note : Unless you make some configurations, results won't be displayed in the FrontEnd. See next section for visualisation.
Exemple of one analyse run on one country :
python osmose_run.py --analyser=analyser_osmosis_boundary_administrative --country=france_ile_de_france
The results are stored in the /data/work/
directory.
To enable the display of BackEnd tests results :
- Enable the test by changing it's password BackEnd side in
./backend/osmose_config.py
. Replacexxx
byvagrant
- Enable the receiption of the backend tests results by adding a source in the FrontEnd database
- login in your virtual machine (
vagrant ssh
) - run
cd /data/ && bash update_frontend_db.sh
- login in your virtual machine (
This will activate the test for all available countries