Commit graph

541 commits

Author SHA1 Message Date
Brian Cain
44d573301a Merge pull request #45 from caseywilliams/nspooler-integration
Add configuration for multiple pooler services and integration with nspooler
2017-10-13 16:02:27 -07:00
Casey Williams
ca5b0f5e8b Integrate nonstandard pooler service into vmfloaty 2017-10-12 12:53:04 -07:00
Casey Williams
e78bcc6216 Allow configuration of multiple services 2017-09-25 15:23:10 -07:00
Brian Cain
e7fcb7c7d5 Update readme 2017-09-21 13:18:48 -07:00
Brian Cain
7fe2cdc42d Add issue template 2017-09-21 13:18:04 -07:00
Brian Cain
ed82c44af5 Update email 2017-08-17 13:49:03 -07:00
Brian Cain
b670596f57 Update to 0.7.9 2017-07-31 08:04:40 -07:00
Brian Cain
2cd2bd15dc Merge pull request #44 from scotje/add_bash_completion
Add basic bash completion script and framework for others
2017-07-31 08:03:54 -07:00
Jesse Scott
6d57a1b5df Add basic bash completion script and framework for others 2017-07-27 11:27:16 -07:00
Brian Cain
5fa65b6400 Merge branch 'master' of github.com:briancain/vmfloaty 2017-03-14 08:58:51 -07:00
Brian Cain
cfbad921ce (maint) Be clearer about which password to use 2017-03-14 08:58:28 -07:00
Brian Cain
0ebc134851 Merge pull request #43 from mckern/developersdevelopersdevelopers
Developersdevelopersdevelopers
2017-03-01 15:33:39 -08:00
Ryan McKern
d7e3bc9a02 Improve Travis platforms
Ruby 2.0 is dead, but 2.1 is not. Of note is that Ruby 2.1 *will* be
unsupported soon, but it's definitely not dead yet.
2017-03-01 15:17:09 -08:00
Ryan McKern
5c794cd2b0 Use the Classname::VERSION pattern
Instead of having a hardcoded version identifier in multiple
locations, we can leverage the Classname::VERSION pattern to have a
single canonical version number that everything can reference
programmatically.
2017-03-01 14:02:58 -08:00
Ryan McKern
0380b5fc9a Gemspec whitespace & tighter version constraints
Pessimistic versioning means that Faraday 0.11.0 will be installed if
the constraint is "~> 0.9", and that will break spec tests due to
newer restrictions in Faraday around how HTTP requests are handled by
rspec. We don't want to break tests.
2017-03-01 14:02:58 -08:00
Ryan McKern
21c42dbffa Clarify license in Gemspec
As per https://opensource.org/licenses/alphabetical, the name should
be Apache-2.0, not Apache.
2017-03-01 14:02:58 -08:00
Ryan McKern
ee0c73dfda Add a little formatting to Rspec 2017-03-01 14:02:58 -08:00
Ryan McKern
8babbe32ce Add Rubocop support to Rakefile 2017-03-01 14:02:58 -08:00
Ryan McKern
573f0d83a9 Update Gemspec
Formatting is slightly more idiomatic now.
2017-03-01 12:44:06 -08:00
Brian Cain
c8525bd0f1 Bump to 0.7.8 2016-12-20 08:42:09 -08:00
Brian Cain
313742ebfd Use actual hostname when creating snapshots in warn msg 2016-12-16 11:21:20 -08:00
Brian Cain
82afa94b6e Properly check for large pool size requests 2016-12-14 11:04:51 -08:00
Brian Cain
b5c6ce7a20 Update usage to match help text 2016-12-09 09:00:32 -08:00
Brian Cain
82a3589db8 Bump to version 0.7.6 2016-12-09 08:57:25 -08:00
Brian Cain
c9b718b379 (#40) Require a --force flag when users request large pools
Prior to this commit, a user could easily steam roll vmpooler by
accidentally adding an extra digit to their get request:

$ floaty get centos=100

Accidentially hitting enter on this would completely drain a centos
pool.

This commit updates that bevaior to force users to use the --force flag
if they really want to get more than 5 vms per template. 5 was choosen
because most vm pools at Puppet were in the 5-10 range.
2016-12-08 21:26:14 -08:00
Brian Cain
345300f58a (#41) Improve help text for vmfloaty
General clean up of the text around the --help flag for all vmfloaty
commands.
2016-12-08 21:15:01 -08:00
Brian Cain
b023339516 Move pretty status printing to Utils namespace and out of commands 2016-12-06 11:21:21 -08:00
Brian Cain
5f0ace0c82 Add gem release Rakefile 2016-12-06 11:21:03 -08:00
Brian Cain
faf92a502d Include colorize in gemspec 2016-12-05 10:29:27 -08:00
Brian Cain
614fc4f7d8 Bump to 0.7.3 2016-12-05 08:42:50 -08:00
Brian Cain
5cfac377ee Merge pull request #38 from nicklewis/improved-status-command
Show the status of pools with `floaty status`
2016-12-05 08:42:21 -08:00
Nick Lewis
7ee73083fd Show the status of pools with floaty status
Previously, `floaty status` would simply pretty-print the JSON output of
the status request to the pooler. That data requires additional
parsing, either human or machine, in order to be able to deduce any
meaningful information about the state of the pooler.

This commit updates `floaty status` to visually represent the state of
pools, indicating which pools have nodes missing or being built. It also
prints the status summary message returned by the pooler, providing an
easy way to tell if everything is okay.

By default, this command will only show the state of pools that aren't
full. If `--verbose` is passed, it will show all pools. If the complete
status information provided by the API is desired, the `--json` option
will print the raw JSON output, preserving the previous functionality.

This also updates the status command to exit non-zero if the status is
not ok.
2016-12-02 13:47:58 -08:00
Brian Cain
a6ff0515d3 Raise TokenError if none provided to Pooler.delete 2016-11-14 09:49:23 -08:00
Brian Cain
97e188cf6d (#36) Update floaty modify command to work with multiple hosts
Prior to this commit, you could only modify 1 host at a time with the
floaty modify command. This commit updates that command to allow users
to modify either all known token vms, or vms passed in as a comma
separated list.
2016-11-12 14:25:08 -08:00
Brian Cain
586f4f5c05 Abstract out getting all active token vms into Utils 2016-11-12 13:59:26 -08:00
Brian Cain
2c9ce5644e Lock Faraday to a version 2016-11-12 13:47:14 -08:00
Brian Cain
414ac22f40 (#37) floaty snapshot warns users about snapshots pending
Vmpooler works by generating a snapshot sha and queueing
the host for taking a snapshot. Depending on the load of
vmpooler, this could take quite a while to complete
making it a little confusing to users trying to use that
snapshot name right away. This commit adds a warning to
the snapshot command about taking snapshots.
2016-11-12 13:39:16 -08:00
Brian Cain
41c0e931bb Bump verison to 0.7.1 2016-10-10 09:31:38 -07:00
Brian Cain
b51a549fe5 (#34) Raise TokenError on operations that require tokens
Prior to this commit, the Pooler class would raise an exception if the
token provided was nil and it attempted to make a request with Faraday.
This fixes that by catching when nil tokens are provided and instead
raising a TokenError to be caught by the consumer.
2016-10-07 18:10:52 -07:00
Brian Cain
08760d8c0b Update LICENSE 2016-09-24 13:40:16 -07:00
Brian Cain
9bd552686c Update to 0.7.0 2016-09-24 13:38:19 -07:00
Brian Cain
c9e582c24a (maint) Catch TokenError from Auth class 2016-09-24 13:34:28 -07:00
Brian Cain
c62c1c7083 (#33) Handle more exceptions in vmfloaty command class
This commit adds more handling to the vmfloaty command class that deals
with exceptions thrown from the Pooler class.
2016-09-24 13:29:43 -07:00
Brian Cain
478761023d (maint) Don't raise error in command class 2016-09-24 13:13:27 -07:00
Brian Cain
8b8ac88578 (maint) Use correct exit code in token delete 2016-09-24 11:19:44 -07:00
Brian Cain
579320e988 (#33) Raise TokenError if no token provided 2016-09-24 11:15:44 -07:00
Brian Cain
8da1deaf6b (#33) Handle Auth class errors
This commit updates the Auth class to properly raise an error when
something goes wrong. It also updates the vmpooler command class to
handle when those errors get raised.
2016-09-24 11:11:14 -07:00
Brian Cain
05e9d5a0cc (#32) Handle vmpooler responses when token is invalid
This commit adds an errors class to handle when pooler tokens are
invalid. The retrieve method in Pooler will raise an AuthError if it
gets an HTTP 401 from the vmpooler.
2016-09-24 10:22:48 -07:00
Brian Cain
86e1792775 Cleanup readme, add example projects 2016-09-17 16:20:28 -07:00
Brian Cain
1d0fc42c80 (#31) Improve how users can provide arguments to commands
Prior this commit, some commands did not accept some options as an
argument and instead only worked through a flag. This commit updates
that behavior to allow users to specify some options through arguments,
while leaving the ability to continue to specify those options through
flags. Command line arguments take precedence over flags. It also fixes
an issue where if a snapshot sha was nil, it would submit a request to
take a snapshot to vmpooler.
2016-09-17 16:07:21 -07:00