Swarm¶
Reference¶
DockerSwarm¶
- class aiodocker.swarm.DockerSwarm(docker)[source]¶
- coroutine init(self, *, advertise_addr=None, listen_addr='0.0.0.0:2377', force_new_cluster=False, swarm_spec=None)[source]¶
Initialize a new swarm.
- Parameters
ListenAddr – listen address used for inter-manager communication
AdvertiseAddr – address advertised to other nodes.
ForceNewCluster – Force creation of a new swarm.
SwarmSpec – User modifiable swarm configuration.
- Return type
- Returns
id of the swarm node
- coroutine join(self, *, remote_addrs, listen_addr='0.0.0.0:2377', join_token, advertise_addr=None, data_path_addr=None)[source]¶
Join a swarm.
- Parameters
listen_addr (
str
) – Used for inter-manager communicationadvertise_addr (
Optional
[str
]) – Externally reachable address advertised to other nodes.data_path_addr (
Optional
[str
]) – Address or interface to use for data path traffic.remote_addrs (
Iterable
[str
]) – Addresses of manager nodes already participating in the swarm.join_token (
str
) – Secret token for joining this swarm.
- Return type