Saltstack is generally considered to be a puppet version of the simplified version and the Func
Installation:
Deployment environment:
Role |
Hostname |
Ip |
Operating system |
Python version |
Master |
Master |
192.168.224.141 |
CentOS Release 6.4 (Final)
|
Python 2.6.6
|
minion001 |
minion001 |
192.168.224.142
|
CentOS Release 6.4 (Final)
|
Python 2.6.6
|
minion002 |
minion002 |
192.168.224.143
|
CentOS Release 6.4 (Final)
|
Python 2.6.6 |
2. Installing Epel
RPM-UVH Yum Upgrade Ca-certificates--disablerepo=epel-y
3. Host side (Master) installation
Yum install salt-master-y chckconfig salt-master on/etc/init.d/salt-master start
4. Controlled end installation (minion001,minion002)
Yum install salt-minion-y chckconfig salt-minion on/etc/init.d/salt-minion start
5. Host side (Master) firewall configuration:
Iptables-i input-m State--state new-m tcp-p TCP--dport 4505-j acceptiptables-i input-m State--state new-m TCP- P TCP--dport 4506-j ACCEPT
6. Master (Master) profile/etc/salt/master (only the following):
/etc/salt/master:
interface:192.168.224.141 auto_accept:true file_roots:base:-/srv/salt
Note that there are two spaces before the beginning of each line, and a space after the colon
Restart:
/etc/init.d/salt-master restart
7. The managed side (minion001,minion002) Profile:/etc/salt/minion (keep only the following):
Note that at the beginning of the two spaces, a space after the colon
1) minion001
/etc/salt/minion:
master:192.168.224.141 id:minion001
Restart
/etc/init.d/salt-minion restart
2) minion002
/etc/salt/minion:
master:192.168.224.141 id:minion002
Restart
/etc/init.d/salt-minion restart
8. Test the installation successfully on the Master side (master):
Salt ' * ' test.ping # # #返回True表示安装成功
9. Supplement
If, in the/etc/salt/master configuration file of master, there is no configuration: auto_accept:true, you need to do this manually by using the following command:
Salt-key-l # #列出所有认证和未认证的id
salt-key-d # #删除所有认证id
Salt-key-d ID # #删除指定的id
SALT-KEY-A # #授权所有证书请求
Salt-key-a ID # #授权指定id证书请求
Yum encountered the following error during installation:
Error:cannot retrieve Metalink for Repository:epel. Verify its path and try again
Solve:
Yum Upgrade Ca-certificates--disablerepo=epel-y
Centralized management platform Saltstack installation deployment