SaltStack (2018.3.3)

Description:
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: 192.168.0.49 saltmaster.unixadmin.in saltmaster
In client : 192.168.0.50 saltminion.unixadmin.in saltminion
192.168.0.49 puppetmaster.unixadmin.in 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 https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm

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 192.168.0.49

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 192.168.0.49

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:
saltclient.unixadmin.in
Rejected Keys:

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

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

[root@saltmaster ~]# salt saltclient.unixadmin.in test.ping
saltclient.unixadmin.in:
True

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.


*