SaltStack installation

Linux cluster management, the configuration is basically the same. At the beginning, it is easy to maintain a few servers and log in to the server to change one by one. When there are hundreds of hosts on hand, the operation is a little broken. I saw a bunch of batch management tools Ssh key, Saltstack, expect, puppet, ansible, cfengine on the Internet.

Saltstack automatic operation and maintenance is selected from the comprehensive consideration of simplicity and practicality, and the development language is py.

Saltstack is a brand new infrastructure management method. It is a centralized management platform for server infrastructure. It can be up and running within a few minutes. The speed is fast enough. The second-level communication between servers is excellent. , It is easy to manage tens of thousands of servers in batches, which significantly reduces labor and operation and maintenance costs; it has configuration management, remote execution, monitoring and other functions, which can generally be understood as a simplified version of puppet and an enhanced version of func; by deploying the SaltStack environment, you can To execute commands in batches on thousands of servers, configure centralized management, distribute files, collect server data, operating system foundation, and software package management according to different business characteristics. 

Server installation configuration

#Install EPEL YUM source
yum install epel-release.noarch
#Install server
yum install salt- master

[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS- Base.repo
epel.repo

Client installation configuration

#Install EPEL YUM source
yum -y install epel-release.noarch
#Install client
yum -y install salt-minion

# Configure the host name as the client ID
line 16 master: 192.168.1.130
page 78 Line id: centos

#Set start
service salt-minion start
systemctl restart salt-minion

Server:
[[ email protected] ~]# salt-key -L
Accepted Keys:
Centos
Denied Keys:
Unaccepted Keys:
Rejected Keys:

Test service
salt'*' test.ping
salt'*' cmd.run'free -m'

Leave a Comment

Your email address will not be published.