Running OSRM on Heroku
About Me
@jpizarrom
Lead Software Engineer @ admetricks.com
@Pedalean
-
@jpizarrom
-
@rolanalvarez
Demo OSRM
OSM Data
OSM Data
http://wiki.openstreetmap.org/wiki/Planet.osm#Country_and_area_extracts
OSM Data
http://download.geofabrik.de/south-america/chile.html
OSRM
C++ implementation of a high-performance routing engine for shortest paths in road networks.
osrm-extract <.osm.pbf>
osrm-extract reads OpenStreetMap (OSM) data and generates an .osrm and an .osrm.restricions file which can be passed to osrm-prepare
osrm-prepare <input.osrm>
The osrm-prepare tool takes the .osrm and .osrm.restrictions files generated by osrm-extract and creates the precomputed files required to run the osrm-routed server
osrm-routed <base.osrm>
The Open Source Routing Machine (OSRM) is a high performance routing server for finding shortest paths in a road networks.
download+extract+prepare
- osrm chef cookbooks https://supermarket.chef.io/cookbooks/osrm
- build osrm from git
- extract & prepare data
download+extract+prepare
- dockerize
-
jpizarrom/osrm-data-prepare-docker based on
-
jpizarrom/osrm-docker based on
- jpizarrom/docker-chef-client
-
jpizarrom/osrm-docker based on
-
jpizarrom/osrm-data-prepare-docker based on
download+extract+prepare
- bicycle Chilean data
-
- id=$(docker run -d jpizarrom/osrm-data-prepare-docker)
- docker wait $id
- docker cp $id:/tmp/data.tar.bz2 . && mv data.tar.bz2 data-`date +"%Y-%m-%d-%H-%M-%S"`.tar.bz2
-
Todo:
- profile lua env param
- country/section env param
Running @ Heroku
osrm-heroku
- OSRM_ROUTED
- OSRM_DATA
- https://github.com/jpizarrom/osrm-heroku
- https://github.com/jpizarrom/heroku-buildpack-apt
Launch
git clone https://github.com/jpizarrom/osrm-heroku.git
cd osrm-heroku
heroku create osrm-heroku-test --buildpack https://github.com/jpizarrom/heroku-buildpack-apt
heroku config:set OSRM_ROUTED=https://github.com/jpizarrom/osrm-backend/releases/download/v0.4.1/osrm-routed-v0.4.1.tar.gz -a osrm-heroku-test
heroku config:set OSRM_DATA=...tar.bz2 -a osrm-heroku-test
git push heroku master
Docker
- docker pull jpizarrom/osrm-docker
- docker run -v ...
?
References
- http://project-osrm.org/
- https://www.openstreetmap.org/
- http://www.opentripplanner.org/
- http://heroku.com/
- tutum.co
- aws.amazon.com
- https://www.docker.com/
- https://hub.docker.com/
Running OSRM on Heroku
By Juan Pizarro
Running OSRM on Heroku
- 3,298