On 02/03/2016 04:54 PM, Shubham Minglani wrote:
Hi community,

I am writing this referring to Issue #85 on projectatomic/vagrant-adbinfo 
raised by Bama yesterday.

You can read/discuss about it here: 
https://github.com/projectatomic/vagrant-adbinfo/issues/85

Summary:

While using vagrant-adbinfo plugin with Docker client of local machine to 
connect to Docker in the Vagrant box, a version mismatch error pops up due to 
difference in the API versions and the API not being backward compatible.

To make both of them talk, we need to get the versions to match. For the same, 
the following options are being considered:

- If there is a version mismatch, create another vagrant vm with docker client 
of appropriate version installed and route docker traffic from there.

Not sure how this solves the issue. Running another Vagrant box is a lot of overhead. Also I am not clear how you plan to host command line to interact with docker demon running inside ADB/CDK Vagrantbox through another Vagrantbox.
- Package the docker client of appropriate version with a slightly modified 
name 'adb-docker' (this could be done through links as well. ie newname link 
pointing to packaged docker client in respective users bin directory) for 
example.
Are you suggesting package the adb-docker or equivalent inside the ADB box or shipping it separately.
- Check for version mismatch, and with users permission, upgrade or downgrade 
accordingly.

Expecting user to upgrade/downgrade is not a good idea IMO as this applies to Windows/OS X users too and this will be tricky on these platforms.

Besides these, another approach was proposed today -

Instead of using Docker CLI client on the base machine, can Remote API [1] or 
one of these Remote API clients [2] be used to access Docker in the Vagrant VM? 
This way upgrading or downgrading Docker on the base machine does not have to 
be worried about, and this will also work across platforms.

However, in the case of using:

Remote API [1]:
- Multiple API versions have to be supported.
- Effectively, this is like maintaining a new Docker Remote API client.

Remote API client [2]:
- If these are well maintained (Docker does not maintain these, except 
docker-py [3]), then each API version does not have to be supported and code 
remains the same.
- These might not have support for all the Docker CLI client features (even 
docker-py does not support 'everything' which the CLI client does).

On another note, how about a hybrid approach? When the Remote API client does 
not work (feature not supported or version incompatibility), the Remote API can 
be used to do that thing.

I have not looked in to Docker API from a long time. So I might not be the right person to comment here. However we want to give user near native docker CLI experience on different platforms so that user can run docker with ADB with minimum knowledge possible ( something like Docker tool box) and using API should not make it more difficult.

My suggestion is to package equivalent docker client in the ADB box ( for Linux, OSX, Windows) and then we can expose these binaries through a http server or equivalent. Then we need a automation to download the bits after "vagrant up" and put it in host operating systems bin directory or equivalent. We might have to update/change environment variables in the process to make it work.

Or you can think about running all the commands through a SSH tunnel from host and it always go to docker demon running inside the Vagrant box . This idea might result in to something like a interactive python shell

It would be great if community gives some feedback on this issue, so I'm 
posting it here.

Please correct me if I'm wrong or talking off-track!

Thanks for posting the issue Shubham. So cheers to the beginning :)

Regards,
Shubham Minglani

P.S. It's my first email here, so open to rectifications :)

[1] https://docs.docker.com/engine/reference/api/docker_remote_api/
[2] https://docs.docker.com/engine/reference/api/remote_api_client_libraries/
[3] https://github.com/docker/docker-py

_______________________________________________
Container-tools mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/container-tools

_______________________________________________
Container-tools mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/container-tools

Reply via email to