Build graphs without starting server

Hello!

Is there any way to build graphs from OSM file without starting OpenRouteService as a server?

e.g. something like a standalone graph-builder or a build-only mode on ORS

Hey,

yes, that is possible. Have a look here - you can set the ors.services.routing.mode parameter in the ors-config.json to preparation, and the service will shut-down after building the graphs.

Best regards

Thanks @jschnell

Given this case, we are thinking of building the graphs as part of our CI pipeline and creating a final docker image with the graphs pre-copied inside.
This way it will not need to depend on shared volumes for graphs and also start-up time will be greatly improved.
Also when auto-releasing on envs new images with latest graphs, we will avoid the startup delay for new graphs building.
Do I miss something?

The trade-off will be the image size of course.

Nice to find this thread today, I’m doing this exact project @rolkool. I have the US map data in an image based from the community ORS image and that results in a ~40GB image. Biggest issue for me now is pulling this image and dealing with the layer cache bloat this adds to our k8s environment; we’ve gone the dedicated nodegroup route.

@jschnell, I’ve tried this parameter to prepare the graphs but unfortunately the tomcat server doesn’t shut down when the graphs are complete. The route module does seem to shut itself down and I’ve resorted to a backgrounded script to poll the health endpoint to know when it’s complete, then use tomcat’s shutdown script. Is there an another mechanism to get the docker-based configuration to shut itself down in preparation mode?