Live data from Hacker News

Moving away from Puppet: SaltStack or Ansible?

ryandlane.com

71–80 of 182 posts

Re: Moving away from Puppet: SaltStack or Ansible?

#71
post #52

I feel like the entire configruation management movement has passed me by. I still don't understand what value there is in chef/puppet/salt/ansible/docker vs bash or even Perl for that matter. Someone care to set me straight?

The primary wins are:

* Your servers are all kept in a known state that is described by your code. If you don't have configuration management, you have to remember that postgres is installed on X server and has Y configuration. Which is ok for simple configurations but quickly becomes a total mess for semi-complex configurations.

* You can go from a clean server to a fully fledged working server (or set of servers) in a single, repeatable step.

* You can remove repetition from your code base and decouple your server configurations. Database password needs to be used in six different places? No problem. Specify it in one centralized configuration file and then just use template variables to make it appear wherever it needs to be upon deployment.

Re: Moving away from Puppet: SaltStack or Ansible?

#72
post #15

While I have been a happy Ansible user for some time, the criticisims that the author pointed out that really resonated with me were: - Ansible is slow even when it doesn't have anything to do. This is true. For example, we manage lists of former users that should not exist on systems, this gets quite slow. I think that the slowness is mostly due to SSH, but it could be smarter about bulk operations, I suppose. - Cus…

I would add that the default output is a bit kludgy.

Rendering output to JSON is super annoying when your commands have lots of '\n....\n....\n....\n....' in them and you're trying to find the "line" where the relevant error message appeared from the command called by your state.

Also, there are some messages (e.g. ssh key verification failed) that require a higher level of verbosity than they should for the correct error to appear.

Still light-years better than puppet or chef though.

Re: Moving away from Puppet: SaltStack or Ansible?

