News for hackers. Stuff that matters.
Re:Fucking Shell Scripts by dogas on Friday March 14, 2014 @05:28PM (#7402017)
Coauthor here. Well, this is a surprise! This project was mainly borne out of our frustrations with Chef and then Ansible for configuring our servers.

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.

Re:Fucking Shell Scripts by bitwize on Friday March 14, 2014 @08:00PM (#7402795)
It's pretty funny, but it's an example of where we do NOT want to be headed.

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.

Re:Fucking Shell Scripts by jamiesonbecker on Friday March 14, 2014 @10:49PM (#7403264)
Simple is almost always Correct.

Conversely, complex is almost always incorrect.

Re:Fucking Shell Scripts by mercurial on Saturday March 15, 2014 @03:58AM (#7403993)
"Simple enough is almost always correct". "Too simple for the problem domain" is almost always a synonym for "build a heap of absolutely terrible and verbose pile of complexity on top of the 'simple' system". See also sysvinit.
Re:Fucking Shell Scripts by kelnos on Saturday March 15, 2014 @04:10AM (#7404006)
Strongly disagree. Often complexity in your implementation is necessary to present a simple interface to your user.
Re:Fucking Shell Scripts by eikenberry on Saturday March 15, 2014 @05:43AM (#7404157)
The primary user of your implementation is the next developer to maintain it.
Re:Fucking Shell Scripts by kelnos on Saturday March 15, 2014 @06:37AM (#7404228)
The user of a piece of software is more important than its current or future maintainers.
Re:Fucking Shell Scripts by rschmitty on Saturday March 15, 2014 @08:36AM (#7404441)
Yes but current or future users want reliability, features, and speed. If you care about your users in the long term you should care about the project's maintainers.
Re:Fucking Shell Scripts by kelnos on Wednesday March 26, 2014 @06:07AM (#7472468)
I suggested a relative ordering of importance; nowhere did I imply that one was important and the other was not.
Re:Fucking Shell Scripts by eikenberry on Saturday March 15, 2014 @01:59PM (#7405435)
Thinking like this is why we have so much crappy software out there.
Re:Fucking Shell Scripts by bitwize on Saturday March 15, 2014 @03:15PM (#7405852)
To quote Ryan Dahl: The only thing that matters in software is the experience of the user.

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?

Re:Fucking Shell Scripts by billsix on Friday March 14, 2014 @10:52PM (#7403276)
I thought the unix quote on simple vs correct is regarding things like "what should the kernel do when a process is processing a system call like read/write and needs to handle a signal. should it return an error of type EAGAIN, or somehow completely shield the user-space program of this condition?".

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.

Re:Fucking Shell Scripts by felixgallo on Saturday March 15, 2014 @03:05AM (#7403899)
I knew this was a systemd advocate after the second sentence. Hilarious.
Re:Fucking Shell Scripts by bitwize on Sunday March 23, 2014 @10:15PM (#7456324)
Uh, most of the Linux community consists of systemd advocates now. Systemd is now a fait accompli on all the major distros, and most of the users I encounter just want the bickering to stop. It would have stopped long ago were it not for a small but loud contingent of haters.
Re:Fucking Shell Scripts by kjs3 on Saturday March 15, 2014 @04:59PM (#7406426)
> 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."

Having been a Unix admin since long before Linux existed, I find this statement to be complete bullshit.

Re:Fucking Shell Scripts by route66 on Saturday March 15, 2014 @07:07PM (#7406932)
I think it's the chinese whisper effect applied to http://www.jwz.org/doc/worse-is-better.html [0] and as such more cult than information. As witnessed by the discussion around here.

[0] ("Correctness-the design must be correct in all observable aspects. It is slightly better to be simple than correct.")

Re:Fucking Shell Scripts by kjs3 on Saturday March 15, 2014 @09:00PM (#7407314)
Interesting theory. Considering the ignorance displayed, I think you're correct. Microsoft quality anti-Unix FUD.
Re:Fucking Shell Scripts by _Adam on Friday March 14, 2014 @05:55PM (#7402234)
I can imagine someone proposing this at some meeting with managers. "For our next product, we're going to use FUCKING SHELL SCRIPTS for configuration and deployment". What would the managers' faces look like...

I wonder if this is what you guys had in mind when you came up with the name

Re:Fucking Shell Scripts by dogas on Friday March 14, 2014 @06:08PM (#7402314)
The name came about when we were writing the majority of our ansible code. We mentioned to each other in frustration multiple times, "Man, this would be so much easier if I could just use fucking shell scripts."
Re:Fucking Shell Scripts by mpdehaan2 on Friday March 14, 2014 @06:32PM (#7402444)
Re:Fucking Shell Scripts by dorfsmay on Friday March 14, 2014 @11:15PM (#7403331)
When was this? Ansible today is much smoother than a year ago.
Re:Fucking Shell Scripts by dasil003 on Friday March 14, 2014 @06:10PM (#7402328)
Just say FSS, managers love acronyms!
Re:Fucking Shell Scripts by rjzzleep on Friday March 14, 2014 @06:48PM (#7402521)
hah, this is awesome! thank you.

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.

https://github.com/fishman/simple_deploy

Re:Fucking Shell Scripts by jamiesonbecker on Friday March 14, 2014 @10:51PM (#7403274)
I agree.

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.

Re:Fucking Shell Scripts by jsmeaton on Friday March 14, 2014 @11:34PM (#7403368)
Installation is mostly trivial. Maintaining a bunch of systems is not.

> 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.

Re:Fucking Shell Scripts by area51org on Saturday March 15, 2014 @09:27AM (#7404565)
why we can't just have a library of generic bash scripts doing things.

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.

Re:Fucking Shell Scripts by stevekemp on Saturday March 15, 2014 @04:21AM (#7404019)
You definitely win points for working over pure SSH, I love tools that do that. (Which include 'fabric', 'ansible', and similar.)

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:

http://www.steve.org.uk/Software/slaughter/

Re:Fucking Shell Scripts by networked on Friday March 14, 2014 @07:33PM (#7402714)
I see the appeal of FSS; I've felt frustrated with the extra effort it takes to describe some operations using Ansible compared to shell scripts. However, your project suggests to me that what we may really need is a tool to translate shell scripts into (reasonably idiomatic) Ansible playbooks, perhaps interactively and with further review from the user. That, or to otherwise automate the creation of playbooks where possible.

Edit: removed speculation about an idempotent *nix shell.

Re:Fucking Shell Scripts by Spittie on Friday March 14, 2014 @05:49PM (#7402191)
Thanks for this.

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.

Re:Fucking Shell Scripts by samstave on Friday March 14, 2014 @07:12PM (#7402636)
I love it - we got into a dialogue at work today with OPs and Eng on what to use for config mgmt (of our app)... and then this hit HN today...

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!

Re:Fucking Shell Scripts by digisign on Friday March 14, 2014 @06:43PM (#7402489)
If you'd like an alternative that is even simpler than ansible, yet still idempotent, try pave:

https://pypi.python.org/pypi/pave

https://bitbucket.org/mixmastamyk/pave

Re:Fucking Shell Scripts by sdegutis on Friday March 14, 2014 @05:34PM (#7402065)
We're using Chef right now, and evaluating other options. They seem to either be between way too over-engineered, or not flexible enough, but nowhere in between. I'd love to see a tool like yours be brought to full maturity, then I think I'd love to use it.
Re:Fucking Shell Scripts by digisign on Friday March 14, 2014 @06:48PM (#7402516)
As I mentioned in another place above, if you'd like an alternative that is even simpler than ansible, yet still idempotent, try pave:

https://pypi.python.org/pypi/pave

https://bitbucket.org/mixmastamyk/pave

Re:Fucking Shell Scripts by frist45 on Friday March 14, 2014 @05:48PM (#7402187)
Other co-author here: I couldn't agree with you enough. We settled on Ansible, but have had our fair share of speed bumps along the way.
Re:Fucking Shell Scripts by mikegirouard on Friday March 14, 2014 @06:07PM (#7402311)
Out of pure curiosity, what makes Ansible the best choice for you?

For my team, I decided on Ansible because it was the simplest option (no agents to install, pure ssh).

Re:Fucking Shell Scripts by sdegutis on Friday March 14, 2014 @06:09PM (#7402325)
By the way, that's the same reason I'm investigating using Pallet[1].

[1]: http://palletops.com/

Re:Fucking Shell Scripts by frist45 on Friday March 14, 2014 @08:31PM (#7402891)
We were coming from Chef where no one knew what was going on. We were looking for something simpler. There wasn't really many other options unfortunately. We're not full-time devops people...hence much of our frustration.
Re:Fucking Shell Scripts by twic on Friday March 14, 2014 @09:55PM (#7403144)
What were your frustrations with Ansible?