xServer services in Docker?

This forum deals with administrative topics such as monitoring and system setup. It is dedicated to system administrators who do not have to deal with the functions themselves but who have to establish and maintain proper environments.
Public since 15.2.2017

xServer services in Docker?

Postby iandykes » Fri Oct 07, 2016 1:06 pm

Hello,

Has anyone deployed any of the xServer services in a Docker container on Linux? I'm mainly interested in xMap, xRoute, xLocate, and xMapMatch.

I'm pretty confident I could create a docker image for the combinations I need, but I'd be interested to know if anyone has already done this and what their experiences were.

Many thanks
Ian
iandykes
 
Posts: 2
Joined: Fri Oct 07, 2016 12:23 pm

Re: xServer services in Docker?

Postby Joost » Mon Oct 10, 2016 9:44 am

Hello Ian,

ATM we do not have experimented much with xServer installation using docker but it is a topic of interested we are looking at for xServer2 . For now I can only give hints what to keep in mind. You have to think how you deal with no-persistent data like map data, configuration, log files. IIRC logs and map data can be configured to a custom location, but the main configuration directory can not. Also keep the licensing mechanisms in mind.

With regards,
Joost
Joost Claessen
Senior Technical Consultant
PTV Benelux
Joost
 
Posts: 249
Joined: Fri Apr 25, 2014 1:46 pm

Re: xServer services in Docker?

Postby rberlich » Tue Oct 11, 2016 10:22 am

Hi Ian, Joost,

I can give some more insight into the tests we ran with xServer-2 in the Docker context. Note that xServer-2 integrates multiple services formerly available independently, so covers some of the services you mention. We have also done some additional tests with xRoute from xServer-1. The work has assumed a deployment on a single target host rather than in a cluster / cloud, and has included integration with RPM- and Debian-packages, as well as systemd.

From these tests we have gained a very positive impression of Docker's ability to run the xServer, with some minor things to watch out for. In particular, you should give containers a larger /dev/shm than what is available by default (64 MB, tests with a rather large 2G ran fine). Note that the default Docker version of CentOS 7.2 / RHEL and OpenSUSE 42.1 / SLES 12 SP1 (1.9.1, AFAIR) seems too old for this; you will need at least version 1.10, where /dev/shm is configurable (use the --shm-size -switch).

Depending on your use-case it might also be a good idea to map the xServer distribution (including maps) into the container from an outside, native directory, rather than storing it inside of the image. This facilitates access to logs, helps to persist changes to config files and will likely speed up access to the maps. Doing so might be difficult in a cloud-context, though, and things like a Docker-based "roll-back" would have to be handled differently. On the other hand, images may become "generic" in this way.

As xServer-2 is an integrated solution, we have not yet gained many experiences with the orchestration of Docker containers for individual services in the context of xServer-1. With the default Docker networking mode (bridged networking -- i.e. akin to separate servers with dedicated IPs) I would assume that some additional "plumbing" might be necessary to get them to play together nicely. Host-networking facilitates things, of course, but at the price of a reduced isolation of containers (which I feel is one of the major benefits of Docker). The same considerations apply to the access to an external database (other than the integrated solution that comes with the xServer).

@Ian: Would you be willing to share your intended deployment scenario here ? I am aware of another user intending to use Docker, albeit in a cloud-context, and would be quite curious to gain more insight into what your requirements are.

Kind Regards,
Ruediger
Dr. Rüdiger Berlich
Senior Technical Consultant
PTV GROUP (Germany, external)
rberlich
 
Posts: 2
Joined: Mon Oct 10, 2016 10:14 am

Re: xServer services in Docker?

Postby iandykes » Tue Oct 11, 2016 4:34 pm

Hello Joost and Ruediger,

Many thanks for the feedback.

We are in the early stages of migrating our existing applications to Docker, and one of the options open to us is to move our 3rd party applications as well, such as the xServer services.

Our current xServer installations span multiple versions, with different map sets, and custom map colours applied on some. Due to the amount we have installed it takes a lot of effort to upgrade them all - so we are left with out-of-date versions that work most of the time, but clearly won't include the latest roads and road speed data.

We are considering containers as a means of easing the transition between our development, staging and production environments. I would prefer if we could keep the image as complete as possible - without any external dependencies on map and licence files. Ideally we'd be able to use the same images between all environments, so we have confidence that our internal testing is representative of what our end users will see.

For deployment we haven't made a decision yet, although cloud based is certainly an option. However, its probably more likely that we will host this ourselves in our existing infrastructure.

Many thanks for the information provided.
Ian
iandykes
 
Posts: 2
Joined: Fri Oct 07, 2016 12:23 pm

Re: xServer services in Docker?

Postby rberlich » Wed Oct 12, 2016 10:16 am

Hi Ian,

at the danger of telling you things you already know: Just a short note on compatibility.

We have moved the same (Ubuntu 16.04-based) images between Ubuntu 16.04 hosts (obviously), Ubuntu 14.04, CentOS 7.2 and OpenSUSE 42.1/13.2 hosts without any apparent problems -- with the one exception of the Docker-version and /dev/shm . Even a short test on a patched Ubuntu 12.04 host ran fine. Given that the only real dependency of a Docker image on the host system is on the level of system calls (mostly via libc) and that the kernel API is quite stable, I would expect you to be able to move images rather freely.

I have found setting the environment variable LD_BIND_NOW helpful in this context -- dependencies of shared libraries will then be resolved immediately upon loading of the library, rather than in a lazy manner at run-time.

Thanks a lot for your kind feedback!

Kind Regards,
Ruediger
Dr. Rüdiger Berlich
Senior Technical Consultant
PTV GROUP (Germany, external)
rberlich
 
Posts: 2
Joined: Mon Oct 10, 2016 10:14 am

Re: xServer services in Docker?

Postby Bernd Welter » Wed Feb 12, 2020 2:03 pm

Cheers,

at least the DOCKER is described in the xServer 2 documentation...

https://xserver2-europe-eu-test.cloud.p ... ght=docker

Best regards,
Bernd
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
 
Posts: 1512
Joined: Mon Apr 14, 2014 10:28 am


Return to PTV xServer Administration

cron