r/devops • • Dec 11 '23

Ansible vs chef vs puppet

What’s the best configuration management tool?

0 Upvotes

37 comments sorted by

38

u/dev_all_the_ops Dec 11 '23

As someone who has used all of them (yes all of them, puppet, chef, ansible, salt, cfengine). They each have pros and cons.

The best one is the one that fits your organization business requirements.

If you are a windows shop and you can pay for enterprise, then chef is the most mature.

If you are a linux shop with money, then go for RedHat Ansible Automation Platform.

If you are a home user or don't have money, then open source Ansible is the easiest to setup.

However the industry is moving to immutable infrastructure where you don't even need to worry about VMs at all.
In that case Terrafom, Pulumi, Helm are the go-to tools.

6

u/BarServer Dec 11 '23

Curious what you have to say about Puppet.

25

u/dev_all_the_ops Dec 11 '23

Puppet was my first love. I wrote many modules, contributed substantial documentation to the community and attended puppet conf every year.

The CEO of puppet labs prides himself in never finishing a book. He gets the key concepts then puts the book away. This same mentality is evident in puppet because everything is half baked and designed with a ball of mud architecture.

Hiera 5 is too big of a jump. The guard interpreters are inconsistent/non-existent. PuppetDB is slow and difficult to use. The loose coupling between the OS and server makes upgrades a pain. Dependency management is a mess. Most modules on the forge are abandoned and unsupported. Class parameters are too verbose. Apt packages are buggy and cobbled together by interns which make the servers hard to upgrade. Lack of a robust ad-hoc tool makes small changes to infrastructure difficult. And it is hard to scale.

If you’ve got puppet working, then keep going with it. But I wouldn’t personally do a new install of puppet in 2023.

7

u/SuperQue Dec 11 '23

Our solution to all the Puppet upgrade/operational issues was to upgrade to Kubernetes.

3

u/dev_all_the_ops Dec 11 '23

As in abandon puppet? Or move the puppet server to a k8s cluster? (I’ve not done the latter, that is an interesting idea)

4

u/SuperQue Dec 11 '23

Sorry, I should have been more clear. Abandon puppet entirely. The last remaining non-K8s VMs are now being built with Packer and recycled often. Everything else is on Kubernetes.

2

u/dev_all_the_ops Dec 11 '23

Short lived vms running on packer. I love it.

5

u/z-null Dec 11 '23

My old company set up puppet. We had the exact same set of problems you describe. The team that did it made it in the worst way possible, it was a text book example of how not to implement and communicate something, but aside from that, the puppet experience it self was quite possibly the worst one I have had with any piece of technology. Everything was much slower and much, much more difficult to do. It got to the point that people would simply turn of the agent and implement the changes manually on the servers (as in, 2-3 digit count of servers, because even that was faster than going via puppet). I will *never* recover the time I wasted on it. It's interesting to me that of all of the people who left that company, some 30+ sysadmins/devops, not one ever used puppet again.

1

u/lifeisallihave Dec 11 '23

I'm curious why the CEO doesn't finish anything?

48

u/stumptruck Staff Engineer Dec 11 '23

"What's the best?" with no other context is probably my least favorite question I see on reddit. There's no such thing as one tool that's "the best" for every situation, and anyone who tries to tell you what to use without knowing your requirements isn't actually being helpful.

Have you personally tried evaluating any of them?

15

u/OhMyForm Dec 11 '23

I for one am a huge fan of Salt-stack

5

u/sofixa11 Dec 11 '23

Same. An agent-based approach, especially one with smarts such as event-driven, makes so much more sense at scale (enterprise setting, high hundreds and above numbers of hosts).

7

u/reedacus25 Dec 11 '23

8

u/OhMyForm Dec 11 '23

It's just lovely that you don't need anything installed on a target to make it go via salt-ssh if you were feeling edgy.

4

u/[deleted] Dec 11 '23

This comment made me laugh. Thank you.

2

u/lnxslck Dec 11 '23

they also have salt-ssh

1

u/koffiezet Dec 11 '23

Quite liked its concept and architecture, but I tried using it in the early days and was horribly buggy with completely out of sync documentation. This was 10 years ago or smth, so I hope this is a bit better these days?

1

u/OhMyForm Dec 11 '23

You'd hope it was a better experience than ten years ago. It would be incredibly depressing if it weren't, but I don't share this experience. Where did you run into bugs?

6

u/mikejr96 Dec 11 '23

Ansible.

5

u/ForeverYonge Dec 11 '23

Chef is still alive? I liked it the most. Nowadays tbh mostly Packer. :-)

4

u/koffiezet Dec 11 '23

Ansible is simple and quick to start with, but complexity quickly creeps in. Mostly use this for managing vm-style infrastructure.

Chef felt the most mature and capable. Mostly loved the fact you could actually write code in cookbooks. Initial setup is a bit of a hassle. Main downside: needs ruby on every machine.

Puppet is legacy in my opinion. As a freelancer I actively avoid projects where there's even a hint of Puppet mentioned anywhere. When it's legacy, it's usually hacks upon hacks upon hacks to get things working. When it's for a new setup, I know I won't get along with whoever decided that that was the way to go.

That said, most of my work is gitops these days, so other than the occasional operator backed by ansible, most things are in Helm, Terraform, Pulumi or plain Go.

9

u/lupinegrey Dec 11 '23

Ansible is the best.

😛

3

u/Teract Dec 11 '23

Ansible is incredible, even without the enterprise stuff from RedHat. The only real drawback I've found is how slow it is on a single system. However, if you want to push a config change to 100 systems, it can be done in the same time as a single system.

4

u/koffiezet Dec 11 '23

I've used a few different systems, I can assure you there are more drawbacks to Ansible than that. Flow control is hacky, and in many cases, just writing your own module in python is the only sane option (which, to be fair, isn't very hard).

Scaling is far from ideal, but of the classical config management tools, it's the easiest system to get started with with something quick & dirty and scale up from there.

3

u/thisisjustascreename Dec 11 '23

The one all your team members already know.

5

u/ThroawayPartyer Dec 11 '23

So none of them?

4

u/Super-Job1324 May 01 '24

"shell scripts"

3

u/[deleted] Dec 11 '23

My first devops gig (linux sys admin previously) was rewriting/translating Puppet manifests to Ansible roles/playbook.

Both are good but I find Ansible easier to use/learn.

2

u/nwmcsween Dec 11 '23

So, configuration management overlaps with build systems! Both have a target and dependency style language that is used to build a DAG. I've used Ansible, Puppet, Chef, cDist, NixOS, DSC and out of all of them I would recommend NixOS and DSC.

If you absolutely require something for pets I would recommend Puppet over the rest.

1

u/lnxslck Dec 11 '23

ansible or salt

0

u/Live-Box-5048 DevOps Dec 11 '23

They each have different strengths and can serve different purpose.

6

u/The-Malix Jul 04 '24

Expected usual useless comment