0

The devops tools ecosystem is puzzling to me. Instead of shell scripts that work everywhere everyone in the server orchestration/management space is bolting on their own proprietary formats. Ansible has their YAML playbooks, Puppet has its class/graph language, salt like ansible has some kind of YAML format, chef is an embedded Ruby DSL. Out of all of these approaches I like chef the best because it does the simplest possible thing. So I guess one benefit is better visibility into the fleet when you use one of these tools but that's orthogonal to the actual configuration and provisioning component.

I don't quite get why everyone is trying to re-invent shell scripts with YAML because more often than not ssh -t is all I need to get things done along with a library of some shell scripts. These scripts are usually packaged as self-contained tar files and are small and simple enough to be mixed and matched as necessary. They have zero dependencies other than bash and will pretty much just work anywhere. So why is it then that a simple solution like that is not good enough for ansible, puppet, chef, etc.? What do all these solutions gain by replacing bash scripts with some other format?

1 Answers1

7

There are plenty of good reasons to use configuration management software. While there are many different tools, I'll focus on a few of the features of Puppet (the main concepts are largely the same).

Note: While you could argue that writing your own scripts could achieve the same results, presumably you'd have to write and maintain a large codebase to achieve the same tasks.

Declarative

As a declarative, model-based approach to IT automation, it lets you define the desired state - or the “what” - of your infrastructure using the Puppet configuration language.

Enforcing desired state

Once these configurations are deployed, Puppet automatically installs the necessary packages and starts the related services, and then regularly enforces the desired state.

A framework for automating the mundane

In automating the mundane, Puppet frees you to work on more challenging projects with higher business impact.

An example, installing a package

You can do all sorts of interesting things like install packages (on a large variety of operating systems), or ensure only particular versions of a package are installed.

package { "screen":
    ensure => "installed"
}

The above code ensures that the package 'screen' is installed, and this will work on Debian (which uses apt) or Redhat (which uses yum). You don't need to maintain your own scripts or logic for each package management system, Puppet does that for you.

And there's more

There are plenty of other benefits around templating, facts, mcollective, roles, GUIs, event inspectors, dry-runs, support, & puppetforge.

Drew Khoury
  • 4,697
  • 8
  • 29
  • 29