Book Image

Learning SaltStack - Second Edition

By : Myers
Book Image

Learning SaltStack - Second Edition

By: Myers

Overview of this book

SaltStack is one of the best infrastructure management platforms available. It provides powerful tools for defining and enforcing the state of your infrastructure in a clear, concise way. With this book learn how to use these tools for your own infrastructure by understanding the core pieces of Salt. In this book we will take you from the initial installation of Salt, through running their first commands, and then talk about extending Salt for individual use cases. From there you will explore the state system inside of Salt, learning to define the desired state of our infrastructure in such a way that Salt can enforce that state with a single command. Finally, you will learn about some of the additional tools that salt provides, including salt-cloud, the reactor, and the event system. We?ll finish by exploring how to get involved with salt and what'?s new in the salt community. Finally, by the end of the book, you'll be able to build a reliable, scalable, secure, high-performance infrastructure and fully utilize the power of cloud computing.
Table of Contents (12 chapters)
11
Index

Adding a new minion


The initial examples in this chapter will be all about cross-platform states. To make the examples clearer, we will add a new minion running CentOS 6.5. See Chapter 1, Diving In – Our First Salt Commands, if you need a refresher on how to install salt-minion on a new server. Here's a quick two liner to install a minion using Salt-Bootstrap:

# curl -L https://bootstrap.saltstack.com -o install_salt.sh
# sudo sh install_salt.sh

Tip

Note that the easiest way to ensure the minion can easily communicate with the master is to have them both as cloud VMs rather than local VMs, so that they have individual, public-facing IP addresses.

After installing the same version running on your master, you should configure your minion to connect to your master's IP with the name centminion. Your /etc/salt/minion configuration on your new minion should look something like this:

master: 69.164.192.51
id: centminion

Then, restart your minion, as follows:

# sudo service salt-minion restart
Stopping...