You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Using a Nonstandard Pooler service](#using-a-nonstandard-pooler-service)
17
+
-[Valid config keys](#valid-config-keys)
18
+
-[Tab Completion](#tab-completion)
19
+
-[vmpooler API](#vmpooler-api)
20
+
-[Using the Pooler class](#using-the-pooler-class)
21
+
-[Example Projects](#example-projects)
22
+
-[Special thanks](#special-thanks)
9
23
10
24
## Install
11
25
12
26
Grab the latest from ruby gems...
13
27
14
-
```
15
-
$ gem install vmfloaty
16
-
...
17
-
...
18
-
$ floaty --help
28
+
```bash
29
+
gem install vmfloaty
19
30
```
20
31
21
32
## Usage
22
33
23
-
```
24
-
delete Schedules the deletion of a host or hosts
25
-
get Gets a vm or vms based on the os argument
26
-
help Display global or [command] help documentation
27
-
list Shows a list of available vms from the pooler or vms obtained with a token
28
-
modify Modify a vms tags, time to live, and disk space
29
-
query Get information about a given vm
30
-
revert Reverts a vm to a specified snapshot
31
-
snapshot Takes a snapshot of a given vm
32
-
ssh Grabs a single vm and sshs into it
33
-
status Prints the status of pools in vmpooler
34
-
summary Prints a summary of vmpooler
35
-
token Retrieves or deletes a token or checks token status
34
+
```plain
35
+
$ floaty --help
36
+
NAME:
37
+
38
+
floaty
39
+
40
+
DESCRIPTION:
41
+
42
+
A CLI helper tool for Puppet's vmpooler to help you stay afloat
43
+
44
+
COMMANDS:
45
+
46
+
completion Outputs path to completion script
47
+
delete Schedules the deletion of a host or hosts
48
+
get Gets a vm or vms based on the os argument
49
+
help Display global or [command] help documentation
50
+
list Shows a list of available vms from the pooler or vms obtained with a token
51
+
modify Modify a VM's tags, time to live, disk space, or reservation reason
52
+
query Get information about a given vm
53
+
revert Reverts a vm to a specified snapshot
54
+
snapshot Takes a snapshot of a given vm
55
+
ssh Grabs a single vm and sshs into it
56
+
status Prints the status of pools in the pooler service
57
+
summary Prints a summary of a pooler service
58
+
token Retrieves or deletes a token or checks token status
36
59
37
60
GLOBAL OPTIONS:
38
61
@@ -50,15 +73,15 @@ $ floaty --help
50
73
51
74
Grabbing a token for authenticated pooler requests:
52
75
53
-
```
76
+
```bash
54
77
floaty token get --user username --url https://vmpooler.example.net/api/v1
55
78
```
56
79
57
80
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.
58
81
59
82
Grabbing vms:
60
83
61
-
```
84
+
```bash
62
85
floaty get centos-7-x86_64=2 debian-7-x86_64 windows-10=3 --token mytokenstring --url https://vmpooler.example.net/api/v1
63
86
```
64
87
@@ -69,14 +92,24 @@ If you do not wish to continually specify various config options with the cli, y
69
92
#### Basic configuration
70
93
71
94
```yaml
72
-
# file at /Users/me/.vmfloaty.yml
95
+
# file at ~/.vmfloaty.yml
73
96
url: 'https://vmpooler.example.net/api/v1'
74
97
user: 'brian'
75
98
token: 'tokenstring'
76
99
```
77
100
78
101
Now vmfloaty will use those config files if no flag was specified.
79
102
103
+
#### Default to Puppet's ABS instead of vmpooler
104
+
105
+
```yaml
106
+
# file at ~/.vmfloaty.yml
107
+
url: 'https://abs.example.net'
108
+
user: 'brian'
109
+
token: 'tokenstring'
110
+
type: 'abs'
111
+
```
112
+
80
113
#### Configuring multiple services
81
114
82
115
Most commands allow you to specify a `--service <servicename>` option to allow the use of multiple vmpooler instances. This can be useful when you'd rather not specify a `--url` or `--token` by hand for alternate services.
@@ -103,14 +136,16 @@ services:
103
136
Examples using the above configuration:
104
137
105
138
List available vm types from our main vmpooler instance:
106
-
```sh
139
+
140
+
```bash
107
141
floaty list --service main
108
142
# or, since the first configured service is used by default:
109
143
floaty list
110
144
```
111
145
112
146
List available vm types from our alternate vmpooler instance:
113
-
```sh
147
+
148
+
```bash
114
149
floaty list --service alternate
115
150
```
116
151
@@ -138,28 +173,24 @@ services:
138
173
139
174
With this configuration, you could list available OS types from nspooler like this:
140
175
141
-
```sh
176
+
```bash
142
177
floaty list --service ns
143
178
```
144
179
145
180
#### Valid config keys
146
181
147
182
Here are the keys that vmfloaty currently supports:
148
183
149
-
- verbose
150
-
+ Boolean
151
-
- token
152
-
+ String
153
-
- user
154
-
+ String
155
-
- url
156
-
+ String
157
-
- services
158
-
+ Map
184
+
- verbose (Boolean)
185
+
- token (String)
186
+
- user (String)
187
+
- url (String)
188
+
- services (String)
189
+
- type (String)
159
190
160
191
### Tab Completion
161
192
162
-
There is a basic completion script for Bash (and possibly other shells) included with the gem in the [extras/completions](https://github.com/briancain/vmfloaty/blob/master/extras/completions) folder. To activate, that file simply needs to be sourced somehow in your shell profile.
193
+
There is a basic completion script for Bash (and possibly other shells) included with the gem in the [extras/completions](https://github.com/puppetlabs/vmfloaty/blob/master/extras/completions) folder. To activate, that file simply needs to be sourced somehow in your shell profile.
163
194
164
195
For convenience, the path to the completion script for the currently active version of the gem can be found with the `floaty completion` subcommand. This makes it easy to add the completion script to your profile like so:
165
196
@@ -184,6 +215,10 @@ vmfloaty providers a `Pooler` class that gives users the ability to make request
Special thanks to [Brian Cain](https://github.com/briancain) as he is the original author of vmfloaty! Vast amounts of this code exist thanks to his efforts.
0 commit comments