saltstack安装


部署环境3台centos7.2,其中一台部署master,安装方式有三种,yum,pip,源码包安装,由于源码包安装依赖包太多,所以我们这里采用的是yum方式安装。

首先在三台机器配置yum源。

rpm -ivh https://repo.saltstack.com/yum/redhat/7/x86_64/salt-repo-2015.8-2.el7.noarch.rpm

master安装:

yum -y install salt-master

minion端安装:

yum -y install salt-minion

master配置:

vim /etc/salt/master

interface: 172.18.84.115

minion配置:

vim /etc/salt/minion

master: 172.18.84.115

分别启动salt

service salt-master start

service salt-minion start

在master上查看key

[[email protected] certs]# salt-key
Accepted Keys:
Denied Keys:
Unaccepted Keys:
centos2
centos3
Rejected Keys:

接受所有salt-minion的认证请求

[[email protected] certs]# salt-key -A -y
The following keys are going to be accepted:
Unaccepted Keys:
centos2
centos3
Key for minion centos2 accepted.
Key for minion centos3 accepted.

去除salt-minion的认证
## 如果觉得该minion不需要了,可以***
[[email protected] salt]# salt-key -y -d  172.18.84.117

测试通讯:

[[email protected] certs]# salt '*' test.ping
centos2:
True
centos3:
True


Whatever is worth doing is worth doing well.