Open nathanleclaire opened 9 years ago
Except, machine will only create a "clean" docker host and not an app instance. Would be nice though to be able to spin up X machines and automatically have them registered with Docker Swarm
to create a cluster.
Iirc, Ben mentioned during DockerCon that that (or similar) was already on the roadmap.
Except, machine will only create a "clean" docker host and not an app instance
Yes, to be clear, this is still the expected and desired behavior, the request is simply to be able to create several "clean" machines at once. Then the application components can be deployed using docker run
.
I would love to see what @thaJeztah is talking about. Would let me spin up a quick swarm for some testing, and then remove it when I am done. Would also allow development environments to be more like production if production runs on multiple hosts.
For testing, I was even thinking if it would be possible to create a docker-in-docker (https://github.com/jpetazzo/dind) driver. I haven't done a lot with dind and it would require some changes (We'll probably need ssh, so a process manager as well), but that would be interesting.
@thaJeztah Just created it :) https://github.com/EmileVauge/docker-cluster
@EmileVauge ah, fun! Will give it a spin (if I find some time.. LOL)
For testing, I was even thinking if it would be possible to create a docker-in-docker driver
@thaJeztah Yes, I want this too! Do you know if there's been any work to create one? If not, I think I'll create a new issue and look into it some more.
@EmileVauge cool idea, but not quite a driver.
I think what @thaJeztah was getting at was something like docker-machine create --driver dind ...
which would launch a dind container on the currently configured docker instance, and have it run a new docker daemon.
That would be really awesome for testing anything that needs multiple docker hosts.
@dnephin I don't think there's an open issue for that; and you described my use case correctly; basically create a local "swarm" cluster, obviously just for testing, to experiment with Swarm features (and without the overhead of running multiple virtual machines, or (cloud) instances)
IMHO, this feature is useful for spinning up several docker machines simultaneously (e.g., for creating a cluster on AWS) not just for testing ...
:+1:
Would be nice if this would be looked at again. Basically the "interesting" side project docker-in-docker went through with high attention but the part that would have actual benefit for autoscaling etc. did not go through. That is just a bit weird... :-) Since you can delete multiple machines (rm one two three) it would be really nice for consistency to be able to do both directions.
Doing it via a shell loop is a workaround but relies on there never be any dangerous lock / tempfile implementations in docker-machine.
I'm using the OpenNebula driver which could easily launch 3 VMs every few seconds.
Suppose I want to use
docker-machine
to spin up a simple architecture of two instances running the same application behind another instance which serves as a proxy / load balancer to the two. It'd be nice to spin up the application instances using something like:I know that the Amazon API allows you to specify the number of instances desired to the
RunInstances
call, I'd imagine that similar args exist for other providers. If not, they can probably be worked around by making multiple calls.