News for hackers. Stuff that matters.
Re:Babushka – Test-Driven Sysadmin by mapleoin on Wednesday April 20, 2016 @05:01AM (#11533108)
This is presented as revolutionary somehow, but it's just a stripped-down (early version?) of what the other configuration management tools do: e.g. Chef, puppet, ansible.
Re:Babushka – Test-Driven Sysadmin by CraigJPerry on Wednesday April 20, 2016 @06:27AM (#11533374)
Yeah i agree. Although I still haven't found a test framework I like for this so any pointers appreciated!

I tried it all ansible based: https://github.com/CraigJPerry/ansible-users/tree/test-cases...

I tried it using Python's unittest2 module: https://github.com/CraigJPerry/home-network/blob/v0.1.5/test...

I like the idea that ansible playbooks should be self testing.

Re:Babushka – Test-Driven Sysadmin by falcolas on Wednesday April 20, 2016 @09:15AM (#11534097)
I'm working from a memory of a podcast, so pull out those pinches of salt: Chef offers a testing suite - it basically offers a running mode which does an audit of what current conforms to the recipes you've passed it, and outputs a list of actions it would take to remedy this.

Combined with VMs, this lets you do some basic automated testing to ensure that your script is doing what you intend it to do.

I could swear that they also some kind of automated validation against an "inventory", which would make it possible to do automated tests against a known, unchanging target, but at this point I'm probably mis-remembering. They may have just advocated using VMs, images, and audits as validation.

Re:Babushka – Test-Driven Sysadmin by otterley on Wednesday April 20, 2016 @09:50PM (#11539105)
Have you tried Serverspec?
Re:Babushka – Test-Driven Sysadmin by awinter-py on Tuesday April 19, 2016 @11:17PM (#11532035)
a step in the right direction (mockable infrastructure). nice work.
Re:Babushka – Test-Driven Sysadmin by nikolay on Wednesday April 20, 2016 @12:00AM (#11532171)
This is not a new project, but it's so simple and, yet, practical - I couldn't resist to repost it in hopes.
Re:Babushka – Test-Driven Sysadmin by nikolay on Wednesday April 20, 2016 @12:04AM (#11532184)
By the way, some guy tried to implement it in pure Bash once [0].

[0]: https://github.com/richo/babashka

Re:Babushka – Test-Driven Sysadmin by errnoh on Wednesday April 20, 2016 @05:30AM (#11533187)
There's also Marelle [0], written in SWI-Prolog.

[0]: http://larsyencken.github.io/marelle/

Re:Babushka – Test-Driven Sysadmin by nikolay on Thursday April 21, 2016 @01:28PM (#11543833)
Thanks for reminding me about Marelle! I was really excited about it back then, but then, due to the Prolog dependency, I got a bit more practical.
Re:Babushka – Test-Driven Sysadmin by fisle on Wednesday April 20, 2016 @06:45AM (#11533440)
Sysadmin tool suggests installing itself with sh & curl combo? This makes me suspicious of the tool itself.
Re:Babushka – Test-Driven Sysadmin by loudmax on Wednesday April 20, 2016 @07:58AM (#11533706)
I was thinking the same thing. As a grey haired sysadmin it's disconcerting to see this blasé attitude toward executing local commands from a remote host.

In a practical sense, I'm not sure it's as bad as it looks. It is https. And if you weren't going to read the source code, it's not really different from downloading the program before executing it. In this case, its a small shell script, so it's easy to glance through the code to make sure it isn't doing anything sketchy. For large code bases, that isn't always feasible, so at some point you have to simply trust the source, whether you install from a tarball or (ugh) let a shell execute commands from a remote host.

Also, if you're the kind of sysadmin that fires up a VM or a container any time you want to experiment with a new piece of software, you can afford to take risks. At worst, they'll steal your public key.

It does seem like a bad habit. If you get used to sh+curl install legitimate projects, it isn't such a stretch to sh+curl miscellaneous suggestions on forums.

Re:Babushka – Test-Driven Sysadmin by wyldfire on Wednesday April 20, 2016 @08:37AM (#11533886)
I saw this link elsewhere on HN today: "is curl|bash insecure?" [1]

[1] https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-p...

Re:Babushka – Test-Driven Sysadmin by burke on Wednesday April 20, 2016 @11:23AM (#11535092)
I've borrowed this met?/meet API for another tool and found it to be a really useful pattern.
Re:Babushka – Test-Driven Sysadmin by visakanv on Wednesday April 20, 2016 @04:19AM (#11532974)
Love the name.
Re:Babushka – Test-Driven Sysadmin by xentronium on Wednesday April 20, 2016 @04:41AM (#11533046)
Technically the toy is called matryoshka, babushka is Russian for grandmother.
Re:Babushka – Test-Driven Sysadmin by guard-of-terra on Wednesday April 20, 2016 @04:46AM (#11533065)
I think they meant it. As in, a grandmother who is full of energy and can do a dozen things before anybody is ever awake.

Always coming to the rescue of her grandchildren.

Re:Babushka – Test-Driven Sysadmin by iamtew on Wednesday April 20, 2016 @05:41AM (#11533214)
They didn't:

> It’s true, babushka means “grandmother” in Russian. The thing is, here in Australia, “babushka doll” is the colloquial term for Russian nesting dolls. Deps are intended to be small, tidy chunks of code, nested within each other - hence the name.

Last paragraph: http://babushka.me/overview

Re:Babushka – Test-Driven Sysadmin by agumonkey on Wednesday April 20, 2016 @05:13AM (#11533141)
The Kate Bush fan in me remembers this.
Re:Babushka – Test-Driven Sysadmin by not_logan on Wednesday April 20, 2016 @06:34AM (#11533395)
I can't understand why the Babushka is better (or worse) than popular SCM, such as puppet, chef or ansible?
Re:Babushka – Test-Driven Sysadmin by lisivka on Wednesday April 20, 2016 @06:56AM (#11533483)
Compare it with Systemd instead of puppet: it is stripped down version of Systemd.