Book Image

Extending SaltStack

Book Image

Extending SaltStack

Overview of this book

Salt already ships with a very powerful set of tools, but that doesn't mean that they all suit your needs perfectly. By adding your own modules and enhancing existing ones, you can bring the functionality that you need to increase your productivity. Extending SaltStack follows a tutorial-based approach to explain different types of modules, from fundamentals to complete and full-functioning modules. Starting with the Loader system that drives Salt, this book will guide you through the most common types of modules. First you will learn how to write execution modules. Then you will extend the configuration using the grain, pillar, and SDB modules. Next up will be state modules and then the renderers that can be used with them. This will be followed with returner and output modules, which increase your options to manage return data. After that, there will be modules for external file servers, clouds, beacons, and finally external authentication and wheel modules to manage the master. With this guide in hand, you will be prepared to create, troubleshoot, and manage the most common types of Salt modules and take your infrastructure to new heights!
Table of Contents (21 chapters)
Extending SaltStack
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Understanding cloud components


The word cloud has suffered from an unfortunate bout of overuse and misuse in recent years, so before we talk about what the components look like, we need to define what we're actually talking about in the first place.

Salt Cloud is designed to operate with compute cloud providers. This means that they offer computing resources, often in the form of virtual machines. A number of cloud providers also offer other resources, such as storage space, DNS, and load balancing. While Salt Cloud isn't explicitly designed to manage these resources, it is possible to add support for them.

For our purposes, we will discuss creating cloud drivers with a focus on managing virtual machines. Some of the techniques can be used for adding other resources, so if you're planning on going in that direction, this chapter will still be useful to you.

Looking at the puzzle pieces

The primary goal of Salt Cloud is to easily create virtual machines on a cloud provider, install a Salt Minion...