Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Salt multi-master setup (active-passive mode)


In the previous recipe, we talked about configuring a multi-master setup with a couple of Salt masters in active-active mode, where we could run salt commands from either of them. While this method is good for the push mechanism, as the minions are connected to both the masters at all times, there should be a method to achieve the same objective when using the pull method of getting configurations from the Salt master, while being aware of master-server issues and failing over to a redundant node. This can be achieved with the active-passive setup. In this recipe, you will learn how to achieve this objective.

How to do it...

  1. Configure two nodes, salt-master-1 and salt-master-2, and install the salt-master package on both. On salt-master-1, edit the configuration file /etc/salt/master to have the following entries:

    master_sign_pubkey: True
  2. Start the salt-master service daemon on salt-master-1. Run the following command:

    [root@salt-master-1 ~]# ls...