knife-ec-backup 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -3
- data/lib/knife_ec_backup/version.rb +1 -1
- metadata +2 -59
- data/lib/chef/org_id_cache.rb~ +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a187d7821b4df5f920077d6296c577072aa75bce
|
4
|
+
data.tar.gz: f4390e3df7e068abf0ef5006e635af57d3d00d68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e084402900350853c0fd70e83727c69d5c7dd8d13bc9a823d8582a8c957f999a4d94b1b73cba0730a22b65d598f440e09e95c0c37f230f6dc01013c3559a1ee
|
7
|
+
data.tar.gz: 6c5f16496c066d2004216bdaaa644a7b4dfaa7eaebd5208aff91f095b3c85893372ce3df20131f2e09f489e087ceba551984b7c41a85a466d2c411fda0ac45c6
|
data/README.md
CHANGED
@@ -31,9 +31,19 @@ the key data.
|
|
31
31
|
# Installation
|
32
32
|
|
33
33
|
## Chef Server Install (Recommended)
|
34
|
-
This will install the plugin directly on the Chef Server:
|
35
34
|
|
36
|
-
|
35
|
+
This gem is installed with chef-server-core 12.0.0 and newer.
|
36
|
+
|
37
|
+
For Private Chef 11 (or Enterprise Chef 11) you'll need to download and build
|
38
|
+
locally to get the correct dependencies, either with `git clone` or by
|
39
|
+
downloading the .zip file. Once unpacked, run:
|
40
|
+
|
41
|
+
```
|
42
|
+
/opt/opscode/embedded/bin/gem build knife-ec-backup.gemspec
|
43
|
+
/opt/opscode/embedded/bin/gem install knife-ec-backup*gem --no-ri --no-rdoc -V
|
44
|
+
```
|
45
|
+
|
46
|
+
### Note on installing with existing development tools:
|
37
47
|
|
38
48
|
The latest versions of knife-ec-backup require gems with native
|
39
49
|
extensions, thus you must install a standard build toolchain. To
|
@@ -43,10 +53,11 @@ on your system, try the following:
|
|
43
53
|
/opt/opscode/embedded/bin/gem install knife-ec-backup -- --with-pg-config=/opt/opscode/embedded/postgresql/9.2/bin/pg_config
|
44
54
|
|
45
55
|
## Build from source
|
56
|
+
|
46
57
|
Clone the git repository and run the following from inside:
|
47
58
|
|
48
59
|
gem build knife-ec-backup.gemspec
|
49
|
-
gem install knife-ec-backup
|
60
|
+
gem install knife-ec-backup*gem
|
50
61
|
|
51
62
|
# Configuration
|
52
63
|
|
@@ -78,6 +89,8 @@ The following options are supported across all subcommands:
|
|
78
89
|
|
79
90
|
## knife ec backup DEST_DIR (options)
|
80
91
|
|
92
|
+
*Path*: If you have chef-client installed as well, you may need to invoke this as `/opt/opscode/embedded/bin/knife ec backup backup`
|
93
|
+
|
81
94
|
*Options*
|
82
95
|
|
83
96
|
* `--concurrency THREAD_COUNT`:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-ec-backup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Keiser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -52,62 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '11.8'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: simplecov
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: fakefs
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
55
|
description: Backup and Restore of Enterprise Chef
|
112
56
|
email: jkeiser@opscode.com
|
113
57
|
executables: []
|
@@ -126,7 +70,6 @@ files:
|
|
126
70
|
- lib/chef/knife/ec_key_import.rb
|
127
71
|
- lib/chef/knife/ec_restore.rb
|
128
72
|
- lib/chef/org_id_cache.rb
|
129
|
-
- lib/chef/org_id_cache.rb~
|
130
73
|
- lib/chef/server.rb
|
131
74
|
- lib/chef/tsorter.rb
|
132
75
|
- lib/knife_ec_backup/version.rb
|
data/lib/chef/org_id_cache.rb~
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Steven Danna (<steve@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) 2014 Chef Software, Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
#
|
18
|
-
|
19
|
-
class OrgIdCache
|
20
|
-
class NoSuchOrg < RuntimeError; end
|
21
|
-
|
22
|
-
attr_accesor :db, :cache
|
23
|
-
def initialize(db)
|
24
|
-
@db = db
|
25
|
-
@cache = {}
|
26
|
-
end
|
27
|
-
|
28
|
-
def fetch(org_name)
|
29
|
-
if cache.key?(org_name)
|
30
|
-
cache[org_name]
|
31
|
-
else
|
32
|
-
r = db.get(:id).from(:orgs).where(:org_name => org_name)
|
33
|
-
if r.nil?
|
34
|
-
raise NoSuchOrg
|
35
|
-
else
|
36
|
-
store(org_name, r[:id])
|
37
|
-
r[:id]
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def store(org_name, org_guid)
|
43
|
-
cache[org_name] = org_guid
|
44
|
-
end
|
45
|
-
end
|