Saltstack is a large distributed configuration Management system (Install upgrade uninstall software, detection environment), is also a remote command execution system. The model is implemented by C/S. Server-side operations on remote clients:
Saltstack Deployment:
master:192.168.63.163 www.oms.com
minion:192.168.63.129 www.omsclient.com
Deployment requirements: Two machines network interoperability, it is best to turn off the firewall. Turn off SELinux.
1, modify the/etc/hosts
[Email protected] salt]# cat/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.63.129 www.omsclient.com
192.168.63.163 www.oms.com
2, install the service side:
RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Yum Install
Yum Install Salt-master-y
Start:
/etc/init.d/salt-master start
3, install the client:
Yum Install Salt-minion-y
Modify the configuration file to point to the server:
[Email protected] salt]# vi/etc/salt/minion
Master:www.oms.com
Start:
[[email protected] salt]#/etc/init.d/salt-minion start
Here, the installation is complete. Server-Side Execution. Salt-key list will be able to view the client, but I have some problems in the experiment here to point out a bit:
one, [[email protected] ~]# Salt-key list
Accepted Keys:
Ip-50-63-202-30.ip.secureserver.net
unaccepted Keys:
Rejected Keys:
Here obviously did not load to, look at the log file discovery client, there is an error in this line:
Second, [[email protected] salt]# cat/var/log/salt/minion
[Salt.crypt] [CRITICAL] The Salt Master has rejected this
Minion ' s public key!
To repair this issue, delete the public key for this minion on the Salt Master and
Restart this minion.
Or Restart the Salt Master in open mode to the keys. The Salt minion'll now
Exit.
Third, do not know what meaning, debug view situation:
[[email protected] salt]# salt-minion-l Debug
[INFO] Setting up the Salt minion "Ip-50-63-202-30.ip.secureserver.net"
[DEBUG] Created Pidfile:/var/run/salt-minion.pid
[DEBUG] Reading Configuration From/etc/salt/minion_id:ip-50-63-202-30.ip.secureserver.net
#看到这里应该明白为什么我们主机名那里不知道了, because the salt is to read the hostname from/etc/salt/mimion_id:
Four, modify the hostname, the situation cache:
[Email protected] salt]# vi/etc/salt/minion_id
[Email protected] salt]# RM-RF Minion
Five, the execution of orders to try: or error. It turns out that the key has not yet been loaded:
[[email protected] ~]# Salt ' www.omsclient.com ' test ping
No minions matched the target. No command was sent, no Jid was assigned.
Six, the client open debug, master load key;
[Email protected] ~]# salt-key-a
The following keys is going to be accepted:
unaccepted Keys:
Www.oms.com
Www.omsclient.com
Proceed? [n/y] Y
Key for Minion Www.oms.com accepted.
Key for Minion Www.omsclient.com accepted.
Seven, complete, test the command:
650) this.width=650; "title=" salt.jpg "src=" http://s3.51cto.com/wyfs02/M01/57/B0/ Wkiol1sidmkchlfhaadzj7y8uao377.jpg "alt=" Wkiol1sidmkchlfhaadzj7y8uao377.jpg "/>
This article from "Little Luo" blog, reproduced please contact the author!
First day Salt stack notes