The Unix philosophy is a set of tenets based on assumptions that held in the 1970s and 1980s, but don't really hold today. One of these tenets is, "make the implementation as simple and as correct as possible; it is better for an implementation to be simple than to be correct."
This may have been true in an era when every site had to roll a homegrown solution for pert-near everything that didn't come with the base OS, but in this era of open source it is far more important for the implementation to be correct, because the Right Thing can be written once and everybody can use it, and save themselves the accumulated hours of frustration incurred by simple-but-subtly-incorrect implementations.
This is why the Linux world is standardizing on systemd -- to get AWAY from Fucking Shell Scripts and towards a more deterministic, declarative model of what we want done. In the case of configuration management, what you want is a tool that accepts a description of what the system configuration should be, diffs that against the current configuration, and enacts a plan of changes to get from point A to point B automatically. NixOS seems to be a good step in this overall direction.
Fun fact: I used to do instancing of robotic control computers running a specialized version of Debian with Fucking Shell Scripts (FAI, to be exact: http://fai-project.org/ ). It was pure hell. We would have killed for a more deterministic solution.
Conversely, complex is almost always incorrect.
How many more times must it be said? How many more times must Apple win -- and win big -- before open source nerds get the message?
http://www.jwz.org/doc/worse-is-better.html
> This may have been true in an era when every site had to roll a homegrown solution for pert-near everything that didn't come with the base OS, but in this era of open source it is far more important for the implementation to be correct, because the Right Thing can be written once and everybody can use it, and save themselves the accumulated hours of frustration incurred by simple-but-subtly-incorrect implementations.
The BSDs and linux are open source, but we still must check for EAGAIN.
Having been a Unix admin since long before Linux existed, I find this statement to be complete bullshit.
[0] ("Correctness-the design must be correct in all observable aspects. It is slightly better to be simple than correct.")
I wonder if this is what you guys had in mind when you came up with the name
i've used both chef, and puppet. and i still have a puppet standalone bootstrap script that i use every now and then. but I too created a simple shell script bootstrapping process for one of the projects i was working on.
it pretty much boils down to this:
tar cjf bootstrap.tar.bz2 VERSION library $2
scp bootstrap.tar.bz2 protonet@$1:/tmp
ssh -A -t myuser@$1 /bin/bash -c "
mkdir -p /tmp/runscript
cd /tmp/runscript
. ~/.profile
tar xjvf /tmp/bootstrap.tar.bz2
bash /tmp/runscript/$2 $3
rm -rf /tmp/runscript
rm /tmp/bootstrap.tar.bz2"
so far i haven't really found a good reason why we can't just have a library of generic bash scripts doing things.i have to apologize about the crappy function style, and the inconsistent shebangs, but meh, whatever.
It does in fact make me smile a little bit when the puppet installation script is longer than the script to do whatever it is that needs to be done to install the app itself. :)
Over time, it may make sense to move to a more deterministic solution, but to start there (IMO) is often a case of premature optimization.
> Over time, it may make sense to move to a more deterministic solution, but to start there (IMO) is often a case of premature optimization.
I mostly agree with this though.
It depends on what you're doing, I suppose. Me? I wouldn't want to try to use "simple" bash scripts to manage a large (or even medium) app farm, especially when those servers need ongoing management.
Me? I like perl and I decided I'd write something that just executed "primitives" locally. Then setup a flexible system of pulling them from git, via rsync, etc.
My tool is largely ignored, but modelled after CFENgine 2.x, and is here:
Edit: removed speculation about an idempotent *nix shell.
Lately I've been researching a way to automate things for a bunch of vps I own (nothing important, mostly self-hosted services like tt-rss), and obviously I looked at Chef/Puppet/Salt/Ansible and the likes. While those are valuable and awesome tools, I feel that they're too complicated for my simple needs.
FSS seems exactly the right compromise between running everything manually and using a full blown management tool.
I sent this along as a tongue-in-cheek 100% Solution.
And.... I actually read the site after I sent this along and realized its actuallyfuckingcoolshellscripts.org
So... thanks!
For my team, I decided on Ansible because it was the simplest option (no agents to install, pure ssh).
A few thoughts: 1) This project is incomplete and is more of a concept than anything. We wrote it literally in an afternoon, and were giggling like schoolgirls the whole time.
2) There is value in what Ansible provides. It does a lot of things for you. FSS did not replace ansible where we work.
All that being said however, I feel like this (or a project like this) does have merit, if executed properly. I feel that once you get used to how FSS works, it might be a good solution for you. We intentionally tried to keep it as simple as possible.