Open ivotron opened 9 years ago
I'm torn on this. On the one hand, I can see the benefit of letting Maestro take care of figuring out where <container>
is running for you, making it easier to execute a command inside that container amongst all your running containers.
On the other hand, the goal of Maestro is not to be a replacement command-line.
I agree on the latter. Having to execute commands on containers might be an indication that containers are not being used properly. This is kind of equivalent to running sshd https://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/ in a container.
having said this, there are times (e.g. in a dev environment) when you just want to lunch a command for very ad-hoc reasons. As you mentioned, this automates the task of figuring out the host IP/port and then executing docker directly on the CLI.
The particular use case that I have in mind is to add support for docker in teuthology https://github.com/ceph/teuthology (the Ceph integration testing framework) which relies on being able to launch commands remotely. The problem is that the tool tests multiple deployments (bare-metal and VMs), relying on SSH to orchestrate tasks across the ceph cluster.
It would be nice if one could execute an arbitrary command on a container (using docker-py's
exec_create
,exec_run
andexec_inspect
). Something like: