3 ms·
I have no real experience with configuration management, but I'm confused why the programming language matters? It seems to me like people complaining about Ma
by snprbob86 15y ago
I have no real experience with configuration management, but I'm confused why the programming language matters?
It seems to me like people complaining about Make being a poor programming language.... IT'S NOT FOR PROGRAMMING! It's for build sequencing. Every single program on your computer is a command-line-invocation away. Let Make handle incrementally executing external scripts based on timestamps, and let real programming languages do what they do best.
Isn't the point of Puppet to have an idempotent declarative language. And can't it execute arbitrary programs?
- moe 15y agoIsn't the point of Puppet to have an idempotent declarative language. And can't it execute arbitrary programs? Yes and no. The main argument against puppet's dedicated DSL is that it's dedicated. I.e. you'll spend a lot of time learning a complex language for the sole purpose of running puppet. You cannot transfer that knowledge to anything else and unless managing puppet is your only job you'll frequently have to re-read the documentation to recall the more exotic idiosyncrasies. It's a love/hate-thing really. In puppet you can express many things much more cleanly and elegantly than in chef. Other things you can't express at all or require you to resort to terrible hacks. In chef-cookbooks you rarely need to resort to hacks. But at the cost of the chef-infrastructure itself being a pretty terrible hack...
- snprbob86 15y agoCuriosity, not to be argumentative: What are some examples of things are really elegant to express in Puppet? What are some examples of things that you had to resort to terrible hacks for? Please use personal, concrete examples, if you don't mind. I've only got a couple of boxes to manage, but reading through the docs for the big three configuration management systems, I really was confused about the need for most of the stuff in the tutorials. I'd also be interested in concrete examples of where shell-scripts fail so badly.
- moe 15y agoWell, it's of course all subjective, but I can present my perception of both (elegance vs hack) in a single pastie: http://pastie.org/2668110 http://pastie.org/2668110 This will assemble a hosts-file that contains all hosts from $group, on the hosts that include the class. It's awesome and terrible at the same time because it demonstrates an Exported Resource (@@host, Host <<| |>>, awesome) and at the same time it shows how we had to resort to extdata for grouping (extlookup = terrible) and how opaque the puppet DSL is to the uninitiated.
- snprbob86 15y agoI have no idea how to begin to read that... How is this better than something like this: gen-hosts config-file > /etc/hosts ? See this gist I just made: https://gist.github.com/1274379 https://gist.github.com/1274379 That script is (1) more understandable to a programmer, (2) unambiguous with respect to output, (3) idempotent, (4) super extensible. I suspect your Puppet script is doing some other stuff, but I can't begin to mentally parse it... EDIT: Just wanted to point out that I didn't try to make that script either correct or identical to your script. Just wanted to give an impression of the flow of things.
- moe 15y agoWell, scripts like yours go a long a way. The problem is that at some point you'll want more integration and at that point you can either go with puppet/chef - or you'll end up re-inventing them.
- snprbob86 15y agoMore integration with what? What would I be reinventing? Again, I'm genuinely ignorant in this department. Really curious what I'm not understanding, but I just get the feeling that "worse is better" here.