Book Image

Mastering SaltStack - Second Edition

Book Image

Mastering SaltStack - Second Edition

Overview of this book

SaltStack is a powerful configuration management and automation suite designed to manage servers and tens of thousands of nodes. This book showcases Salt as a very powerful automation framework. We will review the fundamental concepts to get you in the right frame of mind, and then explore Salt in much greater depth. You will explore Salt SSH as a powerful tool and take Salt Cloud to the next level. Next, you’ll master using Salt services with ease in your infrastructure. You will discover methods and strategies to scale your infrastructure properly. You will also learn how to use Salt as a powerful monitoring tool. By the end of this book, you will have learned troubleshooting tips and best practices to make the entire process of using Salt pain-free and easy.
Table of Contents (20 chapters)
Mastering SaltStack Second Edition
Credits
Foreword
About the Author
About the Reviewer
www.PacktPub.com
Preface

Taking a look at cloud maps


So far, we have only discussed how to work with compute instances on an individual level. However, one of the earliest features of Salt Cloud was the concept of a cloud map file (not to be confused with file_map). Cloud maps allow you to specify a group of machines to create all in one shot.

This can be very useful when managing a small infrastructure or small pieces of a large infrastructure. Not only can you declare that certain profiles be used to declare a number of compute instances, but you can also append and override configuration in those profiles.

Let's say that you have an infrastructure that contains database servers, web servers, and load balancers. Each type of server will have its own unique needs, but there will also be multiple instances of each type of server. First, let's define the provider:

my-ec2: 
  id: FWEHKJ345FSDAFDE34DF 
  key: 'fewhgreFRE/FSE+freg3r43FDSDS3334DSFdff4u' 
  keyname: mycompany 
  private_key: /root/mycompany...