chef integration?

198 views
Skip to first unread message

Chris Burroughs

unread,
Apr 16, 2013, 8:18:09 AM4/16/13
to colli...@googlegroups.com
I know there are docs on using collins as a Puppet fact terminus [1],
but we use the *other* popular ruby based configuration management tool.
We have explored two options so far with some help from folks in #chef:
* Just call out to the collins api using the collins-client ruby
library inside select cookbooks
* Write an ohai plugin that dumps everything from collins into ohai.

The first one seemed easy to write but doesn't feel awesome. (Call this
function to get a value instead of attributes magically appearing.)
The ohai plugin route would (I think) get the magic "attributes just
show up" workflow. But it didn't seem right to duplicate all the data in
one system-of-record into another.

[1] http://tumblr.github.io/collins/recipes.html#terminus

Chris Burroughs

unread,
May 3, 2013, 2:30:36 PM5/3/13
to colli...@googlegroups.com
On 04/16/2013 08:18 AM, Chris Burroughs wrote:
> I know there are docs on using collins as a Puppet fact terminus [1],
> but we use the *other* popular ruby based configuration management tool.
> We have explored two options so far with some help from folks in #chef:
> * Just call out to the collins api using the collins-client ruby
> library inside select cookbooks
> * Write an ohai plugin that dumps everything from collins into ohai.

We are currently prototyping the ohai plugin approach. On each run a
node will fetch it's own information from collins (still working out the
exact chicken and egg solution there) and add it to ohai. Getting at
the data later in recipes is as simple as node['collins']['status'].

I'm excited collins to further publicise collins status as the source of
truth with an /etc/motd template:

collins-status: <%= @collins_status -%> <% if @collins_status !=
'Allocated' and @collins_status != 'Unknown' %>***THIS NODE SHOULD NOT
RECEIVE PRODUCTION TRAFFIC***<% end -%>

I'd be interested to know if anyone has tried a different integration
approach.

Blake Matheny

unread,
May 3, 2013, 6:20:47 PM5/3/13
to colli...@googlegroups.com
I'm sure you've seen this (http://tumblr.github.io/collins/recipes.html#terminus) before but this is the actual puppet node terminus code we used at Tumblr for tying puppet into collins. One thing that is nice about this integration is that from a puppet manifest you can just do like $collins['attrib'] (as a ruby hash) and you get access to that attribute. I'm not familiar with ohai but we had a very early (pre terminus) integration that would pull down attributes as you're describing. This was problematic for a few data consistency related reasons. The approach we ended up with is nice because every puppet run reflects collins attributes at that exact moment, there is no delay in propagation of data.

Not sure if that makes sense :)


--
Blake Matheny
@bmatheny



--
You received this message because you are subscribed to the Google Groups "Collins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to collins-sm+...@googlegroups.com.
To post to this group, send email to colli...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages