Salt Cookbook

Over 80 hands-on recipes to efficiently configure and manage your infrastructure with Salt

Salt Cookbook

This ebook is included in a Mapt subscription
Anirban Saha

1 customer reviews
Over 80 hands-on recipes to efficiently configure and manage your infrastructure with Salt
$0.00
$18.00
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784399740
Paperback350 pages

Book Description

Salt has become one of the major players in automation and configuration management solutions.

This book starts with the basics of the tool, the procedures to get up and running with Salt and then moves on to configuring very simple but important details to receive optimal performance from the tool. It also walks you through Salt configurations for different infrastructure components and the details of the Salt modules for each of the components. The book also provides some common problem scenarios and how to troubleshoot them.

With detailed configuration, their explanation and command line outputs of the module execution, Salt Cookbook will help you to get up and running with Salt for all your infrastructural needs.

Table of Contents

Chapter 1: Salt Architecture and Components
Introduction
Installing and configuring the Salt master
Configuring the Salt environment and pillar paths
Understanding and configuring Salt pillars
Understanding and writing Salt states
Understanding and writing the top file
Installing and configuring the Salt minion
Configuring environments and grains on the minion
Applying Salt states to minions
Chapter 2: Writing Advanced Salt Configurations
Introduction
Writing and retrieving pillar data
Using pillar data in states
Using grains in states
Using conditionals in states and pillars
Using Python functions in conditionals
Using iterations in states
Setting and using variables in states
Testing a state run before applying to minions
Configuring nodegroups
Targeting minions
Chapter 3: Modules, Orchestration, and Scaling Salt
Introduction
Using execution modules
Using state modules
Configuring templates
Using requisites
Using Salt runners
Orchestration with Salt orchestrate
Salt multi-master setup (active-active mode)
Salt multi-master setup (active-passive mode)
Chapter 4: General Administration Tasks
Introduction
Running commands
Setting host entries and grains
Setting time zone, locale, and kernel configurations
Handling archive files
Adding groups and users
Performing SSH authentication tasks
Scheduling jobs with cron
Managing volumes
Working with disks and mounts
Managing network configurations
Chapter 5: Advanced Administration Tasks
Introduction
Managing package repositories
Managing packages using the default package manager
Managing packages using rvm, gem, and pip
Managing files
Managing services
Managing code repositories with Git
Managing code repositories with svn
Configuring alternatives
Chapter 6: Managing Application Servers
Introduction
Apache web server packages and services
Managing web server modules
Adding web server configuration
Web server security with htpasswd
Setting up Java for Apache Tomcat
Apache Tomcat packages, files, and services
Deploying the WAR file in Apache Tomcat
Chapter 7: Managing Databases
Introduction
Using MySQL packages, files, and services
Using MySQL databases
Creating MySQL database users
Running MySQL queries
Providing MySQL user grants
Using PostgreSQL packages, files, and services
Setting up PostgreSQL groups and users
Configuring PostgreSQL databases
Chapter 8: Configuring Salt Cloud
Introduction
Configuring the Salt cloud environment
Configuring cloud providers
Configuring cloud profiles
Extending profiles and providers
Configuring cloud maps
Using post-install scripts
Launching, querying, and destroying instances
Performing general cloud functions
Chapter 9: Managing Amazon Web Services
Introduction
Implementing security groups
Using elastic load balancers
Configuring DNS with Route53
Configuring Simple Queue Service
Deploying ElastiCache clusters
Configuring CloudWatch alarms
Chapter 10: Salt Event and Reactor System
Introduction
Learning the basics of the event system
Listening to events
Firing events
Identifying and working with Salt event types
Integrating and configuring the reactor system
Using reactors for Salt tasks
Chapter 11: Troubleshooting
Introduction
Troubleshooting the Salt master
Troubleshooting the Salt minion
Dealing with too many open files
Connectivity, DNS, and ports
Dealing with YAML configuration problems

What You Will Learn

  • Understand the basic Salt architecture and components and learn how to configure them
  • Understand and configure advanced Salt components and manipulate configurations
  • Configure Salt modules, the orchestration procedure and set up multi-master configurations
  • Configure operating system components such as files, users, volumes, authentication, and so on
  • Leverage the cloud capabilities of Salt
  • Understand and configure the Salt event and reactor system

Authors

Table of Contents

Chapter 1: Salt Architecture and Components
Introduction
Installing and configuring the Salt master
Configuring the Salt environment and pillar paths
Understanding and configuring Salt pillars
Understanding and writing Salt states
Understanding and writing the top file
Installing and configuring the Salt minion
Configuring environments and grains on the minion
Applying Salt states to minions
Chapter 2: Writing Advanced Salt Configurations
Introduction
Writing and retrieving pillar data
Using pillar data in states
Using grains in states
Using conditionals in states and pillars
Using Python functions in conditionals
Using iterations in states
Setting and using variables in states
Testing a state run before applying to minions
Configuring nodegroups
Targeting minions
Chapter 3: Modules, Orchestration, and Scaling Salt
Introduction
Using execution modules
Using state modules
Configuring templates
Using requisites
Using Salt runners
Orchestration with Salt orchestrate
Salt multi-master setup (active-active mode)
Salt multi-master setup (active-passive mode)
Chapter 4: General Administration Tasks
Introduction
Running commands
Setting host entries and grains
Setting time zone, locale, and kernel configurations
Handling archive files
Adding groups and users
Performing SSH authentication tasks
Scheduling jobs with cron
Managing volumes
Working with disks and mounts
Managing network configurations
Chapter 5: Advanced Administration Tasks
Introduction
Managing package repositories
Managing packages using the default package manager
Managing packages using rvm, gem, and pip
Managing files
Managing services
Managing code repositories with Git
Managing code repositories with svn
Configuring alternatives
Chapter 6: Managing Application Servers
Introduction
Apache web server packages and services
Managing web server modules
Adding web server configuration
Web server security with htpasswd
Setting up Java for Apache Tomcat
Apache Tomcat packages, files, and services
Deploying the WAR file in Apache Tomcat
Chapter 7: Managing Databases
Introduction
Using MySQL packages, files, and services
Using MySQL databases
Creating MySQL database users
Running MySQL queries
Providing MySQL user grants
Using PostgreSQL packages, files, and services
Setting up PostgreSQL groups and users
Configuring PostgreSQL databases
Chapter 8: Configuring Salt Cloud
Introduction
Configuring the Salt cloud environment
Configuring cloud providers
Configuring cloud profiles
Extending profiles and providers
Configuring cloud maps
Using post-install scripts
Launching, querying, and destroying instances
Performing general cloud functions
Chapter 9: Managing Amazon Web Services
Introduction
Implementing security groups
Using elastic load balancers
Configuring DNS with Route53
Configuring Simple Queue Service
Deploying ElastiCache clusters
Configuring CloudWatch alarms
Chapter 10: Salt Event and Reactor System
Introduction
Learning the basics of the event system
Listening to events
Firing events
Identifying and working with Salt event types
Integrating and configuring the reactor system
Using reactors for Salt tasks
Chapter 11: Troubleshooting
Introduction
Troubleshooting the Salt master
Troubleshooting the Salt minion
Dealing with too many open files
Connectivity, DNS, and ports
Dealing with YAML configuration problems

Book Details

ISBN 139781784399740
Paperback350 pages
Read More
From 1 reviews

Read More Reviews