Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Extending SaltStack

You're reading from   Extending SaltStack Build and write salt modules

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher Packt
ISBN-13 9781785888618
Length 240 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Joseph Hall Joseph Hall
Author Profile Icon Joseph Hall
Joseph Hall
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Starting with the Basics FREE CHAPTER 2. Writing Execution Modules 3. Extending Salt Configuration 4. Wrapping States Around Execution Modules 5. Rendering Data 6. Handling Return Data 7. Scripting with Runners 8. Adding External File Servers 9. Connecting to the Cloud 10. Monitoring with Beacons 11. Extending the Master A. Connecting Different Modules B. Contributing Code Upstream Index

Extending the loader system

As we said before, the loader system was originally designed for one type of module: what we now call execution modules. Before long, other types of module were added, and that number continues to grow even today.

This book does not include every type of module, but it does cover quite a few. The following list is not comprehensive, but it will tell you much of what is available now, and possibly give you an idea of what other types of module to look at after you finish this book:

  • Execution modules do much of the heavy lifting inside of Salt. When a program needs to be called, an execution module will be written for it. When other modules need to use that program, they will call out to that module.
  • Grain modules are used to report information about Minions. Virtual modules often rely heavily on these. Configuration can also be defined in grains.
  • Runner modules were designed to add an element of scripting to Salt. Whereas execution modules run on Minions, a runner module would run on the Master, and call out to the Minions.
  • Returner modules give Minions a way to return data to something besides the Master, such as a database configured to store log data.
  • State modules transform Salt from a remote execution framework into a configuration management engine.
  • Renderer modules allow Salt States to be defined using different file formats, as appropriate.
  • Pillar modules extend grains, by providing a more centralized system of defining configuration.
  • SDB modules provide a simple database lookup. They are usually referenced from configuration areas (including grains and pillars) to keep sensitive data from appearing in plaintext.
  • Outputter modules affect how command-line data output is shown to the user.
  • External file server modules allow the files that Salt serves to be stored somewhere besides locally on the Master.
  • Cloud modules are used to manage virtual machines across different compute cloud providers.
  • Beacons allow various pieces of software, from other Salt components to third-party applications, to report data to Salt.
  • External authentication modules allow users to access the Master without having to have a local account on it.
  • Wheel modules provide an API for managing Master-side configuration files.
  • Proxy minion modules allow devices that cannot run the Salt platform itself to be able to be treated as if they were still full-fledged Minions.
  • Engines allow Salt to provide internal information and services to long-running external processes. In fact, it may be best to think of engines as programs in their own right, with a special connection to Salt.
  • The Master Tops system allows States to be targeted without having to use the top.sls file.
  • Roster modules allow Salt SSH to target Minions without having to use the /etc/salt/roster file.
  • Queue modules provide a means of organizing function calls.
  • The pkgdb and pkgfile modules allow the Salt Package Manager to store its local database and install Salt formulas into a location outside of the local hard drive.

These modules were generally created as necessity dictated. All of them are written in Python. And while some can be pretty extensive, most are pretty simple to create. In fact, a number of modules that now ship with Salt were actually provided by users who had no previous Python experience.

You have been reading a chapter from
Extending SaltStack
Published in: Mar 2016
Publisher: Packt
ISBN-13: 9781785888618
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime