- From: Thom May <
>
- To:
- Subject: [chef] Re: read-only access to data in the chef-repository
- Date: Sun, 6 Nov 2011 12:23:37 +0000
there's danryan's spice gem:
https://github.com/danryan/spice
which i've used to pull stuff out of databags.
On Fri, Nov 4, 2011 at 15:22, Bryan Berry
<
>
wrote:
>
Dear Chefs,
>
I have a question about how to programmatically get read access to the data
>
in the chef-repository
>
We are a java-heavy shop, which mean than configuration gets baked into
>
software in two places, on our jenkins CI server during the .war build
>
process and on the target node as well.
>
I intend to store all the application configuration details in Chef
>
databags, details like:
>
target database server:
>
database auth credentials
>
clustering info
>
http port
>
https port
>
other ports
>
I intend to create maven target that grabs such information from the chef
>
server
>
I found that I can get read-only access from any server that is a
>
chef-client
>
$ knife search jboss_apps "type:production" -c /etc/chef/client.rb -F json
>
I had to add one value to client.rb to get the above to work
>
node_name 'foo.example.com'
>
I would love to know how to do this with pure ruby. Any ideas?
>
I need to query the chef-server, grab a bunch of values, then throw them
>
into jboss-foo.xml.erb template and compile that template. If you fellow
>
Chefs see any issues w/ this approach, pls let me know :)
Archive powered by MHonArc 2.6.16.