Puppet+Docker : Clustering Docker Engines - "Swarm Mode"

0 votes
How can I cluster my docker engines to work in swarm mode via puppet resources?
Aug 14 in Puppet by Karan
• 3,770 points
26 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

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:

  • Swarm manager

  • Swarm worker

Swarm manager:

  • To configure the swarm manager, add the following code to the manifest file:

docker::swarm {'cluster_manager':
  init           => true,
  advertise_addr => '192.168.1.1',
  listen_addr    => '192.168.1.1',
}
  • For a multihomed server and to enable cluster communications between the node, include the advertise_addr and listen_addr parameters.

Swarm worker

  • To configure the swarm worker, add the following code to the manifest file:

docker::swarm {'cluster_worker':
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.

answered Aug 14 by Sirajul
• 31,180 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer

Puppet+Docker: How do i configure a swarm if i am using windows server 2016.

There are a few considerations to be ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 31,180 points
20 views
0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12 in Puppet by Jason
153 views
0 votes
1 answer

What's the need to integrate docker with puppet?

There are 3 core use cases for integrating docker with Puppet or with ...READ MORE

answered Aug 13 in Puppet by Sirajul
• 31,180 points
23 views
0 votes
0 answers

Docker with Puppet

I am using Puppet as a config ...READ MORE

Aug 13 in Puppet by Karan
• 3,770 points
19 views
0 votes
0 answers

How do i set up docker with puppet?

I want to use puppetlabs/docker module in ...READ MORE

Aug 13 in Puppet by Karan
• 3,770 points
26 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,023 views