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
About the Author
About the Reviewer

Salt multi-master setup (active-active mode)

In very large infrastructures, high availability and redundancy are important requirements. Fortunately, Salt has support for redundant Salt masters that provide a level of redundancy and also a means to scale the infrastructure to support large deployments.

How to do it...

We will use our existing Salt master, but rename it to salt-master-1 from salt-master. Also, configure a second Salt master called salt-master-2 by following the Installing and configuring the Salt master and Configuring the Salt environment and pillar paths recipes from Chapter 1, Salt Architecture and Components.

The second node will be configured in the exact same way as the first one. After installing the salt-master package, copy over the following files and directories from salt-master-1 to the exact same locations in salt-master-2.

  1. Create the directories if they do not exist:

    • /etc/salt/master

    • /etc/salt/autosign.conf

    • /etc/salt/pki/master/master.pem

    • /etc/salt/pki/master/master...