author: headsen chen
date: 2018-08-04 22:22:09
1,架构
2,配置
2.1,配置master:
yum -y install epel-release
yum -y install salt-master
grep "^[a-Z]" /etc/salt/master
default_include: master.d/*.conf
file_roots:
order_masters: True
service salt-master restart
2.2,配置 syndic端(两台机器操作完全一样):
yum -y install epel-release
yum -y install salt-syndic
vim /etc/salt/proxy
maser: 192.168.10.100
vim /etc/salt/master
syndic_master: 192.168.10.100
service salt-master restart
service satl-syndic restart
chkconfig salt-syndic on #注:salt-master 和salt-minion都是安装后就是开机自启动,salt-syndic要手动添加下
2.3,配置minion端:
yum -y install epel-release
yum -y install salt-minion
vim /etc/salt/mion
master: 192.168.10.101 # 10.103和10.104配成这样,10.105配置成: master:192.168.10.102
service salt-minion restart
3,到master和syndic节点上查看
master节点上查看:
分别到两个syndic节点上查看:
在master和syndic节点上分别运行:salt-key -A 接收认证请求
4,测试:
master:注意,返回的结果是所有minion端的结果,而不是syndic端本身的结果。
syndic :