Book Image

Mastering SaltStack - Second Edition

Book Image

Mastering SaltStack - Second Edition

Overview of this book

SaltStack is a powerful configuration management and automation suite designed to manage servers and tens of thousands of nodes. This book showcases Salt as a very powerful automation framework. We will review the fundamental concepts to get you in the right frame of mind, and then explore Salt in much greater depth. You will explore Salt SSH as a powerful tool and take Salt Cloud to the next level. Next, you’ll master using Salt services with ease in your infrastructure. You will discover methods and strategies to scale your infrastructure properly. You will also learn how to use Salt as a powerful monitoring tool. By the end of this book, you will have learned troubleshooting tips and best practices to make the entire process of using Salt pain-free and easy.
Table of Contents (20 chapters)
Mastering SaltStack Second Edition
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Preface

High availability with multiple masters


The traditional Salt setup only involves a single master with multiple minions. This is fine for a number of smaller shops, and even some of the bigger ones, but definitely not for everybody. High availability has become increasingly crucial in the modern infrastructure, and Salt is a part of that.

Built-in high-availability configuration

Salt does have some built-in configuration to handle multiple masters, but it's smaller and simpler than what one might expect. Interestingly, the actual Salt configuration is all on the minion; the masters don't have any configuration inside Salt itself. We'll talk about that in a moment.

First, let's talk about minion configuration. Normally, minions have a single master defined in their configuration file:

master: 10.0.0.10 

However, a list of masters may be defined instead:

master: 
  - 10.0.0.10 
  - 10.0.0.11 

There is no limit imposed to how many masters may be declared for a single minion. However, once the list...