I’m trying to deploy services in swarm cluster using docker 1.12.1-rc1 and docker-compose 1.8.0
I’ve 4 VMs (NOT created through docker-machine)
VM1 - consul server is running in a docker container (for service discovery)
VM2 - where I want to initialize a swarm master with ‘docker swarm init’ command
VM3 - slave node1
VM4 - slave node2
I’m following http://www.smartjava.org/content/service-discovery-docker-and-consul-part-1 to setup my cluster. I’m just looking for an alternative for following command:
docker-machine create -d virtualbox --swarm --swarm-master
–swarm-discovery=“consul://$(docker-machine ip nb-consul):8500”
–engine-opt=“cluster-store=consul://$(docker-machine ip nb-consul):8500”
Basically, this command create a vm with docker swarm master with consul details defined. Since I’m not using docker-machine, is there any other options like ‘docker swarm init [options]’ with which I can define my consul server details?
Basically, I want my swarm master node to know where consul is running.
Thanks in advance