Preface
- Every book has a story, this story has a book
- To whom is this book addressed?
- How to properly enjoy this guide
- About The Author
Overview and requirements
- Overview
- Requirements
- Python
- YAML
- Indentation
- Colons
- Dashes
- Jinja2
- SaltStack VS. Puppet VS. Chef VS. Ansible
Installation and configuration
- How Salt versioning works
- Supported OSs
- Installing Salt
- Ubuntu Focal (20)
- Redhat / CentOS 8 PY3
- Understanding the communication model
- Post installation configurations
- Salt master and minion identities
- Salt modules
- Introduction
- Salt execution modules
- Asynchronous execution
- Creating your custom modules
- Salt state modules.
- Salt execution modules vs. Salt state modules
- Asynchronous execution
- Outputter modules
- Salt Command Anatomy
- Runner modules
- Creating your own runner modules
Salt grains
- What are grains?
- Listing grains
- Creating custom grains
- Automating custom grains creation
Salt targeting
- Targeting is crucial
- Shell-style Globbing
- List matching
- Targeting with regex
- Targeting with grains
- Targeting with pillar
- Targeting by IP/subnet
- Compound Matchers
- Conclusion
Salt states
- Introduction
- Salt states: SLS
- Organizing SLS
- Extending Salt States
- Salt requisite system
- Putting everything together
- Statement of the Problem
- What are Salt renderers
- Using Jinja in YAML (and making your Salt states cross-platform)
- Updating your infrastructure states based on conditions
- Creating a system configuration dashboard using states, jinja, and grains
- Creating a reactive state
- States Execution and Output Formatter
- The problem and the solution
- What is a top file and when to use it
- Targeting using the top file
- Pillar vs. grains
- Listing pillar data
- Creating pillar data
- Pillar: advanced use cases
The Salt Mine
- When do we need Salt mine
- Hands-On Lab: Using Salt Mine
- Salt mine in practice
Salt formulas
- What are formulas
- How to use formulas from a remote gitfs
- How formulas are organized
- How to use formulas locally (recommended)
Agentless Salt
- Introduction
- Installation and requirements
- The roster file
- Using keys
- Configuring CLI options with Saltfile
- Using salt-ssh
Masterless Salt
- What is a masterless Salt?
- When to use masterless Salt?
- Installing and configuring a Salt master on the minion or what we call "salting the Salt master"
- Using salt-call commands on a system without a master
- Running states entirely from files local to the minion
- Bootstrapping the minion
- Running masterless States
Salt scheduling
- Introduction
- Scheduling jobs using states
- Scheduling jobs using modules
- Hands-on lab: Monitoring a web page speed using a scheduled job
- Advanced job scheduling
- Scheduling states
Salt Events
- The Salt event system
- Salt Event bus
- Event types
- Firing events
- Salt states events
Salt reactor
- What is Salt reactor?
- Associating events to reactors SLS files
- Working with reactors and reactor types
Salt beacons
- What are Salt beacons?
- Watching files with beacons
- Watching memory and CPU with beacons
- Alerting on Slack using beacons and reactors
Salt orchestration
- What is orchestration and why do we need it?
- Our first orchestration state
- A deeper dive into orchestration
- Applying an orchestration and a high state
Strategies for Scaling the Infrastructure
- Using Salt At Scale
- Too many minions authing at once
- Too many minions re-authing at once
- Too many minions re-connecting at once
- Too many minions returning at once
- Too few resources
- Masterless Salt
- Salt Syndic
- Using Salt At Scale
Troubleshooting
- General Troubleshooting and Prerequisites Checklist
- Troubleshooting salt-master
- Troubleshooting salt-minion
- Troubleshooting Ports
- Using salt-call
- Useful Commands
Best Practices
- Rules
- Using includes and extends in Salt states
- Conventions
- Following SLS namespace guidelines
- Organizing Grains
- Using the Documentation
- Follow the official conventions to write formulas
- Start your cheat sheet
- The usual lecture from the local system administrator
Final words
Salt Cheat Sheet
Code in this book
