News for hackers. Stuff that matters.
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.