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

Looking at the event system


The event system is one of the oldest components of Salt. Yet, it is now used more than almost any other part. Most of its usage is internal to Salt, but don't worry because there are plenty of functionalities that we can take advantage of as users and administrators.

Reviewing the basics

Salt is built based on a message queue. Commands that are issued from the master generate jobs, which are posted to the queue. Minions watch the queue for anything that targets them. When a minion picks up a job, it attempts to perform the work associated with it. Once it has finished, it posts the return data back to another queue; this is the one that the master listens to.

Minions also have the ability to fire information that is not associated with a job that was generated on the master. These pieces of information form the basis of the event bus.

There are in fact two event buses: one for minions to communicate with themselves (but not with other minions) and one for minions...