On Sunday, May 3, 2015 at 5:24:28 PM UTC-4, Fernando FFR wrote: > Hi Guys, > > I would like to use Jenkins to execute puppet agent on remote nodes. > Does someone know how I could do that? >
Our puppet masters are Jenkins slaves and we use Ansible to trigger puppet agent runs across all the clients. We have an Ansible custom inventory script that builds the inventory from PuppetDB. Roughly, we do something like this w/Ansible: * Disable puppet agent across all nodes, shut down the daemon, and then reenable the puppet-agent * Check out Hiera/Puppetfile repo * Run r10k to get new module updates * Run puppet agent -t on nodes in a specific order, due to known node interdependencies * Pull back puppet log files * Continue until error is found, or all nodes are updated. Running puppet on each node starts the agent back up, letting it go back to normal 30 minute runs. As far as the node ordering, this is things like putting load balancer changes in first, doing monitoring changes last. We're also using MySQL w/Galera for multi-master replication, so this takes care of basic things like ensuring cluster health is good before and after running puppet agent. The orchestration aspect is useful for us here because of things like not wanting to restart MySQL on all nodes in the cluster at the same time, and it allows us to check to make sure a restarted MySQL instance has rejoined the cluster before moving on to the next DB node. There is not really anything magic about using Ansible here, you could use Fabric or Capistrano if you preferred. We've explicitly made the decision *not* to use Ansible for any configuration management, and to only use it for coordination/orchestration. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8be8c4a8-b952-4661-abce-fe0ccf752bb6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.