First, what kind of situation requires batch deployment
1, the operating system installation
The Common collber,red hat satelite (Redhat) system is dedicated.
2, the operating system configuration
It is common to have cfengine,puppet,chef,func. One of the most popular puppet
3, the deployment of bulk programs
4. Run the batch command to view status information
Ii. introduction of Ansible
The architecture of the ansible is roughly as follows
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7E/EF/wKiom1cNHvbQi9C5AABpqTFIsoM324.png "title=" 8886857_1410870083weob.png "alt=" Wkiom1cnhvbqi9c5aabpqtfisom324.png "/> Ansible is the new operations tool is based on the development of Python, combining the advantages of many old operations tools to achieve the bulk operating system configuration, batch program deployment, batch run commands and other functions.
Common operating modes for OPS tools
1, Agent mode: based on SSL implementation. The agent works on the monitored side. Like puppet.
2, agentless mode: Based on the SSH service implementation work on the monitored side. The monitoring side is the client of SSH.
Ansible is working in agentless mode with idempotent. Ansible on the control side only need to tell the monitoring side of the desired state can be implemented in bulk deployment. noun explanation
Idempotent does not repeatedly execute the same instruction. For example, you will not install software repeatedly
Desired state only needs to tell the desired state of the monitored side.
Ansible is the ability to work with modules based on the ansible itself without bulk deployment. What really has a bulk deployment is the module ansible that ansible runs just to provide a framework. Architecture includes
The connection plug-in connection plugins is responsible for communicating with the monitored side.
Host Inventory: Hosts that specify operations, which are the hosts that define the monitoring within a configuration file
Various module Core Module command Module custom module
Use the plugin to complete log mail and other functions
Playbooks: When a script performs multiple tasks. It is not necessary to have nodes run multiple tasks at once
Third, the basic use of ansible
Install the software yum install ansible-y # corresponding software can be manually compiled in the Epel warehouse
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7E/EC/wKioL1cNIFKAVw01AAA1PhcMadI893.png "title=" 8886857_1410870085cvkv.png "alt=" Wkiol1cnifkavw01aaa1phcmadi893.png "/>
This article is from the "CENTOS6 Learning" blog, please make sure to keep this source http://wskfnso.blog.51cto.com/4025557/1763239
The ansible of automatic operation and maintenance tools