1.saltstack Basics in detail saltstack is a very easy to use and lightweight management tool with Python development. Composed of master and minion, the master side of communication saltstack through ZEROMQ listens on 4505 and 4506 ports, 4505 is a salt message publishing system, and 4506 is the port that the salt client communicates with the server. Salt client program does not listen to the port, after the client starts, it will actively connect to the master terminal registration, and then keep the TCP connection, master through this TCP connection to the client control, if the connection is broken, master can do nothing to the client. Of course, if the client checks to disconnect, it will periodically connect to the master end of the salt using the famous ZEROMQ as the communication protocol, the performance is very high. Data delivery can be completed in seconds based on ZEROMQ communication, with strong scalability, hierarchical management, and the ability to manage tens of thousands of servers distributed across the WAN 1. master: boss, management end 2. minion: Horse, is the management end 3. syndic: boss, for eldest brother is horse, for the horse is the eldest brother Node information (grains) grains: records data that includes relatively static k/v key-value pairs, such as OS,CPU, in minions, usually from salt-minion-escalated information pillar: We can define some custom parameters to be referenced by the salt SLS file, which is usually defined for minions on Salt-master top.sls This is an environment entry that matches target and specifies a salt state file defined with ". SLS" as a suffix, such as:[[email protected] salt]# cat base/top.sls base: ' Tvm-yum ': - dnsmasq -& NBsp;crontab - web ' * ': - abc - monit - postfix - salt.minion - ssh - vim Configuration Management (state) salt uses the SLS file (salt state file) to describe the status. SLS uses YAML format for data serialization, so it's simple and straightforward, and it's very readable state can be extended using the Jinja template engine Default: Wildcard character (globbing)) * e: Regular expression (regular expression) * l: List * n: grouping (group) * c: Composite Matching The path to the "base" environment must be specified in the portal file File_roots because the Salt state entry file exists in the path: top.sls
Saltstack Foundation Detailed Introduction