signalfx / maestro-ng

Orchestration of Docker-based, multi-host environments
https://signalfx.com
Apache License 2.0
685 stars 83 forks source link

Change client docker version to auto mode #141

Closed kuhess closed 9 years ago

kuhess commented 9 years ago

Instead of using static version.

See docker-py doc: http://docker-py.readthedocs.org/en/latest/api/#client-api

mpetazzoni commented 9 years ago

Thanks. This is a good way forward, but as you can see it prevents the tests from working because docker-py will attempt to contact the server when the docker.Client instance is created.

I suggest you make add docker_version parameter to the Ship's class constructor, defaulting to DEFAULT_DOCKER_VERSION='auto'. This way it can be overridden in the YAML if needed, and in tests.

kuhess commented 9 years ago

Yep, I will add docker_version to the constructor of Ship, this seems to be a good solution :+1:

Sorry for the tests, I did this PR quickly this morning and I didn't run them :confused:

mpetazzoni commented 9 years ago

Hmm, so there's still one thing that's a little annoying here. If the target host is down, Maestro will not gracefully fail and throw an exception. Right now it would simply show host down for that container.

binary1230 commented 9 years ago

+1 for this, out of the box maestro is currently broken with latest docker install (1.7.1)

just for further documentation purposes:

maestro's trying to use docker API version 1.10, but only >= 1.12 is supported anymore. current docker API version is 1.19

if I get a minute later today I might have a look at helping get this PR in mergable shape

mpetazzoni commented 9 years ago

Thanks. In the meantime I'll change the default to 1.15

mpetazzoni commented 9 years ago

Tweaked and merged this manually. Thanks!