Floatyhelper

A CLI app for manipulating groups of VMs provisioned with vmpooler.

This was written to aid the installer and management team with testing various configurations of Puppet Enterprise. Groups of hosts can be added (either directly from a Beaker run from inside the pe_acceptance_tests folder it was run with, or manually with the --hosts flag) and given a "tag" to refer to the group of hosts by. These hosts can be snapshotted together, with these snapshots given a "snaptag" that can then be reverted to if needed.

NOTE: This requires that you have already set up your .vmfloaty file with the appropriate token. The app currently does not check that this is the case.

This tool could use some specs and linting, probably.

Installation

Add this line to your application's Gemfile:

gem 'floatyhelper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install floatyhelper

Usage

floatyhelper <command> <options>

The following commands are currently available:

floatyhelper tags - List all currently tracked tags that specify groups of hosts

floatyhelper list - List all VMs and their associated tags

floatyhelper snaplist <tag> - List all of the snaptags associated with the given VM group tag

floatyhelper showconfig - Dumps the .floatyhelper.yaml file. Primarily used for debug purposes.

floatyhelper addhosts <tag> [--hosts HOST1,HOST2,...] [--file sutfile] - Takes all hosts defined in a beaker sut.log file and adds them to the list of hosts floatyhelper is tracking. These hosts will be grouped under the given tag, so that this tag can be used to operate on the whole set of hosts at once. If --file is not specified, this assumes you are inside a pe_acceptance_tests folder and grabs the lsit of hosts from log/latest/sut.log. If --hosts is specified, it will add the given comma-separated list of hosts.

floatyhelper appendhosts <tag> [--hosts HOST1,HOST2,...] [--file sutfile] - Similar to the addhosts command, but adds the given hosts to the list of hosts tracked under a given tag.

floatyhelper destroy <tag> [--all] [--hosts HOSTS] - Calls floaty delete on the vmpooler hosts with the given tag.

floatyhelper increaselife <tag> [options] - Increases the lifetime of the given host or tagged hosts. Defaults to 100 hours.

floatyhelper snapshot <host|tag> <snaptag> - Snapshots the given VM or group of tagged hosts, and defines a string to use as a snaptag to refer to this group of snapshots.

floatyhelper revert <host|tag> <snaptag> - Reverts the given VM or host group to the given snaptag.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/nmburgan/floatyhelper.

License

The gem is available as open source under the terms of the MIT License.