I. Introduction of Saltstack
Saltstack is a relatively fire automation software, mainly for the C/s architecture. After the master receives the key value of the Minion end and authenticates it, it can release the command to the Minion end and return the result after execution.
Second, the mode of communication
The Salt Bottom network architecture is implemented with ZEROMQ (2014.1 and previous versions, from 2014.7, Salt adds Raet). The master sends the message through The ZMQ pub system, which is the 4505 port, receiving the message through 4506 corresponding to the rep system. So when your command is released, even if it is broken, it will not affect the execution of the Minion end.
Third, installation
Master side:
Yum-y Install Epel-release
Yum-y Insstall Salt-master
Minion End:
Yum-y Install Epel-release
Yum-y Insstall salt-minion
After the configuration file on the Minion side is set with the ID and master, the boot minion,master can see the unacceptable key through the Salt-key command and receive the key value via-A.
Iv. Habits of Use
Configuration files in the/etc/salt directory, the template that is typically used to release commands on the Minion side requires the. SLS end, and is placed by default in the/srv/salt directory. Post the directory structure first:
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/B1/wKioL1h033ORLs5JAAALI-fpJwU777.png "title=" 7[4f] sjpe[l3_%) djo93ofx.png "alt=" Wkiol1h033orls5jaaali-fpjwu777.png "/>
Here, the salt directory of the package, the system is a large directory, such as the Software installation directory, system settings directory.
Here you have to have the Top.sls file, which is the entry file:
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/8C/B1/wKioL1h04FiSQOhyAAAEAAoymvA597.png "style=" float : none; "title=" J{%iwr$}jal@f6awh ' J (@~q.png "alt=" Wkiol1h04fisqohyaaaeaaoymva597.png "/>
Next, you need to have INIT.SLS files in each directory:
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/8C/B1/wKioL1h04Fjj3iZ0AAAE0N-12Jg467.png "style=" float : none; "title="%]%kqx2]l66df16$620~i@8.png "alt=" Wkiol1h04fjj3iz0aaae0n-12jg467.png "/>
Here's the first example of installing HTTPD:
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/8C/B5/wKiom1h04FiBe5vSAAALTsCq1ss125.png "style=" float : none; "title=" _q3394[) ' Z6 ' @G4L1O) ' 1qe.png ' alt= ' wkiom1h04fibe5vsaaaltscq1ss125.png '/>
The next step is to execute the command, on the master side:
Salt-l ' salt-minion ' State.sls package.http
Just wait and there will be a return result:
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/8C/B5/wKiom1h04FnyCtSRAAAfj-zh3mU930.png "style=" float : none; "title=" NY9Y%J51JKBHL@QMYPSFC7N.png "alt=" Wkiom1h04fnyctsraaafj-zh3mu930.png "/>
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/8C/B5/wKiom1h04Fnxu8r5AAAST4-Fjc8588.png "style=" float : none; "Title=" n@a4493u~ @YH6DF3 {) _~0kx.png "alt=" Wkiom1h04fnxu8r5aaast4-fjc8588.png "/>
By using the catalog, the SLS template is managed effectively.
This article is from the "Linux" blog, so be sure to keep this source http://syklinux.blog.51cto.com/9631548/1890863
Saltstack Introduction and use habits