knife-server 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +9 -1
- data/README.md +23 -6
- data/lib/chef/knife/server_backup.rb +5 -2
- data/lib/chef/knife/server_bootstrap_ec2.rb +3 -3
- data/lib/knife/server/version.rb +1 -1
- metadata +1 -1
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
## 0.2.
|
1
|
+
## 0.2.2.dev (unreleased)
|
2
|
+
|
3
|
+
|
4
|
+
## 0.2.1 (July 3, 2012)
|
5
|
+
|
6
|
+
### Improvements
|
7
|
+
|
8
|
+
* Move knife plugin requires into dep block for speedier knife loads. Source:
|
9
|
+
http://wiki.opscode.com/display/chef/Knife+Plugins. ([@fnichol][])
|
2
10
|
|
3
11
|
|
4
12
|
## 0.2.0 (July 3, 2012)
|
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# <a name="title"></a> Knife::Server [](http://travis-ci.org/fnichol/knife-server) [](https://gemnasium.com/fnichol/knife-server)
|
2
2
|
|
3
|
-
An Opscode Chef knife plugin to manage Chef Servers.
|
4
|
-
|
5
|
-
data backup and restore is planned.
|
3
|
+
An Opscode Chef knife plugin to manage Chef Servers. Bootstrapping new Chef
|
4
|
+
Servers (currently on Amazon's EC2) and node data backup is supported.
|
6
5
|
|
7
6
|
## <a name="usage"></a> Usage
|
8
7
|
|
@@ -14,6 +13,13 @@ $ knife server bootstrap ec2 --ssh-user ubuntu \
|
|
14
13
|
--node-name chefapalooza.example.com
|
15
14
|
```
|
16
15
|
|
16
|
+
Taking a backup of all node, role, data bag, and environment data is also a
|
17
|
+
snap:
|
18
|
+
|
19
|
+
```bash
|
20
|
+
$ knife server backup
|
21
|
+
```
|
22
|
+
|
17
23
|
See [below](#subcommands) for more details.
|
18
24
|
|
19
25
|
## <a name="installation"></a> Installation
|
@@ -255,6 +261,10 @@ be taken of:
|
|
255
261
|
* environments
|
256
262
|
* data bags
|
257
263
|
|
264
|
+
A big thanks to [Steven Danna][stevendanna] and [Joshua Timberman][jtimberman]
|
265
|
+
for the [BackupExport][backup_export] knife plugin which was the inspiration
|
266
|
+
for this implementation.
|
267
|
+
|
258
268
|
#### Configuration
|
259
269
|
|
260
270
|
##### COMPONENT[ COMPONENT ...]
|
@@ -269,7 +279,9 @@ The following component types are valid:
|
|
269
279
|
When no component types are specified, all will be selected for backup.
|
270
280
|
This is equivalent to invoking:
|
271
281
|
|
272
|
-
|
282
|
+
```bash
|
283
|
+
$ knife server backup nodes roles environments data_bags
|
284
|
+
```
|
273
285
|
|
274
286
|
##### --backup-dir DIR (-D)
|
275
287
|
|
@@ -284,8 +296,10 @@ The default uses the `:file_backup_path` configuration option, the
|
|
284
296
|
(within a second). For example, if the time was "2012-04-01 08:47:11 UTC", and
|
285
297
|
given the following configuration (in **knife.rb**):
|
286
298
|
|
287
|
-
|
288
|
-
|
299
|
+
```ruby
|
300
|
+
file_backup_path = "/var/chef/backups"
|
301
|
+
chef_server_url = "https://api.opscode.com/organizations/coolinc"
|
302
|
+
```
|
289
303
|
|
290
304
|
then a backup directory of
|
291
305
|
`/var/chef/backups/api.opscode.com_20120401T084711-0000` would be created.
|
@@ -329,7 +343,10 @@ Apache License, Version 2.0 (see [LICENSE][license])
|
|
329
343
|
[issues]: https://github.com/fnichol/knife-server/issues
|
330
344
|
[contributors]: https://github.com/fnichol/knife-server/contributors
|
331
345
|
|
346
|
+
[backup_export]: https://github.com/stevendanna/knife-hacks/blob/master/plugins/backup_export.rb
|
332
347
|
[chef_bootstrap_knife_rb]: https://github.com/fnichol/chef-bootstrap-repo/blob/master/.chef/knife.rb
|
333
348
|
[chef_bootstrap_repo]: https://github.com/fnichol/chef-bootstrap-repo/
|
349
|
+
[jtimberman]: https://github.com/jtimberman
|
334
350
|
[knife-ec2]: https://github.com/opscode/knife-ec2
|
351
|
+
[stevendanna]: https://github.com/stevendanna
|
335
352
|
[wiki_knife]: http://wiki.opscode.com/display/chef/Knife#Knife-Knifeconfiguration
|
@@ -18,13 +18,16 @@
|
|
18
18
|
|
19
19
|
require 'chef/knife'
|
20
20
|
require 'chef/node'
|
21
|
-
require 'fileutils'
|
22
|
-
require 'uri'
|
23
21
|
|
24
22
|
class Chef
|
25
23
|
class Knife
|
26
24
|
class ServerBackup < Knife
|
27
25
|
|
26
|
+
deps do
|
27
|
+
require 'fileutils'
|
28
|
+
require 'uri'
|
29
|
+
end
|
30
|
+
|
28
31
|
banner "knife server backup COMPONENT[ COMPONENT ...] (options)"
|
29
32
|
|
30
33
|
option :backup_dir,
|
@@ -17,15 +17,15 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'chef/knife'
|
20
|
-
require 'knife/server/ec2_security_group'
|
21
|
-
require 'knife/server/ssh'
|
22
|
-
require 'knife/server/credentials'
|
23
20
|
|
24
21
|
class Chef
|
25
22
|
class Knife
|
26
23
|
class ServerBootstrapEc2 < Knife
|
27
24
|
|
28
25
|
deps do
|
26
|
+
require 'knife/server/ec2_security_group'
|
27
|
+
require 'knife/server/ssh'
|
28
|
+
require 'knife/server/credentials'
|
29
29
|
require 'chef/knife/ec2_server_create'
|
30
30
|
require 'fog'
|
31
31
|
require 'net/ssh'
|
data/lib/knife/server/version.rb
CHANGED