Skip to content

Commit

Permalink
fixed network setup
Browse files Browse the repository at this point in the history
  • Loading branch information
justinzyw committed Jun 18, 2018
1 parent 08c4295 commit 5841440
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions install-swarm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@ currentTime()
date +"%Y-%m-%d %H:%M:%S";
}

echo ---$(currentTime)---setup overlay network---
sudo docker network create \
--driver overlay \
--subnet $HOST_INTERNAL_SUBNET \
--gateway $HOST_INTERNAL_IP \
--attachable \
devops_network

echo ---$(currentTime)---initiate swarm---
sudo docker swarm init --advertise-addr $LEAD_HOST_IP



sudo docker swarm join-token manager
#其他manager节点加入,用sudo docker swarm join-token manager来获取加入集群的命令

Expand Down

0 comments on commit 5841440

Please sign in to comment.