consul icon indicating copy to clipboard operation
consul copied to clipboard

hi sir ,

Open buluxan opened this issue 9 years ago • 5 comments

hi sir , i just try running your script on my testing machine -> docker stack deploy -c docker-compose.yml consul the script running succesfully , after that how to i join to my another machine sir , i have 4 testing machine , is there any command that i should adding to another machine

hxt531wno84u consul_seed replicated 0/1 consul:0.8.0
jc07dc58ilmp consul_cluster global 0/0 consul:0.8.0 :8500->8500/tcp,:8600->8600/tcp

buluxan avatar Jul 25 '17 12:07 buluxan

You hit on a good point. In order to add machines the seed would have to remain running. I have not yet tested this but I think it's just a matter of removing the following:

  - timeout     #this seed fires up the cluster after which it is no longer needed
  - -sTERM      #this is the same signal as docker would send on a scale down / stop
  - -t300       #terminate after 5 mins

thechane avatar Jul 25 '17 17:07 thechane

you mean i need to run this script (docker-compose.yml) to another machine cluster / node ?

buluxan avatar Jul 26 '17 01:07 buluxan

Could it works on multi-host ? What should i do?

yak2048 avatar Aug 21 '17 11:08 yak2048

Yes this is multihost, I just made a few changes to allow for node growth as pointed out by buluxan. The docker-compose.yml is used by the docker engine on a swarm manager node. When you add nodes to your docker swarm Consul should automatically fire up on that node because of the global setting. This basically tells the docker engine to schedule 1 replica on each node. You can still control this however with docker labels to make sure the seed is never on the same node as a worker / cluster instance as that would cause problems.

thechane avatar Aug 24 '17 20:08 thechane

it works, thx

yak2048 avatar Aug 27 '17 04:08 yak2048