Many enterprises use cloud services, automated operations tools are getting more and more fire, the installation and use of three automated operations tools
Puppet, Saltstack, ansible personal point of view;
puppet C/S Framework Server puppet master Client Puppet agent process launcher using Ruby process
There is a listening port Master 8140 Agent 8139
The principle Agent client puppet.conf configures the IP address of the master server, Runinterval = 10 (the client sends a request to master every 10 seconds to receive execution), listen = True when both the master and Agent services are started
The agent client automatically sends an authentication to the master server puppet cert list can see the authentication request sent by the agent, after the master side sign (signature), the master side can begin to operate the agent: file sending, directory sending, Service on/Off, schedule task, execute shell script
Puppet cert List-all--//view signed Agent
The master server has three directories under the puppet directory environments manifests modules was empty at first.
Manifests Create a SITE.PP (system default) inside the configuration global variable
Modules create a Web module, the Web module contains three subdirectories files manifests templates is actually the three directories corresponding to puppet
files--distribution of files, directories
manifests--Create a INIT.PP input Remote execution Command associates the command to the SITE.PP.
The client Agent automatically monitors master changes every 10s to make an adjustment
SALTSTATCK c/S frame using Pathon process server is Salt-master client salt-minion
Only the master side turns on the monitoring port, and it is two x 4505/4506
Authentication mechanism and puppet almost Salt-key view authentication key Accepted Keys: the corresponding agent under key can communicate normally
Puppet can realize the function saltstack can achieve
superior to Puppet :
1, you can send instructions directly to the agent
Salt ' * ' cmd.run ' W ' View the load status of all agents salt ' * ' test.ping
2,grains is used to group servers
Grains is a collection of information that is collected at Minion startup, such as the operating system type, network card IP, and so on. Using commands
Salt ' test.com.cn ' grains.ls lists all grains project names
Salt ' test.com.cn ' grains.items lists all grains items and values
Grains information is not dynamic and is not always changed, it is only collected at minion startup.
Grains can do configuration management
For example, unified management of 10 Web servers under each Web server
Vim/etc/salt/grains
Add Role:web
Restart Salt-minion Service
Perform salt-g reole:web cmd.run ' W '---//in master server for separate management of 10 web
Ansible is lighter than the first two
First, he is not the C/S framework does not require the client as long as the installation server can
And the client can be grouped directly in the/etc/ansible/hosts.
Also supports direct execution of commands
Ansible testhosts-m command-a ' W '--//testhosts is the group I created
Comparing the above three kinds of ansible should be considered as the best automation tool
This article is from the "10999243" blog, please be sure to keep this source http://11009243.blog.51cto.com/10999243/1767253
Puppet, Saltstack, ansible personal use of a little comparison