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
About the Author
About the Reviewer

Understanding test errors in pull requests

When you submit a new pull request, GitHub will trigger the test suite to run against it. This will take several minutes, as it needs to create a new virtual machine, and start a lint test using Pylint, as well as tests on popular platforms such as CentOS and Ubuntu:

As the tests are running, you can check progress by clicking the Details button on the right:

Click on one of the tests to see more information. You will see output such as error messages, stacktraces, and standard output and standard error output.

There is a chance that one or more of the test failures that show up in your pull request are not actually your fault. It could be that another pull request was merged, which caused unforeseen issues on the build server. If the errors that show up don't look to be related to your code, leave a comment to ask about it. One of the core developers at SaltStack will see it and help you out.

Lint errors look a little different. When you look at the details for a lint test, you will see a list of files that are affected. Click on one, and you will see each error marked out. Hover over it to find out what went wrong:

If you would like more information about the lint test, you can click on Console Output on the left, to see a full log of the lint test.

Once you have made corrections to the code in your local Git clone, commit them as you normally would, and push them back up to GitHub:

$ git push origin newfeature

A new test run will be scheduled, and any remaining errors will show up as before. Once all of the errors have been resolved, a core developer will be able to merge your code.