- From: "steve ." <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Re: how to make one node tell another to do some work
- Date: Tue, 9 Oct 2012 23:34:24 -0700
Wait ... data bags can only be edited by admin nodes? Is this OSS
Chef or Hosted/Private Chef?
(If the latter, that totally torpedoes an idea I have for
databag-driven database provisioning! :( )
On Tue, Oct 9, 2012 at 4:28 PM, Jesse Campbell
<
>
wrote:
>
That does look useful.
>
>
I may consider moving to that as I get more and more of the old system
>
to "go away".
>
in the mean time, I got my original idea to work, using the "admin"
>
node to push things into the database nodes' attributes as shown
>
below.
>
i've stripped it out, but there are checks to make sure the various
>
levels of the array exist.
>
yes... this might be a messy way to do it, but it gets the job done
>
without adding any new external dependencies to an already
>
far-too-complex project.
>
>
maybe it will make it easier for someone else to understand once I
>
move on (i've already started my search, and OMG there are a lot of
>
people happy to get in touch when they see both development and ops
>
experience *AND* chef. never thought a single specialized tool would
>
be the ticket to an interview, but chef seems to be it!
>
>
parsed_json["migrations"].each do |site_id, migration_info|
>
search(:node, "fqdn:#{migration_info["source_db"]}") do |src_node|
>
src_node.set["sam"]["db_migrations"]["source"].push site_id
>
src_node.save
>
end
>
search(:node, "fqdn:#{migration_info["dest_db"]}") do |dest_node|
>
dest_node.set["sam"]["db_migrations"]["dest"].push site_id
>
dest_node.save
>
end
>
end
>
>
On Fri, Sep 28, 2012 at 5:33 PM, Andrea Campi
>
<
>
>
wrote:
>
> Jesse,
>
>
>
> after your clarification, I guess it makes sense that you want to use Chef.
>
>
>
> However the stock data structures in Chef don't lend themselves too
>
> well to this kind of scenarios.
>
> So why not move this information outside of Chef?
>
>
>
> I've been using this: https://gist.github.com/3802182
>
> My recipe can then traverse the returned JSON for a list of "jobs" to
>
> run, e.g. apps to upgrades and so on.
>
>
>
> If this sounds useful, I could just publish the cookbook.
>
>
>
> Andrea
Archive powered by MHonArc 2.6.16.