To manage a cluster of Docker Engines known as a swarm, Docker Engine 1.12 includes a swarm mode.
To cluster your Docker engines, use one of the following Puppet resources:
init => true,
advertise_addr => '192.168.1.1',
listen_addr => '192.168.1.1',
join => true,
advertise_addr => '192.168.1.2',
listen_addr => '192.168.1.2',
manager_ip => '192.168.1.1',
token => 'your_join_token'
To configure a worker node or a second manager, include the swarm manager IP address in the manager_ip parameter.
To define the role of the node in the cluster, include the token parameter. When creating an additional swarm manager and a worker node, separate tokens are required.