DevOps tools review for DataCenter automation: Ansible-StackStorm-SaltStack
medium.com
medium.com
One problem with the "post-Puppet/Chef" generation of tools is the over-reliance of templatized YAML as a DSL. Salt's use of YAML is particularly egregrious. For all the criticisms of Puppet's custom language, at least it's a language, with proper types, a consistent syntax, and a good measure of strictness. I like YAML as configuration file language, but it's terrible for DSLs.
The weakest part has always finding reference documentation — that is, things like this [1]. Everything is a bit buried and scattered. At least they finally have a complete list of configuration settings [2] now, which used to be a huge pain.
Many folks miss one important point: Salt's renderer interface is also pluggable. There are quite a few choices for you: https://docs.saltstack.com/en/latest/ref/renderers/index.htm.... For data representation you can choose between: yaml, yamlex, json, json5, hjson, or even pure python. Nothing else can be more flexible than pure python. But, of course, this approach also has its drawbacks. Anyway, if none of them suits your needs for non-terrible DSL, you can even implement your own DSL, your own renderer.
All you have to do is adding few characters at the top of your pillar, i.e. #!json or #!json5 or even #!lobster.
So where is the limitation again? In reading documentation I guess.
The YAML is the default, and it's what you find examples and support for (Stack Overflow and so on). I get the impression that many of the renderers are not "official", in the sense that they're maintained by other people.
If Salt only provided a Python API, the situation would be different. As such, it's a case of too much choice, and not enough standardization. There are no less than three competing Python renderers.
I had the feeling that YAML is the one that addresses your criticism ("I like YAML as configuration file language, but it's terrible for DSLs."). And yes, I do use the python one and I am very happy with it.
> The YAML is the default, and it's what you find examples and support for (Stack Overflow and so on)
Pro tip: if they are YAML on StackOverflow, you don't have to copy-paste them, but more rather translate them to the representation that satisfy your high requirements.
The so-called highstate data structure is very stable and well documented so Renders rarely need changes:
https://docs.saltstack.com/en/latest/ref/states/highstate.ht...
The regular Python interface you mentioned is my favorite too, when YAML/Jinja aren't a good fit, and people do use it. It's 40 LOC and has only needed 32 commits in the six years it's been around:
https://github.com/saltstack/salt/blob/5406a7cdd4729/salt/re...
The takeaway is YAML/Jinja generate exactly the same result as the Python Renderer so use what you like.
Ansible relies on SSH only, which is pretty much a must on 99,9% servers anyway, but its language (and philosophy) is purely declarative. At the moment you need anything generic, abstracted into functions, you are in trouble. (Believe me, you don't want to be hacking stuff into Yaml, it's a mess).
Chef is the opposite: you have access to a Turing complete language, but you need an overly complex server architecture along with running agents on all nodes.
Merge Ansible's ssh client with Chef's programmable dsl and you probably have something huge there.
You can use the other renderers in there as well, you don't have to just use yaml.
https://docs.saltstack.com/en/latest/ref/renderers/all/salt....
Ansible is good but it has already been forked to Stonic, which for me is a sign of disagreement in the community.
A lot of the management tools tends to have their config agents crashing so you need to baby sit your agents instead of just configuring your servers. I tend to use Puppet, Ansible standalone pulling the configuration templates via git that avoids the crashing agents issue.
In my environment we're using both Salt and StackStorm very effectively. Salt for CM and StackStorm as a platform for building automated, event-driven tools. They're really very complementary, especially since both are Python-based.
As a friend (big Ansible fan otherwise) would say: "Ansible is just a glorified bash script; nothing more, nothing else". Without making it a bad product, Ansible is that one limited to CM only.
Anthony is bringing a different angle here: how Salt / Ansible / StackStorm compare as event driven frameworks, applied to all-purpose automation, aka GLUE. Puppet/Chef aren't even playing.
Do you see this relevant? Or do you think "Salt beacons, who cares?" Why?
cobbler used to be the go-to tool for provisioning bare metal but rackhd seems to be the new contender in this space. that + packer + terraform + CM = 100% automated DCops