Simplest Enterprise Continuous Integration Solutions

Saturday, September 8, 2012

Puppet Deployment: puppet kick in Puppet 2.7

Puppet master/agent deployment approach is a pull-based mode (be default) fetching the master node controlled catalog to target agent nodes and apply to target agent nodes periodically (30 minuts, by default).

Puppet 2.7 Out-Of-Box puppet kick (Remotely control puppet agent) needs puppet agent on the target node to be running as a daemon, be configured to listen for incoming network connection, and have an appropriate security configuration.

In order to have a Puppet master/agent deployment infrastructure with a push-based mode and deploy the master nodes controlled catalog into target agent nodes on demand.

Here is my puppet kick configuration example to achieve a Puppet master/agent deployment infrastructure in a push-mode mode:
1. Within a Puppet master/agent deployment infrastrucutre with cert sign (make sure all of puppet nodes sync with Network Time Protocol otherwise there will be some difficulties to do puppet cert sign)
2. On puppet agent nodes, snippets of /etc/puppet/auth.conf and /etc/puppet/puppet.conf
cat /etc/puppet/auth.conf
path /run
method save
auth no
allow <puppet-master-node>
cat /etc/puppet/puppet.conf
...

[agent]
...
   listen = true
   ignorecache = true
...
3. Trigger puppet kick from puppet master catalog to multiple puppet target nodes
puppet kick --host <puppet_agent_node>
Triggering <puppet_agent_node>
Getting status
status is success
<puppet_agent_node> finished with exit code 0
Finished

No comments:

Post a Comment