Babushka: test-driven sysadmin.

Installing babushka

Babushka is best installed using, a script that installs babushka via git (and some dependencies via your system’s package manager). It’s safe to run on existing systems; if you’re running git and ruby already then all that’s installed is babushka itself.

The script is also designed to be used as the initial shell command on a brand new laptop or server. Its only prerequisite, which most systems ship with, is something that can fetch over https. Mac OS X and some Linux distros ship with curl:

sh -c "`curl`"

If your system doesn’t ship with curl, you can install it first. Here are some examples:

# on Arch Linux
      pacman -S curl && sh -c "`curl`"
      # on Ubuntu Linux
      apt-get install -y curl && sh -c "`curl`"

Some other Linux distros ship with wget instead. Many of these stock wget installs lack openssl, which means no https downloads. You could install curl first (which should pull in openssl; see above), or just cowboy it over http with wget:

sh -c "`wget -O -`" # Hijack me, please!

What it does

The script is fairly straightforward. Here’s what it does:

Here’s the script and the template that it’s rendered from if you’d like to review them.

Installing babushka doesn’t make any surprising changes to your system. You can completely uninstall it by deleting it:

rm -rf /usr/local/babushka /usr/local/bin/babushka

Scripting the install

The bootstrap script prompts for confirmation and an install prefix. If you’re scripting the install, fear not: it runs unconditionally, accepting the defaults for those prompts, if STDIN isn’t attached to a terminal. If you’d like to run a prompt-less install at the terminal, just attach STDIN to /dev/null instead:

sh -c "`curl`" </dev/null


By default, will install the latest stable version, but this can be customised. Just pass a git ref to the script like so (the default is stable):

sh -c "`curl<ref>`"

You can supply any ref that github serves as a tarball: any branch, tag, or SHA will work. Some examples:

If you like, you can lock your install by supplying a SHA, which can never change:

sh -c "`curl`"

You could also use a tag, for readability (I promise I’ll never change a version tag):

sh -c "`curl`"

Installing a custom babushka

By default, babushka is installed from my repo on github, benhoskings/babushka. If you like, you can install from your own repo instead by passing a custom repo URI in the $BABUSHKA_REPO environment variable, like so:

        sh -c "`curl`"

This is useful for running installs in situations where github isn’t accessible, or if you’d like to install from a fork of babushka.

Manual installation

If you’d prefer to install manually, it’s pretty straightforward. First, ensure ruby and git are installed to your taste:

pacman -S ruby git # Adjust for your system as required

Grab a local copy of babushka from the githubs:

git clone ./babushka
      cd babushka

Then you can run babushka with ./bin/babushka.rb, or if you like, symlink it into your PATH:

cd /usr/local/bin
      ln -s /path/to/babushka/bin/babushka.rb ./babushka

My kingdom for a gem

Even though babushka is a ruby app, there’s no gem distribution. The reason for this is that setting up a particular ruby build, rubygems, and maybe rbenv or chruby along the way is just the kind of thing babushka is good at. So in the interests of consistency, I recommend installing babushka via git repo every time, whether or not you use to do it.