EIP 를 기반으로 Docker Swarm을 생성할 때
52.38.210.85
52.41.47.94
52.41.47.66
Docker 설치
curl -sSL https://get.docker.com/ | sh
/etc/default/docker 에 추가
--default-ulimit nofile=1024:4096 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise 52.38.210.85:2375 --cluster-store consul://52.38.210.85:8500
--default-ulimit nofile=1024:4096 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise 52.41.47.94:2375 --cluster-store consul://52.38.210.85:8500
--default-ulimit nofile=1024:4096 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise 52.41.47.66:2375 --cluster-store consul://52.38.210.85:8500
docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap
docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise 52.38.210.85:4000 consul://52.38.210.85:8500
docker run -d swarm join --advertise=52.41.47.94:2375 consul://52.38.210.85:8500
docker run -d swarm join --advertise=52.41.47.66:2375 consul://52.38.210.85:8500