Ask HN: Which configuration management software would/should you use in 2020?
I won&#x27;t talk much about FAANG scale, because that is hyper specialized.<p>A small startup shouldn&#x27;t use any configuration management (assuming configuration management means software like Puppet, Chef, Salt, and Ansible). That is because small startups shouldn&#x27;t be running anything on VMs (or bare metal). There are so many fully managed solutions out there. There is no reason to be running on VM, SSHing to servers, etc. App Engine, Heroku, GKE, Cloud Run, whatever.<p>Once you get to the point where you need to run VMs (or bare metal), there are many options. A lot of systems are going to a more image + container based solution. Think something like Container-Optimized OS[1] or Bottlerocket[2], where most of the file system is read-only, it is updated by swapping images (no package updates), and everything runs in containers.<p>If you are actually interested in config management, I&#x27;ll give my opinions, and a bit of history. I&#x27;ve used all four of the current major config management systems (Puppet, Chef, Salt, and Ansible).<p>Puppet was the first of the bunch, it had its issues, but it was better than previous config managements systems. Twitter was one of the first big tech companies to use Puppet, and AFAIK they still do.<p>Chef was next, it was created by people to did Puppet consulting for a living. It follows a very similar model to Puppet, and solves most of the problems with Puppet, while introducing some problems of its own (mainly complexity in getting started). In my opinion Chef is a clear win over Puppet, and I don&#x27;t think there is a good reason to pick Puppet anymore. One of the biggest advantages is that the config language is an actual programming language (Ruby). All the other systems started with language that was missing things like loops, and they have slowly grafted on programming language features. It is so much nicer to use an actual programming language. Facebook is a huge Chef user.<p>Salt was next. It was created by someone who wanted to run commands on a bunch of servers. It grew into a configuration management system. The underlying architecture of Salt is very nice, it is basically a bunch of nodes communicating over a message bus. Salt has different &quot;renderers&quot;[3], which are the language you write the config in, including ones that use a real programming language (Python). I&#x27;ll back to Salt in a minute.<p>Ansible... it is very popular. This is going to sound harsh, but I&#x27;m just going to say it. I think is it popular with people who don&#x27;t know how to use configuration management systems. You know how the Flask framework started as an April Fool&#x27;s joke[4], where the author created something with what he thought were obviously bad ideas, but people liked some of them. Ansible is so obviously bad, at its core, that I actually went and read the first dozen Git commits to see if there were any signs that is was an April Fool&#x27;s joke.<p>There was a time a few years ago when Ansible&#x27;s website said things like &quot;agentless&quot;, &quot;masterless&quot;, &quot;fast&quot;, &quot;secure&quot;, &quot;just YAML&quot;. They are all a joke.<p>Ansible isn&#x27;t agentless. It has a network agent that you have to install and configure (SSH). Yes, to do it correctly you have to actually configure SSH, a user, keys, etc. It also has a runtime agent that you have to install (Python). You have to install Python, and all the Python dependencies your Ansible code needs. Then it has the actual code of the agent, which it copies to the machine each time it runs, which is stupidly inefficient. It is actually easier to install and configure the agents of all the other config management systems than it is to properly install, configure, and secure Ansible&#x27;s agent(s).<p>Masterless isn&#x27;t a good thing, and a proper Ansible setup wouldn&#x27;t be masterless. The way Ansible is designed is that developers run the Ansible code from their laptops. That means anyone making code changes needs to be able to be able to SSH to every single server in production, with root permissions. And it also risks them running code that hasn&#x27;t been committed to Git or approved. Any reasonable Ansible setup will have a server from which it runs, Tower, a CI system, etc.<p>Fast. Ha! I benchmarked it against Salt, wrote the same code in both, that managed the exact some things. Using local execution so Ansible wouldn&#x27;t have an SSH disadvantage. Ansible was 9 times slower for a run with no changes (which is important because 99.9% of runs have no or few changes). It is even slower in real life. Why is it so slow? Well, SSH is part of it. SSH is wonderful, but it isn&#x27;t a high performance RPC system. But an even bigger part of the slowness is the insane code execution. You&#x27;d think that when you use the `package` or `apt` modules to ensure a package is installed, that it would internally call some `package.installed` function&#x2F;method. And that the arguments you pass are passed to the function. That is what all the other configuration management systems do. But not Ansible. No, it execs a script, passing the arguments as args to the script. That means every time you want to ensure a package is still installed (it is, you just want to make sure it is), Ansible execs a whole new Python VM to run the &quot;function&quot;. It is incredibly inefficient.<p>Secure. Having a network that allows anyone to SSH to any machine in production and get root isn&#x27;t the first step I&#x27;d take in making servers secure.<p>It isn&#x27;t just YAML. It is a programming language that happens to sort of look like YAML. It has its own loop and variable syntax, <i>in YAML</i>. Then it has Jinja templating on top of that. &quot;Just YAML&quot; isn&#x27;t a feature. To do config management correctly you need actual programming language features, so use an actual programming language.<p>If I had to pick one again, I&#x27;d pick Salt. Specifically I&#x27;d use Salt with PyObjects[5] and PillarStack[6].<p>But I&#x27;ll reiterate, you shouldn&#x27;t start with a config management system. Start with something fully managed. Once you need a config management system, take the time to do it correctly. Like it should be a six week project, not a thing you do in an hour. Chef and Salt will take more time to get started, but if setup correctly they will be much better than any Ansible setup. If you don&#x27;t have the time or knowledge to do Chef or Salt correctly, then you don&#x27;t have the time or knowledge to manage VMs correctly, so don&#x27;t.<p>[1] <a href="https:&#x2F;&#x2F;cloud.google.com&#x2F;container-optimized-os" rel="nofollow">https:&#x2F;&#x2F;cloud.google.com&#x2F;container-optimized-os</a><p>[2] <a href="https:&#x2F;&#x2F;aws.amazon.com&#x2F;bottlerocket&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aws.amazon.com&#x2F;bottlerocket&#x2F;</a><p>[3] <a href="https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;latest&#x2F;ref&#x2F;renderers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;latest&#x2F;ref&#x2F;renderers&#x2F;</a><p>[4] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Flask_(web_framework)#History" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Flask_(web_framework)#History</a><p>[5] <a href="https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;latest&#x2F;ref&#x2F;renderers&#x2F;all&#x2F;salt.renderers.pyobjects.html#module-salt.renderers.pyobjects" rel="nofollow">https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;latest&#x2F;ref&#x2F;renderers&#x2F;all&#x2F;salt....</a><p>[6] <a href="https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;master&#x2F;ref&#x2F;pillar&#x2F;all&#x2F;salt.pillar.stack.html" rel="nofollow">https:&#x2F;&#x2F;docs.saltstack.com&#x2F;en&#x2F;master&#x2F;ref&#x2F;pillar&#x2F;all&#x2F;salt.pil...</a>