Add peer discovery for Docker Swarm

The peer discovery relies on "GET /info" API call which returns
list of master nodes. The peer list is passed to weaver when
launching it.

If node is a master, then we pass "--ipalloc-alloc
consensus=$(MASTER_NODES_COUNT)" to weaver. Otherwise, we pass
"--ipalloc-alloc observer".
This commit is contained in:
Martynas Pumputis authored and Bryan Boreham committed 2017-04-12 13:05:39 +00:00
1 parent 889dc856af
commit 82b56848a9
4 files changed
+89 -4

No files matched your search

+2
View File
@@ -37,6 +37,8 @@ func init() {
"expose-nat": exposeNAT,
"bridge-ip": bridgeIP,
"unique-id": uniqueID,
"swarm-manager-peers": swarmManagerPeers,
"is-swarm-manager": isSwarmManager,
}
}