What is Salt Stack?
SaltStack, also known as Salt, is a configuration management and orchestration tool. It uses a central repository to provision new servers and other IT infrastructure, to make changes to existing ones, and to install software in IT environments, including physical and virtual servers, as well as the cloud. Salt is used in DevOps organizations because it pulls developer code and configuration information from a central code repository, such as GitHub or Subversion, and pushes that content remotely out to servers. Salt users can write their own scripts and programs, and can download prebuilt configurations that other users have contributed to a public repository. In this blog, we are going to install and configure SaltStack minion and master on centos 7Prerequisites:-
- Make sure you have two centos 7 servers names salt-master and salt-minion.
- salt-minion server are accessible from salt-master.
Step 1:- Setup salt master on Salt-master server
- Update the System
Sudo yum update -y
- Install and Configure Salt-master
sudo yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest.el7.noarch.rpm
sudo yum clean expire-cache
sudo yum install salt-master
Now modify the configuration file
sudo vi /etc/salt/master
Replace the interface ip with ip of your salt-master
sudo systemctl start salt-master.service
sudo systemctl enable salt-master.service
Step 2:- Setup salt minion on Salt-minion server
- Update the System.
Sudo yum update -y
- Install and Configure Salt-minion
sudo yum install https://repo.saltstack.com/yum/redhat/salt-repo-latest.el7.noarch.rpm
sudo yum clean expire-cache
sudo yum install salt-minion
- Now modify the configuration file
sudo vi /etc/salt/minion
- Replace the interface ip with ip of your salt-master
sudo systemctl start salt-minion.service
sudo systemctl enable salt-minion.service
Step 3:- Test setup on Salt-minion server
sudo salt-key -L
Accept the unaccepted key with below command
salt-key --accept=ip-172-31-13-230.ap-south-1.compute.internal
Finally test your setup with below command
sudo salt ip-172-31-13-230.ap-south-1.compute.internal test.ping
Congratulations you follow all the steps and configure Salt and minion server on centos 7For more updates follow www.cloudsbaba.com