SaltStack (2018.3.3)

Salt or saltstack is a open source configuration management tool also used as remote execution or automation of servers provisioning and management of several different tasks. It uses master slave (called master and minion) architecture where it runs commands on the various machines along with the target machine from a single server or machine.
The main components of saltstack are master, minion, grains and execution modules, where the master is the machine which controls the target system and the minion is the machine which is controlled by the tartget or the master machine, grains are the static information about the minion such as OS, memory etc. execution modules are the adhoc commands executed from the command line of the master to the one or more target minions.

Installation steps:

Pre-installation steps:

1. Edit host file
Vi /etc/hosts
In master: saltmaster
In client : saltminion saltmaster

2. Disable SELINUX :
Vi /etc/selinux/config
SELINUX = Disable
(change enforcing to disable)

3. Stop firewalld and Network Manager
Systemctl stop firewalld
Systemctl stop NetworkManager

Installation steps:
1. Install saltstack repository on both master and minion :
We first need to install the repository required to install the saltstack using the command
# yum install

2. Install salt master and minion:
Install salt master on the master machine using the command
# yum install salt-master
on the client machine install minion using the command
# yum install salt-minion

3. Salt master configuration:
The salt master configuration is stored in /etc/salt/master
In order to connect to the repective minion add the minions IP address in the master configuration file as
# Interface

4. Salt minion configuration
Same as slat master salt minion configuration file is stored in /etc/salt/minion.
Add the following lines in the salt configuration file to connect it to the salt master.
# master

5. Start the master and minion service :
On respective master and minion machine run the folloeing command to start the minion and master service as
Systemctl start salt-master.
Systemctl start salt-minion

6. Key management :
Salt uses Advanced Encryption Standard (AES) in communicating master with minion which ensures secure communication. This is being authenticated using trusted accepeted keys .
In order to execute any command on the minion from the master the key must be accepted on the master side.
 To list the keys available on the master run the following command.
[root@saltmaster ~]# salt-key -L
Accepted Keys:
Denied Keys:
Unaccepted Keys:
Rejected Keys:

 Then accept the unaccepted keys using the following command
[root@saltmaster ~]# salt-key
The following keys are going to be accepted:
Unaccepted Keys:
Proceed? [n/Y] y
Key for minion accepted.

 After accepting the key on the master , to test whether the master and minion are communicating run the following command

[root@saltmaster ~]# salt

If the above output is displayed it indicates that master and minion are communicating.

Be the first to comment on "SaltStack (2018.3.3)"

Leave a comment

Your email address will not be published.