TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Puppet or Chef?

94 pointsby ichiltonover 12 years ago

24 comments

themgtover 12 years ago
We started off writing the bulk of our server setup/deployment automation in chef, and have since completely abandoned it<p>The core problems we had with chef were:<p>• worse than ruby: the chef ruby DSL is like some bastardized, crippled ruby - e.g. ruby_block{}, just uggh<p>• way too slow &#38; resource intensive: chef itself uses a lot of memory and CPU, has a slow boot time, and does stuff like execute apt for each desired package on each node on each run. this might work fine if you're running on beefy physical/virtual hardware, but not for managing hundreds/thousands of tiny LXC containers that need to be scaled on-demand in seconds<p>• not self-hosted: chef seemed to have real difficulty closing the loop and being the thing that deployed and configured itself. there's guides online for scripting yourself up to a basic chef setup, but what if you want your chef client to bootstrap with some custom rubygems? back to bash scripting - and then how does that script get on each of your nodes? chef isn't intended to build/deploy itself the way it does the rest of your stuff<p>We've now transitioned everything to heroku buildpacks + a build server, which create self-contained "slugs" and therefore <i>are</i> self-hosting (i.e. the build server can build itself), and allows us to have a single build/deploy process for everything<p><a href="https://devcenter.heroku.com/articles/buildpacks" rel="nofollow">https://devcenter.heroku.com/articles/buildpacks</a>
评论 #4718419 未加载
评论 #4717236 未加载
评论 #4718361 未加载
评论 #4717981 未加载
评论 #4724519 未加载
评论 #4717316 未加载
Hontanoover 12 years ago
I never got on well with either. Puppet was mind-bogglingly slow (even locally without a master), both Chef and Puppet felt overwrought, and I prefer keeping dependencies to a minimum.<p>Just a pointer for anyone else that doesn't have much love for either: I found myself happy and productive with Salt. Fast, simple, and lets me do what I needed with less Byzantine setup: <a href="http://docs.saltstack.org/en/latest/" rel="nofollow">http://docs.saltstack.org/en/latest/</a><p>There's also Salty Vagrant and Salt Cloud for local and remote provisioning.
评论 #4717191 未加载
评论 #4717024 未加载
评论 #4721424 未加载
jacques_chesterover 12 years ago
I recently had occasion to look at Cfengine, Chef and Puppet.<p>I chose Puppet.<p><a href="http://chester.id.au/2012/06/27/a-not-sobrief-aside-on-reigning-in-chaos/" rel="nofollow">http://chester.id.au/2012/06/27/a-not-sobrief-aside-on-reign...</a> (scroll down if you don't enjoy my windbaggery).<p>The short version is: Puppet best fits the way I think about how such systems should work. Despite ostensibly belonging to the same genre of system, the three of them have subtle but very important differences.
评论 #4717788 未加载
评论 #4719545 未加载
VLMover 12 years ago
Been puppet'ing for years across maybe a hundred machines. Looks like almost everything Phil initially wrote about puppet got edited afterwards.<p>There is a third and fourth solution to the "Encrypted data bags for puppet" problem. The third, my solution, is to never, ever, store AAA in configuration system. EVER! I do store calls to programs and such or even just data files as a program. I admit sometimes the "program" to get certain passwords is something like "backtick cat somefile backtick" but usually I do better. Those AAA programs/repos are handled much more delicately and securely than a "everything goes" config system that everyone can mess with.<p>The fourth solution is the implied idea that you'd never rotate AAA credentials on a regular basis and never change infrastructure passwords when someone quits, which sounds pretty funny to me. Hey HN, my mysql root password for a month back in 1998 was: (insert something like line noise here)<p>Another old time puppeteer observation is everyone has a SSL nightmare eventually and even the mighty GOOG can't help you sometimes. Especially on restoral of backups, or replication of live systems, it can get pretty hairy. Also DNS malfunctions can horribly confuse puppet's SSL occasionally. This is something you'll only hear from an old puppeteer not a short experiment like the article.
smoyerover 12 years ago
I tried both and decided the answer was neither - I'd recommend giving Ansible serious consideration. (<a href="https://github.com/ansible/ansible" rel="nofollow">https://github.com/ansible/ansible</a>)
评论 #4717425 未加载
评论 #4716980 未加载
评论 #4717066 未加载
swalbergover 12 years ago
Last week I interviewed the product manager of Puppet [0] and asked him to differentiate Puppet from Chef and cfengine. He didn't fall for it, and just said something like "the most important part is that you do something."<p>I've used both (and cfengine) to varying degrees and would have to agree. Simply using a configuration management tool takes an incredible amount of work off your shoulders, you can't go wrong with either.<p>0 - <a href="http://linuxadminshow.com/2012/10/28/episode-4-puppet/" rel="nofollow">http://linuxadminshow.com/2012/10/28/episode-4-puppet/</a><p>(edit - I said I interviewed the Chef guy, I meant Puppet)
emillonover 12 years ago
I have the feeling that choosing a configuration management system is very similar to choosing a build system. There are a few big players where it's easy to do easy things and possible to do complex things, but hacking with them is very arcane (like GNU make). There seem to be quite a lot of documentation and contributed packages for both Puppet and chef, for example.<p>But, instead of trying to fix what is broken, it seems that a lot of people end up reinventing the wheel and writing their own "lightweight" configuration management system.<p>As someone that wants to switch to such a system, I believe that it will be easier to learn puppet since the existing code base is just enormous.
CoffeeDregsover 12 years ago
Why not add: or Fabric or Ansible or something else? I haven't found much that Fabric won't do for me and I haven't found much reason to install Ruby on my system [Python is a system package].<p>For a non-Puppet and non-Chef user, would someone explain why you'd limit your choices to puppet and chef?
评论 #4717857 未加载
评论 #4718443 未加载
评论 #4717839 未加载
cdavidover 12 years ago
I have started using chef to automate build environments on top of vagrant. One thing that made me choose chef is windows support: chef uses winrm on windows, + things like powershell, and that seems to work better than puppet (e.g. I could not for the life of god make a unattended install of visual studio with puppet).<p>On the - sides, I don't find it particularly well documented (it feels like reading the MSDN, where things are self-referentials), and it is quite slow.
cmerover 12 years ago
For those looking for a dead simple alternative to Chef or Puppet, I wrote Shoestrap. It's a pure Bash, no-BS set of scripts. Doesn't have all the bells and whistles of Chef, but it might be enough for your needs.<p><a href="https://github.com/cmer/shoestrap" rel="nofollow">https://github.com/cmer/shoestrap</a><p><a href="https://github.com/cmer/shoestrap-example" rel="nofollow">https://github.com/cmer/shoestrap-example</a>
评论 #4719251 未加载
powatomover 12 years ago
I've tried both Puppet and Chef. Puppet fits my mental model more, but I had for more success with actually getting Chef up and running.<p>Puppet, on the surface, has less 'messing about' to do in order to get things running - but my experience was that I encountered a few issues which basically caused me to spend way too much time mucking about rather than working.<p>Ideally I would like to use Puppet, I feel like it's cleaner and it seems more 'logical' to me at least - but I only have actual experience of Chef working, so make of that what you will!<p>Once Chef is up and running, it absolutely <i>flies</i>, which is always good!
m0shenover 12 years ago
There is also cdist (<a href="http://www.nico.schottelius.org/software/cdist/" rel="nofollow">http://www.nico.schottelius.org/software/cdist/</a>).<p>Some highlights:<p>• Python based<p>• Uses SSH key-based auth<p>• No central server required<p>• Only requires SSH and a Posix shell on the client
Tombarover 12 years ago
We tried both and finally end using puppet.<p>In our experience puppet is easier to setup and start, chef server stack is HUGE compared to just installing a package for puppet master and certs/knife setup is a PITA.<p>The DSL is pretty similar except for how they track dependencies and general workflow, where chef is `procedural`, puppet internally builds a call graph based on a declarative syntax which can be hard to track down and understand in some situations.<p>Regarding cookbooks vs manifests, both have tons of modules around, but like with any plugins/modules software the basic stuff in general is cover, but you will need to get your's hand dirty to get things to work your way and not all manifest/cookbooks are good to use at all..<p>We don't found compilation and install time to be an issue for us, a complete lamp stack install fully customized takes less than 2 minutes per node.<p>We have a linux background and didn't find ruby hard at all to hack and mess around to solve some of our issues like custom facters and install some rare stuff like nsis :)
bryanwbover 12 years ago
I have used both extensively. I found Puppet much easier to get started with but the custom Puppet DSL becomes very quickly constraining. I know that a new pure Ruby DSL is in the works. I found that Chef has a steeper learning curve but many times greater productivity. I do feel that their is much better tooling support for Chef than Puppet, in large part because Chef's pure Ruby approach is much friendlier to Ruby developers. It remains to be seen whether Puppet's coming Ruby DSL will have the same level of functionality.<p>If you are managing a small application, Chef may feel heavyweight. However, imho, if you can't manage Service-Oriented Architecture w/out a serious configuration management system, be it Chef or Puppet. There are just too many moving parts.
评论 #4718046 未加载
mgarfiasover 12 years ago
I pretty much hate puppet after 4 years of dealing with it. Scaling problems, having to run another bunch of crap to store configs, in an app that was designed to store configs.<p>I'm getting all riled up just remembering the hell.<p>Next time I get to pick, I'll use salt.
评论 #4719862 未加载
jtopperover 12 years ago
The answer to this question is always "yes".
gyepiover 12 years ago
Over the years, I've also used cfengine and a host of other systems and have decided that simplicity and the ability to customize a system to fit your needs are key. Turns out it's quite easy to roll your own, given the right tools. I now use:<p>gsl <a href="https://github.com/imatix/gsl" rel="nofollow">https://github.com/imatix/gsl</a> and synctool <a href="https://github.com/walterdejong/synctool" rel="nofollow">https://github.com/walterdejong/synctool</a><p>The former is used to generate configurations for various classes of systems and the latter pushes them out over ssh. Works very well.
bwbover 12 years ago
We are currently building out Chef to handle change management for 3000+ servers :), loving it so far but we are also a RoR house too.<p>Know of another big hosting company using Puppet and they love it, for about 10k+ servers.
Corradoover 12 years ago
The reason I chose Puppet was that it allows my servers to pull their configuration instead of my pushing it to them. This is important because my servers are all remote and behind firewalls that I don't control. Using Puppet, my servers can make an outbound connection to the Puppet Master without having to mess with firewall ingress rules.<p>Things like Salt or Fabric require direct access to the target servers and won't work in my situation. I'm not sure about how Chef works as it wasn't available (popular) when I was setting this up several years ago.
评论 #4719848 未加载
krosaenover 12 years ago
I like the topic, but have to say the article wasn't that great - the author didn't seem to have experience with puppet and had to be corrected in the comments section heavily.<p>While on the topic of devops, worth checking out:<p><a href="http://palletops.com" rel="nofollow">http://palletops.com</a><p><a href="http://linkedin.github.com/glu/docs/latest/html/index.html" rel="nofollow">http://linkedin.github.com/glu/docs/latest/html/index.html</a>
AnthonyJosephover 12 years ago
I am a fan of chef, we use it at cloudpokerdb.com for all of our configuration management. The Ruby Scripts vs Config Files rings true (at least it did when I first compared the two a while back). Im sure you can do it with puppet, but chef allows us to auto-deploy and setup any type of server environment (using openstack) one could need, via a couple recipes, and databags.
atsaloliover 12 years ago
You might want to also take a look at CFEngine, which inspired Puppet and Chef.<p>See "Relative Origins of Puppet, Chef and CFEngine" <a href="http://verticalsysadmin.com/blog/uncategorized/relative-origins-of-cfengine-chef-and-puppet" rel="nofollow">http://verticalsysadmin.com/blog/uncategorized/relative-orig...</a>
rahoulbover 12 years ago
It's not really something I know much about, but I recently went to a talk where the guy said the ultimate difference between Puppet and Chef is Chef is ruby scripts, but Puppet is a config file - which means that Puppet can guarantee that its actions are idempotent.
jchonphoenixover 12 years ago
My first reaction to this was "Puppet must either have horrible documentation or be difficult to pick up."<p>I mainly gleaned this from him correcting himself about puppet all the time and took this to mean he had a harder time picking up puppet.