selection of 6-puppet updating mode for puppet basic articles
0 Basic Learning Puppet Automated Configuration Management Series documents
Puppet update mode based on C/s architecture generally has two kinds, one is the agent end set synchronization time active to puppetmaster end pull configuration, the other is through the puppetmaster end of the use of puppet Kick command or the use of Mcollctive trigger update configuration, two ways to adapt to different production environments, each with characteristics.
First, active update
Active update is the process by which the node runs the puppet daemon and then automatically interacts with puppetmaster until the update is complete.
This update method is not easy to control, mainly in the following aspects:
Advantages:
Nodes are regularly active updates, regardless of who will be the node is puppet management configuration changes, will be automatically repaired within the specified time, without administrator login to view.
The environment constructs simple, does not need very complex structure, puppet itself C/s structure can complete.
...
Disadvantages:
When the number of nodes is too large, an update request is initiated to the puppetmaster side, which can cause puppetmaster performance bottlenecks. Of course, there are some solutions, such as setting the task schedule, and the node is updated in batches.
Because nodes are updated periodically to the puppetmaster-side extraction configuration, this requires that the puppetmaster-side environment be sufficiently secure. Otherwise, anyone up to modify the puppet template will cause node synchronization update, if someone wrote the executable resources "RM-RF/", that loss is big.
You cannot manually control those servers that need to be updated and those that do not need to be updated.
...
Automatic Update mode configuration is very simple, only need to add Runinterval field in the node profile puppet.conf to implement automatic Update, the following steps to simply test
Note: By default, there are no runinterval fields in the puppet.conf configuration file, and if not configured, the default is to automatically sync every 30 minutes.
1. Add Runinterval Field
For ease of testing, it can be set to 10 seconds
1 2 3 4 5 6 7 8 9 10 11 |
[Root@agent1 ~]# vim/etc/puppet/puppet.conf [main] LogDir =/Var/log/puppet Rundir =/Var/run/puppet S Sldir = $ var dir/ssl [agent] Classfile = $ var dir/classes.txt localconfig = $ var |