Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

[Feature request] Install Swarm on already running machine #2303

Open
nazar-pc opened this issue Nov 16, 2015 · 4 comments
Open

[Feature request] Install Swarm on already running machine #2303

nazar-pc opened this issue Nov 16, 2015 · 4 comments

Comments

@nazar-pc
Copy link

I'd like to have one machine with Consul master instance and Swarm manager (like in #2302) and set of nodes each of which will run Swarm agent + own Consul instance connected with master.
Currently it is not possible to make out of the box, since IP of machine with Swarm manager is unknown (at least when using Vitrualbox driver), so I can't provide Consul IP to it because it should be at the same place.

So one way is to allow creating machine first, then manually install Consul on it and then run Swarm installation with Machine. Alternative way for this particular problem is to allow Consul installation to be completely automated using Machine out of the box.

For second approach we need to create machine with Consul AND Swarm created at the same time, so that master machine will be created with one command and then for all nodes IP of master would be treated as both Consul master and Swarm manager.

How I see this in CLI interface:

~$ docker-machine create -d virtualbox --swarm --swarm-discovery-consul --swarm-master swarm-master
~$ docker-machine create -d virtualbox --swarm --swarm-discovery-consul swarm-agent-00
~$ docker-machine create -d virtualbox --swarm --swarm-discovery-consul swarm-agent-01

So basically, --swarm-discovery-consul will also run Consul container and insert proper consul://<consul_addr> argument for Swarm.
And if --swarm-master not specified - Consul master assumed to be where Swarm master is located.

P.S. This is not Consul-specific, similar keys might be added for etcd and any other by analogy.

@dweomer
Copy link
Contributor

dweomer commented Nov 16, 2015

I, as well, would like the ability to swarm-ify an existing machine (without having to remove it first).

Something even more useful, I think, for container "provisioning" during docker-machine create would be the ability to inject compositions to be initialized. One assumes that the swarm containers themselves would be the default composition during the setup of a swarm node.

@nathanleclaire
Copy link
Contributor

Yeah, I am not 100% sure, but my thinking on this is that to cover this and other modify-after-creation cases we should start eventually start supporting a config file, which would allow you to converge state on these types of things by calling some sort of apply-type command.

@kunalkushwaha
Copy link
Contributor

+1
Also, I would like to work on this. @nathanleclaire Can you give little more details about config file.

@nathanleclaire
Copy link
Contributor

@kunalkushwaha Discussion at #773

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants