Skip to Content
Cloud Native Python
book

Cloud Native Python

by Manish Sethi
July 2017
Intermediate to advanced
374 pages
8h
English
Packt Publishing
Content preview from Cloud Native Python

Initializing the Docker manager

At this point, we need to decide which node should be the leader. Let's select the master node as our Docker manager. So, login into the master machine and execute the following command to initialize this machine to be a leader for the Docker Swarm:

$ docker swarm init --advertise-addr master_ip_address 

This command will set the provided host to be the master (leader) and generate a token for the node to connect to. See the following output for your reference:

A few important points to keep in mind:

  • Don't share your token and IP address with anyone
  • Secondly, it is possible to have multiple masters in case ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python for DevOps

Python for DevOps

Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu
Cloud Native

Cloud Native

Boris Scholl, Trent Swanson, Peter Jausovec

Publisher Resources

ISBN: 9781787129313Supplemental Content