#73
I posted this on the site, thought some might be interested here (disclaimer: I'm the creator of ShutIt):

We had similar requirements in our company and ended up building our own tool for building containers in docker and shipping those. So far it's working out really well, particularly in the "ease of learning" department.

http://ianmiell.github.io/shutit/.

https://github.com/ianmiell/shutit https://github.com/ianmiell/shutit/blob/master/README.md

http://shutit.tk

To take each of your requirements in turn wrt ShutIt:

    - No masters. 
ShutIt builds containers for shipping, so there is no concept of a master.

    - Code should be as simple as possible.
What could be simpler than "pure bash", wrapped in a transparent and simple python framework? eg here's the mysql module:

https://github.com/ianmiell/shutit/blob/master/library/mysql...

    - No optimizations that would make the code read in an illogical order.
ShutIt is "pure ordered". Each module has an ordering and code is strictly sequential. It even outputs the commands into a "black box" recorder on the container which can then be used to port to other CM tools if desired.

    - Code must be split into two parts: base and service-specific, where each would reside in separate repositories. 
https://github.com/ianmiell/shutit/tree/master/library

These are shared infra, while custom modules can be cut and kept private.

You can also build "meta-modules" which simply require other modules and do nothing else. These then form the base layer of our dev builds.

    - The code must work for multiple environments (development, staging, production).
ShutIt's highly configurable, so you can code whatever you want wrt different environments.

    - The code should read and run in sequential order.
ShutIt demands sequential ordering.

Any questions, please mail me: ian.miell@gmail.com

Re: Moving away from Puppet: SaltStack or Ansible?

#74
post #14

Personally a fan of Ansible, but I've also been pretty impressed by SaltStack as well. Either is much simpler and easier to use than the older generations of configuration management tools (cfengine, Puppet, Chef.)

I've never heard of ansible being referred to as a new generation. What do you think defines this generation? I use puppet and chef a fair bit so I'm just curious on the new features offered.

>I've never heard of ansible being referred to as a new generation. What do you think defines this generation?

IMO, it's three things:

* A push-by-default model rather than pull-by-default (that never made sense to me: option, maybe - default, HELL no).

* A focus on minimizing the dependencies (puppet has a ton of annoying unnecessary and attack-surface-increasing/ RAM-gobbling dependencies from the agent to the SSL authentication).

* Not using a DSL - just using YAML and an intentionally dumb templating language - helping to enforce a far cleaner separation between configuration and code (the divide can get muddied with puppet because its DSL is too powerful).

Re: Moving away from Puppet: SaltStack or Ansible?

#75
post #54

Earlier quoted context omitted.

When you're managing more than a handful of servers, you very quickly start wanting to be able to run the same command on multiple machines - "upgrade all my API boxes to the not-vulnerable nginx", for instance, or "push this binary out to all my database servers". These sorts of services make that straightforward, and generally provide a large library of prewritten modules to do moderately-complicated things without…

Well, I've done that just using remote shell commands. And I'd have an easier time reading someone else's bash than I would their ansible whatevers. Is it actually more concise?

It's usually more concise because idempotency comes by default. Instead of saying "create this file" (which might throw a 'file already exists' error the 2nd time you run the setup script), you say "ensure this file exists".

Some bash commands are idempotent too (e.g. apt-get install), but it's not something you can rely upon, and you often have to code the idempotency in yourself.

Re: Moving away from Puppet: SaltStack or Ansible?

#76
I haven't looked at Salt, but I had a love/hate relationship with Ansible so far.

To be clear: Starting with Ansible was amazing, the first couple steps were easy and enlightening. Maybe I'm expecting too much now and act entitled or something? That said, it broke down rather quickly.

- My first issue was documentation. This article is correct about the current state of the documentation, but the site was in a really bad state in limbo (between redesigns or something) for quite some time. Offers on the mailing list (Not by me) to restructure the website, as a community effort, were declined. Basically the documentation was, from this point of view, unusable before the current design went live. Broken links, no easy structure.. It was 'an adventure'.

- The bigger/biggest gripe: Everything I try to do in Ansible seems to turn into a shell script. Limitations in Ansible and the "Use a template for bug reports"/laggy response on GitHub lead to workarounds all over the place, where I had to resort to 'raw:' and/or 'shell:' where there should be a reasonable way to do things. One (of quite some) examples would be [1]: For starting random services (postgresql, dovecot in my case) Ansible just breaks and hangs forever in my environment. Ah well, let's resort to shell: service postgresql start (which .. doesn't do change tracking, isn't the same thing .. but works).

I'm really happy with what Ansible allowed me to do. I'm not satisfied with the result I have here and still look for a way to drop all my (necessary!) debug: and shell: modules for a different solution.

1: https://github.com/ansible/ansible/issues/5923

Re: Moving away from Puppet: SaltStack or Ansible?

#77

I haven't looked at Salt, but I had a love/hate relationship with Ansible so far. To be clear: Starting with Ansible was amazing, the first couple steps were easy and enlightening. Maybe I'm expecting too much now and act entitled or something? That said, it broke down rather quickly. - My first issue was documentation. This article is correct about the current state of the documentation, but the site was in a really…

Ansible is nice, but I share the same gripes as darklajid. Plus, with Docker taking off, I question how valuable Ansible will be going forward. I see it as a "nice Chef" or "usable Puppet". Not revolutionary.

Re: Moving away from Puppet: SaltStack or Ansible?

#78

Ansible seems to have more traction: https://www.google.com/trends/explore#q=ansible%2C%20saltsta...

Depends on how you view it.

According to the chart Ansible has been around since 2005? Salt is barely 2 years old? Look at the uptick of the last few months and SaltStack seems ever slightly steeper than Ansible.

I am SaltStack guy, albeit a newbie. Barely got done installing (much much easier than Puppet) and trying out few commands. I was hooked on SaltStack when I was able to run following command once and get result from multiple machines near simultaneously.

> salt "*" cmd.run "df -h'

I get result from all machines near simultaneously.

Above command is same as you logging into each machine (say hundreds or thousands) and running 'df -h' to see status of your storage space. You could write/test/deploy a shell script and push it out to all those machines. Or set up some monitoring system. Or install SaltStack across your network (very simple to do) and run above command once on your SaltStack server and get immediate feedback.

I tried working with Puppet long time ago. The idea of having 20 minute window for pushing out changes never seemed attractive to me.

Re: Moving away from Puppet: SaltStack or Ansible?

#79

I haven't looked at Salt, but I had a love/hate relationship with Ansible so far. To be clear: Starting with Ansible was amazing, the first couple steps were easy and enlightening. Maybe I'm expecting too much now and act entitled or something? That said, it broke down rather quickly. - My first issue was documentation. This article is correct about the current state of the documentation, but the site was in a really…

SaltStack documentation is awesome. I may be biased because I am starting out with Salt but the documentation (and their website) is awesome.
Post reply on HN