info: Caching catalog for agent1_cert.kisspuppet.com
info: Applying configuration version '1394359075'
notice: Finished catalog run in 0.21 seconds
info: Caching catalog for agent1_cert.kisspuppet.com
info: Applying configuration version '1394359075'
notice: Finished catalog run in 0.20 seconds
info: Caching catalog for agent1_cert.kisspuppet.com
info: Applying configuration version '1394359075'
notice: Finished catalog run in 0.20 seconds
info: Caching catalog for agent1_cert.kisspuppet.com
info: Applying configuration version '1394359075'
notice: Finished catalog run in 0.21 seconds
info: Caching catalog for agent1_cert.kisspuppet.com
info: Applying configuration version '1394359075'
notice: Finished catalog run in 0.21 seconds 二、推送更新
推送更新就是通过puppet kick或者mcollective来控制节点什么时候向puppetmaster端获取配置变更信息。这种方式比较容易控制,主要表现在以下几个方面: 优点:
非常容易控制节点的更新周期
安全性比较高,每次更新之前可先检查好代码后再更新
可以针对某一个cluster(一组服务器)进行推送更新,灵活性很强。
扩展性很强,可整合各种其他平台
… 缺点:
环境搭建比较复杂,需要部署N多东西
agent端配置被篡改后,需要手动触发才能够恢复,不能够及时恢复
… 1、puppet kick方式
puppet kick是是通过puppetmaster端的命令触发的方式进行更新的,由于其锁的问题很难解决外加上主机单元控制不是很灵活,逐渐被抛弃了,puppetlabs也看到了这一点,因此收购了mcollecitve。当然,这种方式在很多企业中还在用,这里给几个大家方式参考:
http://purplegrape.blog.51cto.com/1330104/1179358
http://dreamfire.blog.51cto.com/418026/1279878 2、mcollective触发方式
需要搭建mcollective+MQ架构,搭建好了之后通过mco命令将puppet命令传输至MQ分配到一组节点上去,关于mcollective+MQ架构搭建会在第三部分详细讲解,也可以参考之前写的一篇文章 http://kisspuppet.com/2013/11/10/mcollective-middleware/
[root@webui ~]# mco puppet -v runonce
Discovering hosts using the mc method for 2 second(s) .... 3
* [ ============================================================> ] 3 / 3
node3.rsyslog.org : OK
{:summary=> "Started a background Puppet run using the 'puppet agent --onetime --daemonize --color=false --splay --splaylimit 30' command"}
node2.rsyslog.org : OK
{:summary=> "Started a background Puppet run using the 'puppet agent --onetime --daemonize --color=false --splay --splaylimit 30' command"}
node1.rsyslog.org : OK
{:summary=> "Started a background Puppet run using the 'puppet agent --onetime --daemonize --color=false --splay --splaylimit 30' command"}