The previous study Saltstack installation and basic configuration, you can execute system commands through Saltstack, including system reboot, view system load, add/remove users, etc. can also be installed on the line Web,db,bbs and configuration of the same or similar servers into a group, through the Saltstack Group function batch execution management. The following saltstack to achieve bulk installation, uninstall RPM software packages, batch distribution files, compressed packets and push directories to the designated Minion, regularly modify apache/nginx/mysql and other configuration files and implement push to minion.
1. Physical environment
2. Configure Saltstack Master
1 edit/etc/salt/master, remove the comment line below, the directory/srv/salt is saltstack core configuration file directory.
File_roots:
Base
-/srv/salt/
2 View my planned saltstack. SLS and configuration files, the directory structure of the package.
3 Create a new Top.sls file under the/srv/salt directory, which is the Saltstack Portal configuration file. Saltstack "Top.sls" file at the beginning of the general use of base: writing, wildcard ' * ' means that all minion,-conf.pack represent the Pack.sls files in the Conf directory, where I define the RPM package management.
Base
'*':
-Conf.pack
-Conf.nginx
-Conf.apache
-Conf.mysql
-Conf.software
See more highlights of this column: http://www.bianceng.cn/Programming/project/