Chef-solo or Chef-client for local development testing

102 views
Skip to first unread message

Jay Perry

unread,
Apr 12, 2012, 8:47:40 AM4/12/12
to chef-t...@googlegroups.com
I wanted to get folks opinions on what is better to use for local infrastructure development chef-solo or chef-client?  


I'm thinking it is nice to be able to have a fully isolated environment using chef-solo locally with say a Vagrant box or any other vm offering of your choice.  The reason I say this is if you had all your developers using the same production chef-server and same environment that there is a chance that you could all stomp on each others toes.  I know you can freeze the version but now I have to keep maintaining my version list locally which I feel could be a maintenance nightmare if you have a lot of cookbooks.  My thought is you would use chef-solo for local development and then after you commit your changes it goes to a continuous integration environment where chef-client is used.  In the continuous integration environment it could use environment=development and that environment could specify what version to use.  After it has successfully been tested in the continuous integration environment the production environment file then gets a bump to use the new version that was just tested.  Anyone see any holes in this process or have any suggestions for a better approach?  If you think chef-client would be a better choice for local dev can you offer up some ideas on how it would work with multiple users?

Looking forward to your responses.

Thanks,
Jay 

Jim Hopp

unread,
Apr 12, 2012, 11:31:03 AM4/12/12
to chef-t...@googlegroups.com
We develop and test with chef-client because a) that's what we run in staging and production and b) we make use of data bags and search.

Developers use vagrant to stand up a chef-server and a chef-client; we also use vagrant to stand up a chef-server and client for our continuous integration framework. Works great!

Because we have distinct chef servers, we haven't made use of environments.

-Jim

jtimberman

unread,
Apr 15, 2012, 2:01:54 PM4/15/12
to chef-t...@googlegroups.com
The thing about Chef to remember is that idempotent management of resources in recipes is only part of the story. That is, Chef Solo is great for the recipe execution engine, but you lose a lot of benefit in having the Chef Server.

The system integration aspects, where search discovery and describing the infrastructure as data[0]  come into play, using chef-client will give you more consistent results than using chef-solo in non-production environments.

This is one reason why the environments feature of the Chef server was written and implemented the way it was.

[0]: e.g., data bags, but to a different extent node attributes

Robert J Berger

unread,
Apr 16, 2012, 12:05:45 AM4/16/12
to chef-t...@googlegroups.com
Yeah, we really take advantage of search and databags in chef-server. It lets us handle the interactions / interdependencies between nodes in a way that would be much more difficult with chef-solo.


__________________
Robert J Berger - CTO
Runa Inc.

--
You received this message because you are subscribed to the Google Groups "chef-testing" group.
To view this discussion on the web visit https://groups.google.com/d/msg/chef-testing/-/6fbLy3qcDy0J.
To post to this group, send email to chef-t...@googlegroups.com.
To unsubscribe from this group, send email to chef-testing...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/chef-testing?hl=en.

Reply all
Reply to author
Forward
0 new messages