A CLI helper tool for Puppet vmpooler to help you stay afloat
Find a file
2016-12-16 11:21:20 -08:00
bin (#1) Update vmfloaty to use new vmpooler api 2015-09-05 16:17:45 -07:00
lib Use actual hostname when creating snapshots in warn msg 2016-12-16 11:21:20 -08:00
spec Raise TokenError if none provided to Pooler.delete 2016-11-14 09:49:23 -08:00
.gitignore Initial commit of vmfloaty 2014-10-28 22:05:33 -07:00
.travis.yml Add travis 2015-10-13 21:19:50 -07:00
Gemfile Show the status of pools with floaty status 2016-12-02 13:47:58 -08:00
LICENSE Update LICENSE 2016-09-24 13:40:16 -07:00
Rakefile Add gem release Rakefile 2016-12-06 11:21:03 -08:00
README.md Update usage to match help text 2016-12-09 09:00:32 -08:00
vmfloaty.gemspec Properly check for large pool size requests 2016-12-14 11:04:51 -08:00
vmfloaty.yml.example (#19) Update vmfloaty to expect /api/v1 in URL for disk endpoint 2016-05-03 14:57:00 -07:00

vmfloaty

Gem Version Build Status

A CLI helper tool for Puppet Labs vmpooler to help you stay afloat.

Install

Grab the latest from ruby gems...

$ gem install vmfloaty
...
...
$ floaty --help

Usage

    delete   Schedules the deletion of a host or hosts
    get      Gets a vm or vms based on the os argument
    help     Display global or [command] help documentation
    list     Shows a list of available vms from the pooler or vms obtained with a token
    modify   Modify a vms tags, time to live, and disk space
    query    Get information about a given vm
    revert   Reverts a vm to a specified snapshot
    snapshot Takes a snapshot of a given vm
    ssh      Grabs a single vm and sshs into it
    status   Prints the status of pools in vmpooler
    summary  Prints a summary of vmpooler
    token    Retrieves or deletes a token or checks token status

  GLOBAL OPTIONS:

    -h, --help
        Display help documentation

    -v, --version
        Display version information

    -t, --trace
        Display backtrace when an error occurs

Example workflow

Grabbing a token for authenticated pooler requests:

floaty token get --user username --url https://vmpooler.mycompany.net/api/v1

This command will then ask you to log in. If successful, it will return a token that you can save either in a dotfile or use with other cli commands.

Grabbing vms:

floaty get centos-7-x86_64=2 debian-7-x86_64 windows-10=3 --token mytokenstring --url https://vmpooler.mycompany.net/api/v1

vmfloaty dotfile

If you do not wish to continuely specify various config options with the cli, you can have a dotfile in your home directory for some defaults. For example:

#file at /Users/me/.vmfloaty.yml
url: 'https://vmpooler.mycompany.net/api/v1'
user: 'brian'
token: 'tokenstring'

Now vmfloaty will use those config files if no flag was specified.

Valid config keys

Here are the keys that vmfloaty currently supports:

  • verbose
    • Boolean
  • token
    • String
  • user
    • String
  • url
    • String

vmpooler API

This cli tool uses the vmpooler API.

Using the Pooler class

vmfloaty providers a Pooler class that gives users the ability to make requests to vmpooler without having to write their own requests. It also provides an Auth class for managing vmpooler tokens within your application.

Example Projects