openminds / bunka

Parallel ssh commands over chef servers with rspec-like output. Bunka uses the exit codes of a command to determine whether it qualifies as a success or failure.
MIT License
10 stars 2 forks source link

Bunka

Parallel ssh commands over chef servers with rspec-like output. Bunka uses the exit codes of a command to determine whether it qualifies as a success or failure.

example

Installation

Requirements

Install the gem:

gem install bunka

Usage

bunka test COMMAND [QUERY] or bunka -t COMMAND [QUERY]

Test command

Test if a given command returns 0 on all nodes:

bunka -t 'test -d /foo/bar/'

Test if a given command does not return 0 on nodes:

bunka -t 'php -i | grep -i memcached' --invert

Test if a given command returns 0 on all nodes, also print out the STDOUT of successfull commands:

bunka -t 'cat /etc/apache2/conf.d/ssl' --print-success

Test if a given command returns 0, scoped on certain nodes (with knife search syntax):

bunka -t 'test -f /etc/apache2/conf.d/ssl' 'recipe:apache AND listen_ports:443'

Note

Bunka is not meant to modify server configurations, only to test how a server replies on a given (non-destructive) command. Use with caution.

To-do

Contributing

Bug reports, feature requests and test implementations are more than welcome. Please use our Github account for this.