FoxuTech

SaltStack Introduction – Its Components and Terminology

Saltstack introduction

Salt, or SaltStack, is a remote execution tool and configuration management system, based on the community-sourced Salt platform. The remote execution capabilities allow administrators to run commands on various machines in parallel with a flexible targeting system. The configuration management functionality establishes a client-server model to quickly, easily, and securely bring infrastructure components in line with a given policy.

Architecture

The architecture of SaltStack is designed to work with any number of servers, from local network systems to other deployments across different data centers. Architecture is a simple server/client model with the needed functionality built into a single set of daemons.

Take a look at the following illustration. It shows the different components of SaltStack architecture. 

Roles

To understand how saltstack works, learn the machine roles and understand it, it helps to understand more about the how to query information about minion and how to using salt modules.

Master

Salt master is the machine/node that controls the complete infrastructure and trigger the policies for the servers it manages. It operates both as a repository for configuration data and as the control center that initiates remote commands and ensures the state of your other machines.

While it is possible to control infrastructure using a masterless configuration, most setups benefit from the advanced features available in the Salt master. Also it can operate in a tiered master configuration where commands can be relayed through lower master machines.

Minions

The servers that Salt(manager) manages are called minions. The minion is responsible for executing the instructions sent by the master, reporting on the success of jobs, and providing data about the underlying host.

How Salt communicates?

By default, Salt executes commands from the Master on Salt minions. Communications between a master and minions occurs over the ZeroMQ message bus. ZeroMQ messaging library provides extremely high performance network communication between parties, allowing Salt to send messages and data at rapid speeds. SaltStack modules communicate with the supported minion operating systems. The Salt Master runs on Linux by default, but any operating system can be a minion, and currently Windows, VMware vSphere and BSD Unix variants are well-supported.

And Salt master can send the command over SSH also, if you would like to setup agentless infrastructure. But it degrades performance quite considerably and can lead to complications with other Salt commands in some instances. So it is highly recommended that you use the salt-minion daemon where possible for performance, security, and simplicity.

Terminology

Before starting learning or getting hand dirty, we should always learn the terminologies, which will make us to work on flow and familiarize. Salt has many powerful features, but it can be difficult to match names with their functionality at first.

Compare other CM’s term

  If you are familiar with other CM’s tools like chef and puppet, here we have sort-out some comparison between the terms across the tools.

Salt Chef Puppet
state resource resource
states recipes manifests
formula* cookbook module
pillars databags hiera
grains ohai facter

*forumla – formulas are more like 3rd party cookbooks in Chef, there doesn’t seem to be an equivalent concept of packaging related states together unless they are meant to be shared externally. Unlike Chef cookbooks or Puppet modules, which it is standard to create for grouping resources even if packaging for distribution is not intended.

Salt Commands

Salt provides a number of commands to take advantage of the components outlined above. There is some significant crossover in terms of functionality between these tools, but we’ve attempted to highlight their primary functions below.

There are some other commands as well, like salt-api, salt-cp, and salt-syndic, which aren’t used quite so often.

Exit mobile version