Book description
Extend the power of your infrastructure and applications with Salt modules
About This Book
- Get the most up-to-date practical resource on writing new Salt modules and extending Salt
- Learn through use cases and encounter both commonly-used modules as well as advanced ones
- Effectively troubleshoot problems and hiccups encountered while building and putting modules to work
Who This Book Is For
This book is for both new and existing Salt developers who are looking to build and write new Salt modules. Some prior Python development experience is expected.
What You Will Learn
- Understand the working of Salt's Loader system
- Write several of the most common types of Salt modules
- Interact between different kinds of modules and build new ones
- Submit open source modules upstream to the Salt project
- Make Salt interact with third-party services and applications
In Detail
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!
Style and approach
This book follows a step-by-step tutorial-based approach explaining the different types of modules, from fundamentals to complete and full-functioning modules.
Table of contents
-
Extending SaltStack
- Table of Contents
- Extending SaltStack
- Credits
- Foreword
- About the Author
- About the Reviewer
- www.PacktPub.com
- Preface
- 1. Starting with the Basics
-
2. Writing Execution Modules
-
Writing Salt modules
- Hidden objects
- The __virtual__() function
- Formatting your code
- Virtual modules
- Using the salt.utils library
- Cross-calling with the __salt__ dictionary
- Getting configuration parameters
- Handling imports
- Reusing code
- Logging messages
- Using the __func_alias__ dictionary
- Validating data
- Formatting strings
- The final module
- Troubleshooting execution modules
- Summary
-
Writing Salt 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
- Understanding cloud components
- Writing a generic cloud module
- The final cloud module
- Troubleshooting cloud modules
- Summary
- 10. Monitoring with Beacons
- 11. Extending the Master
- A. Connecting Different Modules
- B. Contributing Code Upstream
- Index
Product information
- Title: Extending SaltStack
- Author(s):
- Release date: March 2016
- Publisher(s): Packt Publishing
- ISBN: 9781785888618
You might also like
book
Serverless Architectures with AWS
Don't waste your energy thinking about servers; use AWS to build enterprise-grade serverless applications. Key Features …
book
Network Automation at Scale
Network automation today is a continuous process of generating and deploying configuration changes, management, and operations …
video
Salt at Scale: Lessons from LinkedIn
LinkedIn was an early adopter of salt. Within LinkedIn, there are multiple groups with differing requirements. …
book
MicroStrategy Quick Start Guide
Build reporting applications and dashboards using the different MicroStrategy objects Key Features Learn the fundamentals of …