[chef] Re: Re: Re: Double converge, blocking on search, event-driven chef-client?


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Cc: Justin Dossey < >
  • Subject: [chef] Re: Re: Re: Double converge, blocking on search, event-driven chef-client?
  • Date: Thu, 02 Oct 2014 10:39:49 -0700

On Thu Oct 2 09:52:34 2014, Justin Dossey wrote:
4. (paraphrased) Use push jobs to notify nodes when the
infrastructure is ready for them to converge. The very first
sentence on the Chef Push Jobs page is "Chef push jobs is an
extension of the Chef server that allows jobs to be run against
nodes independently of a chef-client run." We are talking about
triggering individual resources within a cookbook within a
chef-client run, so push jobs don't really address this issue at
all. Also, it would appear that push jobs were meant to be
triggered by administrators and not by the chef-client. While I'm
sure it would be possible to set things up in such a way that a
successful initial converge could trigger a push job, such an
implementation diverges considerably from the role of push jobs as
designed.
Triggering a single individual resource is not a pattern we're likely to ever support[*]. We have support for override run lists which you can use to do a software deployment or configure nagios or whatever and not have to go through and create all your home directories for your admins and reapply all your sysctl configuration and ssh_known_hosts entries and orthogonal stuff you don't care about. Aside from whatever the docs might state, that is certainly a use case for push jobs. I also don't know where the idea was that its only supposed to be kicked off by an administrator is coming from, since it is designed to be an orchaestration agent. Based on the design you should be able to have edge clients (webserver and whatnot) send a push jobs notification that amount to announcing that they've newly been built, this could then be used to kick off chef-client override runlists on nagios host to have them hit search and add the new host to monitoring. I'm not certain how polished push jobs is for all of that right now, but its definitely the tool you want for the use case you describe.

[*] you could extract the resource you want to signal and put it in its own stand-alone recipe (which you could include_recipe from the run_list you normally use) and then only trigger that one-resource-recipe, so I guess we do support that if you do the work to extract it... it won't work like a magic cross-server resource notification though.



Archive powered by MHonArc 2.6.16.

§