×
Installing SaltStack Master On CentOS 7 (Simple Steps)
Automation Blog

Installing SaltStack Master On CentOS 7 (Simple Steps)

Installing SaltStack Master On CentOS 7 (Simple Steps)

SaltStack  a distributed remote execution system used to execute commands and query data on remote nodes, either individually or by arbitrary selection criteria, here is more about the saltstack. Below are the steps how to installing salt master on centos7 host.

 1. SYSTEM REQUIREMENTS:

1.1) RAM and DISK information:

CPU: 2core

RAM: 2G

Disk: 50G ( We will place all the state files under the salt master home path: /srv).

We can use below commands to check RAM and Disk details(for testing purpose we are using minimal configuration in our VM),

For RAM: # free –m

installing salt master on centos7

For DISK usage: # df –h

installing salt master on centos7

1.2) Firewall port up for SaltStack:

Note: Make sure the ‘firewalld’ command installed on the system, otherwise use the command ‘yum -y install firewalld’ to install the firewalld.

Firewall status checking:

installing salt master on centos7

Opening port for salt:

# firewall-cmd –permanent –zone=public –add-port=4505-4506/tcp

# firewall-cmd –reload

installing salt master on centos7

Verify the port status:

# firewall-cmd –list-ports

installing salt master on centos7

Installing salt master on centos7

 

Run the following commands to install the SaltStack repository and key:

# yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el7.noarch.rpm

To make sure the SaltStack repo installed use the below command,

# find /etc -name salt-latest.repo

clean up various things which accumulate in the yum cache directory over time,

# yum clean expire-cache

installing salt master on centos7

Install the salt-master,

# yum install salt-master

installing salt master on centos7

installing salt master on centos7

3. CONFIGURING SALT-MASTER:

3.1) In the file: /etc/salt/master

Edit the Interface value with your SALTMASTER’S main interface IP.

installing salt master on centos7

Edit the timeout settings (10 minutes),

installing salt master on centos7

We can start the salt-master service by below command,

# systemctl start salt-master

installing salt master on centos7

installing salt master on centos7

4. INSTALLING SALT-MINION

Run the following commands to install the SaltStack repository and key:

# yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el7.noarch.rpm

To make sure the saltstack repo installed use the below command,

# find /etc -name salt-latest.repo

clean up various things which accumulate in the yum cache directory over time,

# yum clean expire-cache

installing salt master on centos7

Install the salt-minion:

# yum install salt-minion

installing salt master on centos7

Configuring salt-minion:

In the file: /etc/salt/minion

Edit the master value with your SALTMASTER’S IP

installing salt master on centos7

Edit the minion id vale to identify from master ( if we didn’t mention any value as id in this configuration file then the hostname will be displayed on the ‘Unaccepted Keys’ list in salt-master ):

clip_image022

Start the salt-minion service:

installing salt master on centos7

Accepting the salt-minion key and verify the minion status:

The salt-minion service will send the encrypted key to salt-master when the service started in ‘saltclient’ vm.

installing salt master on centos7

Accept the key in salt-master:

# salt-key -a saltclient

installing salt master on centos7

Verify the minion:

# salt ‘saltclient’ test.ping

installing salt master on centos7

 

 

One thought on “Installing SaltStack Master On CentOS 7 (Simple Steps)”

  1. Nice article about SaltStack. Want to work on cloud automation using Salt , Puppet and Chef. May I get your email id. Want to discuss with u. Thanks.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.