knife-solo 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +100 -53
- data/lib/chef/knife/solo_bootstrap.rb +1 -1
- data/lib/chef/knife/solo_cook.rb +27 -3
- data/lib/knife-solo/bootstraps.rb +7 -5
- data/lib/knife-solo/bootstraps/darwin.rb +1 -1
- data/lib/knife-solo/bootstraps/linux.rb +5 -1
- data/lib/knife-solo/info.rb +1 -1
- data/lib/knife-solo/node_config_command.rb +2 -1
- data/lib/knife-solo/resources/solo.rb.erb +3 -0
- data/lib/knife-solo/ssh_command.rb +27 -5
- data/lib/knife-solo/ssh_connection.rb +10 -2
- data/test/integration/debian6_bootstrap_test.rb +4 -1
- data/test/integration/debian7_knife_bootstrap_test.rb +3 -1
- data/test/node_config_command_test.rb +60 -8
- data/test/solo_bootstrap_test.rb +4 -0
- data/test/solo_cook_test.rb +77 -1
- data/test/ssh_command_test.rb +40 -1
- metadata +59 -59
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1be6240f65ce8b7255b2da87a1aadad46e91139
|
|
4
|
+
data.tar.gz: dafd0b80483566f921c9ce779fa1baa0ced57d0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d72d04c97936e105e7d60d62399ad156500843b25023f8feea4d844cd8c01720e8f612521f14697050ab0ab424e192982f941e9d8c324d82c578da64daa5f43f
|
|
7
|
+
data.tar.gz: 55556df5ca2c38708d85b384f7a8b1108638fabb2b9d35dc42a83e1b3b86eef6d72b359523d93ae9627624171ca40e5377b0319ea5a3308f680b91aed1207887
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
# 0.4.2 / 2014-06-05
|
|
2
|
+
|
|
3
|
+
## Changes and new features
|
|
4
|
+
|
|
5
|
+
* SSH agent forwarding support ([328][], [347][], [358][])
|
|
6
|
+
* SSH gateway support ([8d1f4f8][])
|
|
7
|
+
* Support non-bash shells (csh, sh, dash, bash, and fish) ([351][])
|
|
8
|
+
* Add `node_name` & `ssl_verify_mode` to `solo.rb` ([359][], [363][])
|
|
9
|
+
* Store IP address in generated node file ([360][])
|
|
10
|
+
* openSUSE 13 support ([352][])
|
|
11
|
+
* Mavericks support ([356][])
|
|
12
|
+
|
|
13
|
+
## Fixes
|
|
14
|
+
|
|
15
|
+
* Avoid Net::SSH auto-reading default openssh configs when an ssh config file is used ([341][])
|
|
16
|
+
|
|
17
|
+
## Thanks to our contributors!
|
|
18
|
+
|
|
19
|
+
* [Yuki Sonoda][yugui]
|
|
20
|
+
* [Todd Willey][xtoddx]
|
|
21
|
+
* [Andy Leonard][anl]
|
|
22
|
+
* [Robert L. Carpenter][robacarp]
|
|
23
|
+
* [alexsiri7][alexsiri7]
|
|
24
|
+
* [Ravil Bayramgalin][brainopia]
|
|
25
|
+
* [Chun-wei Kuo][Domon]
|
|
26
|
+
* [Angel Abad][angelabad]
|
|
27
|
+
|
|
28
|
+
[308]: https://github.com/matschaffer/knife-solo/issues/308
|
|
29
|
+
[328]: https://github.com/matschaffer/knife-solo/issues/328
|
|
30
|
+
[347]: https://github.com/matschaffer/knife-solo/issues/347
|
|
31
|
+
[351]: https://github.com/matschaffer/knife-solo/issues/351
|
|
32
|
+
[352]: https://github.com/matschaffer/knife-solo/issues/352
|
|
33
|
+
[358]: https://github.com/matschaffer/knife-solo/issues/358
|
|
34
|
+
[359]: https://github.com/matschaffer/knife-solo/issues/359
|
|
35
|
+
[360]: https://github.com/matschaffer/knife-solo/issues/360
|
|
36
|
+
[363]: https://github.com/matschaffer/knife-solo/issues/363
|
|
37
|
+
[356]: https://github.com/matschaffer/knife-solo/issues/356
|
|
38
|
+
[8d1f4f8]: https://github.com/matschaffer/knife-solo/commit/8d1f4f8
|
|
39
|
+
|
|
1
40
|
# 0.4.1 / 2013-12-07
|
|
2
41
|
|
|
3
42
|
## Changes and new features
|
|
@@ -402,57 +441,65 @@ And a special thanks to [Teemu Matilainen][tmatilai] who is now on the list of d
|
|
|
402
441
|
* Generate node config on prepare
|
|
403
442
|
* Cook via rsync
|
|
404
443
|
|
|
405
|
-
[ChrisLundquist]:https://github.com/ChrisLundquist
|
|
406
|
-
[DrGonzo65]:
|
|
407
|
-
[Frozenproduce]:
|
|
408
|
-
[Motiejus]:
|
|
409
|
-
[Nix-wie-weg]:
|
|
410
|
-
[TheAlphaTester]:https://github.com/TheAlphaTester
|
|
411
|
-
[TylerRick]:
|
|
412
|
-
[aaronjensen]:
|
|
413
|
-
[amoslanka]:
|
|
414
|
-
[ares]:
|
|
415
|
-
[aromarom64]:
|
|
416
|
-
[avit]:
|
|
417
|
-
[bambuchaAdm]:
|
|
418
|
-
[brynary]:
|
|
419
|
-
[btm]:
|
|
420
|
-
[dapatil]:
|
|
421
|
-
[davidsch]:
|
|
422
|
-
[deepak]:
|
|
423
|
-
[dkinzer]:
|
|
424
|
-
[dwradcliffe]:
|
|
425
|
-
[fnichol]:
|
|
426
|
-
[funglaub]:
|
|
427
|
-
[gregf]:
|
|
428
|
-
[gsterndale]:
|
|
429
|
-
[hectcastro]:
|
|
430
|
-
[hrp]:
|
|
431
|
-
[jgarber]:
|
|
432
|
-
[jgrevich]:
|
|
433
|
-
[kmdsbng]:
|
|
434
|
-
[makern]:
|
|
435
|
-
[michaelglass]:
|
|
436
|
-
[naoya]:
|
|
437
|
-
[natlownes]:
|
|
438
|
-
[patatepartie]:
|
|
439
|
-
[patcon]:
|
|
440
|
-
[pferdefleisch]:
|
|
441
|
-
[piglovesyou]:
|
|
442
|
-
[portertech]:
|
|
443
|
-
[retr0h]:
|
|
444
|
-
[rmoriz]:
|
|
445
|
-
[rosstimson]:
|
|
446
|
-
[rubiojr]:
|
|
444
|
+
[ChrisLundquist]: https://github.com/ChrisLundquist
|
|
445
|
+
[DrGonzo65]: https://github.com/DrGonzo65
|
|
446
|
+
[Frozenproduce]: https://github.com/Frozenproduce
|
|
447
|
+
[Motiejus]: https://github.com/Motiejus
|
|
448
|
+
[Nix-wie-weg]: https://github.com/Nix-wie-weg
|
|
449
|
+
[TheAlphaTester]: https://github.com/TheAlphaTester
|
|
450
|
+
[TylerRick]: https://github.com/TylerRick
|
|
451
|
+
[aaronjensen]: https://github.com/aaronjensen
|
|
452
|
+
[amoslanka]: https://github.com/amoslanka
|
|
453
|
+
[ares]: https://github.com/ares
|
|
454
|
+
[aromarom64]: https://github.com/aromarom64
|
|
455
|
+
[avit]: https://github.com/avit
|
|
456
|
+
[bambuchaAdm]: https://github.com/bambuchaAdm
|
|
457
|
+
[brynary]: https://github.com/brynary
|
|
458
|
+
[btm]: https://github.com/btm
|
|
459
|
+
[dapatil]: https://github.com/dapatil
|
|
460
|
+
[davidsch]: https://github.com/davidsch
|
|
461
|
+
[deepak]: https://github.com/deepak
|
|
462
|
+
[dkinzer]: https://github.com/dkinzer
|
|
463
|
+
[dwradcliffe]: https://github.com/dwradcliffe
|
|
464
|
+
[fnichol]: https://github.com/fnichol
|
|
465
|
+
[funglaub]: https://github.com/funglaub
|
|
466
|
+
[gregf]: https://github.com/gregf
|
|
467
|
+
[gsterndale]: https://github.com/gsterndale
|
|
468
|
+
[hectcastro]: https://github.com/hectcastro
|
|
469
|
+
[hrp]: https://github.com/hrp
|
|
470
|
+
[jgarber]: https://github.com/jgarber
|
|
471
|
+
[jgrevich]: https://github.com/jgrevich
|
|
472
|
+
[kmdsbng]: https://github.com/kmdsbng
|
|
473
|
+
[makern]: https://github.com/makern
|
|
474
|
+
[michaelglass]: https://github.com/michaelglass
|
|
475
|
+
[naoya]: https://github.com/naoya
|
|
476
|
+
[natlownes]: https://github.com/natlownes
|
|
477
|
+
[patatepartie]: https://github.com/patatepartie
|
|
478
|
+
[patcon]: https://github.com/patcon
|
|
479
|
+
[pferdefleisch]: https://github.com/pferdefleisch
|
|
480
|
+
[piglovesyou]: https://github.com/piglovesyou
|
|
481
|
+
[portertech]: https://github.com/portertech
|
|
482
|
+
[retr0h]: https://github.com/retr0h
|
|
483
|
+
[rmoriz]: https://github.com/rmoriz
|
|
484
|
+
[rosstimson]: https://github.com/rosstimson
|
|
485
|
+
[rubiojr]: https://github.com/rubiojr
|
|
447
486
|
[russellcardullo]: https://github.com/russellcardullo
|
|
448
|
-
[ryandub]:
|
|
449
|
-
[searlm]:
|
|
450
|
-
[skyeagle]:
|
|
451
|
-
[smdern]:
|
|
452
|
-
[teyrow]:
|
|
453
|
-
[tknerr]:
|
|
454
|
-
[tmatilai]:
|
|
455
|
-
[tocky]:
|
|
456
|
-
[vjpr]:
|
|
457
|
-
[zeph]:
|
|
458
|
-
[allaire]:
|
|
487
|
+
[ryandub]: https://github.com/ryandub
|
|
488
|
+
[searlm]: https://github.com/searlm
|
|
489
|
+
[skyeagle]: https://github.com/skyeagle
|
|
490
|
+
[smdern]: https://github.com/smdern
|
|
491
|
+
[teyrow]: https://github.com/teyrow
|
|
492
|
+
[tknerr]: https://github.com/tknerr
|
|
493
|
+
[tmatilai]: https://github.com/tmatilai
|
|
494
|
+
[tocky]: https://github.com/tocky
|
|
495
|
+
[vjpr]: https://github.com/vjpr
|
|
496
|
+
[zeph]: https://github.com/zeph
|
|
497
|
+
[allaire]: https://github.com/allaire
|
|
498
|
+
[yugui]: https://github.com/yugui
|
|
499
|
+
[xtoddx]: https://github.com/xtoddx
|
|
500
|
+
[anl]: https://github.com/anl
|
|
501
|
+
[robacarp]: https://github.com/robacarp
|
|
502
|
+
[alexsiri7]: https://github.com/alexsiri7
|
|
503
|
+
[brainopia]: https://github.com/brainopia
|
|
504
|
+
[Domon]: https://github.com/Domon
|
|
505
|
+
[angelabad]: https://github.com/angelabad
|
|
@@ -19,7 +19,7 @@ class Chef
|
|
|
19
19
|
|
|
20
20
|
# Use (some) options from prepare and cook commands
|
|
21
21
|
self.options = SoloPrepare.options
|
|
22
|
-
[:berkshelf, :librarian, :sync_only, :why_run].each { |opt| option opt, SoloCook.options[opt] }
|
|
22
|
+
[:berkshelf, :librarian, :sync_only, :why_run, :clean_up].each { |opt| option opt, SoloCook.options[opt] }
|
|
23
23
|
|
|
24
24
|
def run
|
|
25
25
|
validate!
|
data/lib/chef/knife/solo_cook.rb
CHANGED
|
@@ -67,6 +67,10 @@ class Chef
|
|
|
67
67
|
:long => '--provisioning-path path',
|
|
68
68
|
:description => 'Where to store kitchen data on the node'
|
|
69
69
|
|
|
70
|
+
option :clean_up,
|
|
71
|
+
:long => '--clean-up',
|
|
72
|
+
:description => 'Run the clean command after cooking'
|
|
73
|
+
|
|
70
74
|
def run
|
|
71
75
|
time('Run') do
|
|
72
76
|
|
|
@@ -89,6 +93,8 @@ class Chef
|
|
|
89
93
|
generate_solorb
|
|
90
94
|
end
|
|
91
95
|
cook unless config[:sync_only]
|
|
96
|
+
|
|
97
|
+
clean_up if config[:clean_up]
|
|
92
98
|
end
|
|
93
99
|
end
|
|
94
100
|
|
|
@@ -121,6 +127,10 @@ class Chef
|
|
|
121
127
|
upload_to_provision_path(:environment_path, 'environments')
|
|
122
128
|
end
|
|
123
129
|
|
|
130
|
+
def ssl_verify_mode
|
|
131
|
+
Chef::Config[:ssl_verify_mode] || :verify_peer
|
|
132
|
+
end
|
|
133
|
+
|
|
124
134
|
def expand_path(path)
|
|
125
135
|
Pathname.new(path).expand_path
|
|
126
136
|
end
|
|
@@ -246,8 +256,14 @@ class Chef
|
|
|
246
256
|
file.unlink
|
|
247
257
|
end
|
|
248
258
|
|
|
249
|
-
def rsync(source_path, target_path, extra_opts = '--delete')
|
|
250
|
-
|
|
259
|
+
def rsync(source_path, target_path, extra_opts = '--delete-after')
|
|
260
|
+
if config[:ssh_gateway]
|
|
261
|
+
ssh_command = "ssh -TA #{config[:ssh_gateway]} ssh -T -o StrictHostKeyChecking=no #{ssh_args}"
|
|
262
|
+
else
|
|
263
|
+
ssh_command = "ssh #{ssh_args}"
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
cmd = ['rsync', '-rL', rsync_debug, rsync_permissions, %Q{--rsh=#{ssh_command}}, extra_opts]
|
|
251
267
|
cmd += rsync_excludes.map { |ignore| "--exclude=#{ignore}" }
|
|
252
268
|
cmd << adjust_rsync_path_on_client(source_path)
|
|
253
269
|
cmd << %Q{:#{adjust_rsync_path_on_node(target_path)}}
|
|
@@ -291,10 +307,18 @@ class Chef
|
|
|
291
307
|
raise "chef-solo failed. See output above." unless result.success?
|
|
292
308
|
end
|
|
293
309
|
|
|
310
|
+
def clean_up
|
|
311
|
+
clean = SoloClean.new
|
|
312
|
+
clean.ui = ui
|
|
313
|
+
clean.name_args = @name_args
|
|
314
|
+
clean.config.merge! config
|
|
315
|
+
clean.run
|
|
316
|
+
end
|
|
317
|
+
|
|
294
318
|
protected
|
|
295
319
|
|
|
296
320
|
def patch_cookbooks_install
|
|
297
|
-
add_cookbook_path(patch_cookbooks_path)
|
|
321
|
+
add_cookbook_path(patch_cookbooks_path)
|
|
298
322
|
end
|
|
299
323
|
end
|
|
300
324
|
end
|
|
@@ -62,11 +62,13 @@ module KnifeSolo
|
|
|
62
62
|
|
|
63
63
|
def http_client_get_url(url, file)
|
|
64
64
|
stream_command <<-BASH
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
/bin/sh -c " \
|
|
66
|
+
if command -v curl >/dev/null 2>&1; then \
|
|
67
|
+
curl -L -o '#{file}' '#{url}'; \
|
|
68
|
+
else \
|
|
69
|
+
wget -O '#{file}' '#{url}'; \
|
|
70
|
+
fi; \
|
|
71
|
+
"
|
|
70
72
|
BASH
|
|
71
73
|
end
|
|
72
74
|
|
|
@@ -85,6 +85,8 @@ module KnifeSolo::Bootstraps
|
|
|
85
85
|
{:type => "debianoid_gem"}
|
|
86
86
|
when %r{Raspbian}
|
|
87
87
|
{:type => "debianoid_gem"}
|
|
88
|
+
when %r{Linux Mint}
|
|
89
|
+
{:type => "debianoid_gem"}
|
|
88
90
|
when %r{Ubuntu}i
|
|
89
91
|
{:type => (x86? ? "debianoid_omnibus" : "debianoid_gem")}
|
|
90
92
|
when %r{Linaro}
|
|
@@ -95,6 +97,8 @@ module KnifeSolo::Bootstraps
|
|
|
95
97
|
{:type => "yum_omnibus"}
|
|
96
98
|
when %r{Red Hat Enterprise}
|
|
97
99
|
{:type => "yum_omnibus"}
|
|
100
|
+
when %r{Oracle Linux Server}
|
|
101
|
+
{:type => "yum_omnibus"}
|
|
98
102
|
when %r{Enterprise Linux Enterprise Linux Server}
|
|
99
103
|
{:type => "yum_omnibus"}
|
|
100
104
|
when %r{Fedora release}
|
|
@@ -105,7 +109,7 @@ module KnifeSolo::Bootstraps
|
|
|
105
109
|
{:type => "yum_omnibus"}
|
|
106
110
|
when %r{SUSE Linux Enterprise Server 1[12]}
|
|
107
111
|
{:type => "omnibus"}
|
|
108
|
-
when %r{openSUSE
|
|
112
|
+
when %r{openSUSE 1[23]}
|
|
109
113
|
{:type => "zypper_omnibus"}
|
|
110
114
|
when %r{This is \\n\.\\O \(\\s \\m \\r\) \\t}
|
|
111
115
|
{:type => "emerge_gem"}
|
data/lib/knife-solo/info.rb
CHANGED
|
@@ -74,7 +74,8 @@ module KnifeSolo
|
|
|
74
74
|
attributes = config[:json_attributes] || config[:first_boot_attributes] || {}
|
|
75
75
|
run_list = { :run_list => config[:run_list] || [] }
|
|
76
76
|
environment = config[:environment] ? { :environment => config[:environment] } : {}
|
|
77
|
-
|
|
77
|
+
automatic = host ? { :automatic => { :ipaddress => host } } : {}
|
|
78
|
+
f.print JSON.pretty_generate(attributes.merge(run_list).merge(environment).merge(automatic))
|
|
78
79
|
end
|
|
79
80
|
end
|
|
80
81
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
node_name <%= host.inspect %>
|
|
2
|
+
|
|
1
3
|
base = File.expand_path('..', __FILE__)
|
|
2
4
|
|
|
3
5
|
nodes_path File.join(base, 'nodes')
|
|
@@ -6,6 +8,7 @@ data_bag_path File.join(base, 'data_bags')
|
|
|
6
8
|
encrypted_data_bag_secret File.join(base, 'data_bag_key')
|
|
7
9
|
environment_path File.join(base, 'environments')
|
|
8
10
|
environment <%= node_environment.inspect %>
|
|
11
|
+
ssl_verify_mode <%= ssl_verify_mode.inspect %>
|
|
9
12
|
|
|
10
13
|
cookbook_path []
|
|
11
14
|
<% cookbook_paths.each_with_index do |path, i| -%>
|
|
@@ -5,6 +5,7 @@ module KnifeSolo
|
|
|
5
5
|
def self.load_deps
|
|
6
6
|
require 'knife-solo/ssh_connection'
|
|
7
7
|
require 'net/ssh'
|
|
8
|
+
require 'net/ssh/gateway'
|
|
8
9
|
end
|
|
9
10
|
|
|
10
11
|
def self.included(other)
|
|
@@ -38,6 +39,10 @@ module KnifeSolo
|
|
|
38
39
|
:long => '--ssh-password PASSWORD',
|
|
39
40
|
:description => 'The ssh password'
|
|
40
41
|
|
|
42
|
+
option :ssh_gateway,
|
|
43
|
+
:long => '--ssh-gateway GATEWAY',
|
|
44
|
+
:description => 'The ssh gateway'
|
|
45
|
+
|
|
41
46
|
option :ssh_identity,
|
|
42
47
|
:long => '--ssh-identity FILE',
|
|
43
48
|
:description => 'Deprecated. Replaced with --identity-file.'
|
|
@@ -47,6 +52,12 @@ module KnifeSolo
|
|
|
47
52
|
:long => '--identity-file FILE',
|
|
48
53
|
:description => 'The ssh identity file'
|
|
49
54
|
|
|
55
|
+
option :forward_agent,
|
|
56
|
+
:long => '--forward-agent',
|
|
57
|
+
:description => 'Forward SSH authentication',
|
|
58
|
+
:boolean => true,
|
|
59
|
+
:default => false
|
|
60
|
+
|
|
50
61
|
option :ssh_port,
|
|
51
62
|
:short => '-p PORT',
|
|
52
63
|
:long => '--ssh-port PORT',
|
|
@@ -118,7 +129,7 @@ module KnifeSolo
|
|
|
118
129
|
end
|
|
119
130
|
|
|
120
131
|
def try_connection
|
|
121
|
-
|
|
132
|
+
ssh_connection.session do |ssh|
|
|
122
133
|
ssh.exec!("true")
|
|
123
134
|
end
|
|
124
135
|
end
|
|
@@ -132,10 +143,15 @@ module KnifeSolo
|
|
|
132
143
|
options[:port] = config[:ssh_port] if config[:ssh_port]
|
|
133
144
|
options[:password] = config[:ssh_password] if config[:ssh_password]
|
|
134
145
|
options[:keys] = [config[:identity_file]] if config[:identity_file]
|
|
146
|
+
options[:gateway] = config[:ssh_gateway] if config[:ssh_gateway]
|
|
147
|
+
options[:forward_agent] = true if config[:forward_agent]
|
|
135
148
|
if !config[:host_key_verify]
|
|
136
149
|
options[:paranoid] = false
|
|
137
150
|
options[:user_known_hosts_file] = "/dev/null"
|
|
138
151
|
end
|
|
152
|
+
# Respect users' specification of config[:ssh_config]
|
|
153
|
+
# Prevents Net::SSH itself from applying the default ssh_config files.
|
|
154
|
+
options[:config] = false
|
|
139
155
|
options
|
|
140
156
|
end
|
|
141
157
|
|
|
@@ -160,12 +176,13 @@ module KnifeSolo
|
|
|
160
176
|
host_arg = [user, host].compact.join('@')
|
|
161
177
|
config_arg = "-F #{config[:ssh_config]}" if config[:ssh_config]
|
|
162
178
|
ident_arg = "-i #{config[:identity_file]}" if config[:identity_file]
|
|
163
|
-
|
|
179
|
+
forward_arg = "-o ForwardAgent=yes" if config[:forward_agent]
|
|
180
|
+
port_arg = "-p #{config[:ssh_port]}" if config[:ssh_port]
|
|
164
181
|
knownhosts_arg = "-o UserKnownHostsFile=#{connection_options[:user_known_hosts_file]}" if config[:host_key_verify] == false
|
|
165
182
|
stricthosts_arg = "-o StrictHostKeyChecking=no" if config[:host_key_verify] == false
|
|
166
183
|
|
|
167
184
|
|
|
168
|
-
[host_arg, config_arg, ident_arg, port_arg, knownhosts_arg, stricthosts_arg].compact.join(' ')
|
|
185
|
+
[host_arg, config_arg, ident_arg, forward_arg, port_arg, knownhosts_arg, stricthosts_arg].compact.join(' ')
|
|
169
186
|
end
|
|
170
187
|
|
|
171
188
|
def sudo_command
|
|
@@ -195,7 +212,7 @@ module KnifeSolo
|
|
|
195
212
|
Chef::Log.debug("Using replacement sudo command: #{sudo_command}")
|
|
196
213
|
replacement = sudo_command
|
|
197
214
|
elsif sudo_available?
|
|
198
|
-
replacement = 'sudo -p \'knife sudo password: \''
|
|
215
|
+
replacement = 'sudo -E -p \'knife sudo password: \''
|
|
199
216
|
else
|
|
200
217
|
replacement = ''
|
|
201
218
|
end
|
|
@@ -229,10 +246,15 @@ module KnifeSolo
|
|
|
229
246
|
|
|
230
247
|
output = ui.stdout if options[:streaming]
|
|
231
248
|
|
|
232
|
-
|
|
249
|
+
|
|
250
|
+
@connection ||= ssh_connection
|
|
233
251
|
@connection.run_command(command, output)
|
|
234
252
|
end
|
|
235
253
|
|
|
254
|
+
def ssh_connection
|
|
255
|
+
SshConnection.new(host, user, connection_options, method(:password))
|
|
256
|
+
end
|
|
257
|
+
|
|
236
258
|
# Runs commands from the specified array until successful.
|
|
237
259
|
# Returns the result of the successful command or an ExecResult with
|
|
238
260
|
# exit_code 1 if all fail.
|
|
@@ -32,8 +32,16 @@ module KnifeSolo
|
|
|
32
32
|
|
|
33
33
|
attr_reader :host, :user, :connection_options
|
|
34
34
|
|
|
35
|
-
def session
|
|
36
|
-
@session ||=
|
|
35
|
+
def session(&block)
|
|
36
|
+
@session ||= begin
|
|
37
|
+
if connection_options[:gateway]
|
|
38
|
+
co = connection_options
|
|
39
|
+
gw_user,gw = co.delete(:gateway).split '@'
|
|
40
|
+
Net::SSH::Gateway.new(gw, gw_user).ssh(host, user, co, &block)
|
|
41
|
+
else
|
|
42
|
+
Net::SSH.start(host, user, connection_options, &block)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
37
45
|
end
|
|
38
46
|
|
|
39
47
|
def password
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
require 'integration_helper'
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
class Debian6BootstrapTest < IntegrationTest
|
|
4
5
|
def user
|
|
5
6
|
"admin"
|
|
6
7
|
end
|
|
7
8
|
|
|
8
9
|
def image_id
|
|
9
|
-
|
|
10
|
+
# PVM 64-bit
|
|
11
|
+
# From https://wiki.debian.org/Cloud/AmazonEC2Image/Squeeze
|
|
12
|
+
"ami-0740476e"
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def prepare_server
|
|
@@ -45,7 +45,8 @@ class NodeConfigCommandTest < TestCase
|
|
|
45
45
|
cmd = command(@host)
|
|
46
46
|
cmd.generate_node_config
|
|
47
47
|
assert cmd.node_config.exist?
|
|
48
|
-
|
|
48
|
+
|
|
49
|
+
assert_config_contains({"run_list" => []}, cmd)
|
|
49
50
|
end
|
|
50
51
|
end
|
|
51
52
|
|
|
@@ -72,7 +73,8 @@ class NodeConfigCommandTest < TestCase
|
|
|
72
73
|
in_kitchen do
|
|
73
74
|
cmd = command(@host, "--run-list=role[base],recipe[foo]")
|
|
74
75
|
cmd.generate_node_config
|
|
75
|
-
|
|
76
|
+
|
|
77
|
+
assert_config_contains({"run_list" => ["role[base]","recipe[foo]"]}, cmd)
|
|
76
78
|
end
|
|
77
79
|
end
|
|
78
80
|
|
|
@@ -81,7 +83,13 @@ class NodeConfigCommandTest < TestCase
|
|
|
81
83
|
foo_json = '"foo":{"bar":[1,2],"baz":"x"}'
|
|
82
84
|
cmd = command(@host, "--json-attributes={#{foo_json}}")
|
|
83
85
|
cmd.generate_node_config
|
|
84
|
-
|
|
86
|
+
|
|
87
|
+
expected_hash = {
|
|
88
|
+
"foo" => {"bar" => [1,2], "baz" => "x"},
|
|
89
|
+
"run_list" => []
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
assert_config_contains expected_hash, cmd
|
|
85
93
|
end
|
|
86
94
|
end
|
|
87
95
|
|
|
@@ -94,17 +102,28 @@ class NodeConfigCommandTest < TestCase
|
|
|
94
102
|
cmd.config[:json_attributes] = JSON.parse("{#{foo_json}}")
|
|
95
103
|
cmd.config[:first_boot_attributes] = JSON.parse("{#{ignored_json}}")
|
|
96
104
|
cmd.generate_node_config
|
|
97
|
-
|
|
105
|
+
|
|
106
|
+
expected_hash = {
|
|
107
|
+
"foo" => 99,
|
|
108
|
+
"run_list" => []
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
assert_config_contains expected_hash, cmd
|
|
98
112
|
end
|
|
99
113
|
end
|
|
100
114
|
|
|
101
115
|
def test_generates_a_node_config_with_specified_first_boot_attributes
|
|
102
116
|
in_kitchen do
|
|
103
|
-
foo_json = '"foo":null'
|
|
104
117
|
cmd = command(@host)
|
|
105
|
-
cmd.config[:first_boot_attributes] =
|
|
118
|
+
cmd.config[:first_boot_attributes] = {"foo"=>nil}
|
|
106
119
|
cmd.generate_node_config
|
|
107
|
-
|
|
120
|
+
|
|
121
|
+
expected_hash = {
|
|
122
|
+
"foo" => nil,
|
|
123
|
+
"run_list" => []
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
assert_config_contains expected_hash, cmd
|
|
108
127
|
end
|
|
109
128
|
end
|
|
110
129
|
|
|
@@ -114,10 +133,33 @@ class NodeConfigCommandTest < TestCase
|
|
|
114
133
|
run_list = 'recipe[baz]'
|
|
115
134
|
cmd = command(@host, "--run-list=#{run_list}", "--json-attributes={#{foo_json}}")
|
|
116
135
|
cmd.generate_node_config
|
|
117
|
-
|
|
136
|
+
|
|
137
|
+
expected_hash = {
|
|
138
|
+
"foo" => "bar",
|
|
139
|
+
"run_list" => [run_list]
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
assert_config_contains expected_hash, cmd
|
|
143
|
+
|
|
118
144
|
end
|
|
119
145
|
end
|
|
120
146
|
|
|
147
|
+
def test_generates_a_node_config_with_the_ip_address
|
|
148
|
+
in_kitchen do
|
|
149
|
+
cmd = command(@host)
|
|
150
|
+
cmd.generate_node_config
|
|
151
|
+
|
|
152
|
+
expected_hash = {
|
|
153
|
+
"automatic" => { "ipaddress" => @host }
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
assert_config_contains expected_hash, cmd
|
|
157
|
+
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
121
163
|
def test_creates_the_nodes_directory_if_needed
|
|
122
164
|
outside_kitchen do
|
|
123
165
|
cmd = command(@host, "--node-name=mynode")
|
|
@@ -126,7 +168,17 @@ class NodeConfigCommandTest < TestCase
|
|
|
126
168
|
end
|
|
127
169
|
end
|
|
128
170
|
|
|
171
|
+
private
|
|
172
|
+
|
|
129
173
|
def command(*args)
|
|
130
174
|
knife_command(DummyNodeConfigCommand, *args)
|
|
131
175
|
end
|
|
176
|
+
|
|
177
|
+
def assert_config_contains expected_hash, cmd
|
|
178
|
+
config = JSON.parse(cmd.node_config.read)
|
|
179
|
+
expected_hash.each do |k, v|
|
|
180
|
+
assert_equal v, config[k]
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
132
184
|
end
|
data/test/solo_bootstrap_test.rb
CHANGED
|
@@ -17,6 +17,10 @@ class SoloBootstrapTest < TestCase
|
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
def test_includes_clean_up_cook_option
|
|
21
|
+
assert Chef::Knife::SoloBootstrap.options.include?(:clean_up), "Should support option :clean_up"
|
|
22
|
+
end
|
|
23
|
+
|
|
20
24
|
def test_runs_prepare_and_cook
|
|
21
25
|
Chef::Knife::SoloPrepare.any_instance.expects(:run)
|
|
22
26
|
Chef::Knife::SoloCook.any_instance.expects(:run)
|
data/test/solo_cook_test.rb
CHANGED
|
@@ -4,6 +4,7 @@ require 'support/validation_helper'
|
|
|
4
4
|
|
|
5
5
|
require 'berkshelf'
|
|
6
6
|
require 'chef/cookbook/chefignore'
|
|
7
|
+
require 'chef/knife/solo_clean'
|
|
7
8
|
require 'chef/knife/solo_cook'
|
|
8
9
|
require 'fileutils'
|
|
9
10
|
require 'knife-solo/berkshelf'
|
|
@@ -33,6 +34,65 @@ class SoloCookTest < TestCase
|
|
|
33
34
|
end
|
|
34
35
|
end
|
|
35
36
|
|
|
37
|
+
def test_sets_ssl_verify_mode_returns_verify_peer_for_nil
|
|
38
|
+
Chef::Config[:ssl_verify_mode] = nil
|
|
39
|
+
assert_equal :verify_peer, command.ssl_verify_mode
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def test_sets_ssl_verify_mode
|
|
43
|
+
Chef::Config[:ssl_verify_mode] = :verify_none
|
|
44
|
+
assert_equal :verify_none, command.ssl_verify_mode
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def test_rsync_without_gateway_connection_options
|
|
48
|
+
in_kitchen do
|
|
49
|
+
|
|
50
|
+
cmd = knife_command(Chef::Knife::SoloCook)
|
|
51
|
+
cmd.expects(:system!).with('rsync',
|
|
52
|
+
'-rL',
|
|
53
|
+
'--rsh=ssh ssh_arguments',
|
|
54
|
+
'--delete-after',
|
|
55
|
+
'--exclude=revision-deploys',
|
|
56
|
+
'--exclude=tmp',
|
|
57
|
+
'--exclude=.git',
|
|
58
|
+
'--exclude=.hg',
|
|
59
|
+
'--exclude=.svn',
|
|
60
|
+
'--exclude=.bzr',
|
|
61
|
+
'source',
|
|
62
|
+
':dest')
|
|
63
|
+
|
|
64
|
+
cmd.stubs(:ssh_args => 'ssh_arguments')
|
|
65
|
+
cmd.stubs(:windows_node? => false)
|
|
66
|
+
|
|
67
|
+
cmd.rsync 'source', 'dest'
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def test_rsync_with_gateway_connection_options
|
|
72
|
+
in_kitchen do
|
|
73
|
+
|
|
74
|
+
cmd = knife_command(Chef::Knife::SoloCook)
|
|
75
|
+
cmd.config[:ssh_gateway] = 'user@gateway'
|
|
76
|
+
cmd.expects(:system!).with('rsync',
|
|
77
|
+
'-rL',
|
|
78
|
+
'--rsh=ssh -TA user@gateway ssh -T -o StrictHostKeyChecking=no ssh_arguments',
|
|
79
|
+
'--delete-after',
|
|
80
|
+
'--exclude=revision-deploys',
|
|
81
|
+
'--exclude=tmp',
|
|
82
|
+
'--exclude=.git',
|
|
83
|
+
'--exclude=.hg',
|
|
84
|
+
'--exclude=.svn',
|
|
85
|
+
'--exclude=.bzr',
|
|
86
|
+
'source',
|
|
87
|
+
':dest')
|
|
88
|
+
|
|
89
|
+
cmd.stubs(:ssh_args => 'ssh_arguments')
|
|
90
|
+
cmd.stubs(:windows_node? => false)
|
|
91
|
+
|
|
92
|
+
cmd.rsync 'source', 'dest'
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
36
96
|
def test_expanded_config_paths_returns_empty_array_for_nil
|
|
37
97
|
Chef::Config[:foo] = nil
|
|
38
98
|
assert_equal [], command.expanded_config_paths(:foo)
|
|
@@ -85,7 +145,7 @@ class SoloCookTest < TestCase
|
|
|
85
145
|
cmd.run
|
|
86
146
|
#note: cookbook_paths are in order of precedence (low->high)
|
|
87
147
|
assert_equal cmd.patch_cookbooks_path, cmd.cookbook_paths[0]
|
|
88
|
-
end
|
|
148
|
+
end
|
|
89
149
|
end
|
|
90
150
|
|
|
91
151
|
def test_does_not_run_berkshelf_if_no_berkfile
|
|
@@ -198,6 +258,22 @@ class SoloCookTest < TestCase
|
|
|
198
258
|
end
|
|
199
259
|
end
|
|
200
260
|
|
|
261
|
+
def test_runs_clean_after_cook_if_enabled_by_option
|
|
262
|
+
Chef::Knife::SoloClean.any_instance.expects(:run)
|
|
263
|
+
|
|
264
|
+
in_kitchen do
|
|
265
|
+
command("somehost", "--clean-up").run
|
|
266
|
+
end
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
def test_does_not_run_clean_after_cook_if_not_enabled_by_option
|
|
270
|
+
Chef::Knife::SoloClean.any_instance.expects(:run).never
|
|
271
|
+
|
|
272
|
+
in_kitchen do
|
|
273
|
+
command("somehost").run
|
|
274
|
+
end
|
|
275
|
+
end
|
|
276
|
+
|
|
201
277
|
def test_validates_chef_version
|
|
202
278
|
in_kitchen do
|
|
203
279
|
cmd = command("somehost")
|
data/test/ssh_command_test.rb
CHANGED
|
@@ -58,9 +58,27 @@ class SshCommandTest < TestCase
|
|
|
58
58
|
assert_equal "test", cmd.connection_options[:password]
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
def test_try_connection_without_gateway_connects_using_ssh
|
|
62
|
+
cmd = command("10.0.0.1")
|
|
63
|
+
Net::SSH.expects(:start).with(cmd.host, cmd.user, cmd.connection_options)
|
|
64
|
+
|
|
65
|
+
cmd.try_connection
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def test_try_connection_with_gateway_connects_using_ssh_gateway
|
|
69
|
+
cmd = command("10.0.0.1", "--ssh-gateway=user@gateway")
|
|
70
|
+
ssh_mock = mock 'ssh_mock'
|
|
71
|
+
Net::SSH::Gateway.expects(:new).with('gateway', 'user').returns(ssh_mock)
|
|
72
|
+
ssh_mock.expects(:ssh).with(cmd.host, cmd.user, cmd.connection_options.except(:gateway))
|
|
73
|
+
|
|
74
|
+
Net::SSH.expects(:start).never
|
|
75
|
+
|
|
76
|
+
cmd.try_connection
|
|
77
|
+
end
|
|
78
|
+
|
|
61
79
|
def test_uses_default_keys_if_conncetion_succeeds
|
|
62
80
|
cmd = command("10.0.0.1")
|
|
63
|
-
assert_equal
|
|
81
|
+
assert_equal false, cmd.connection_options[:config]
|
|
64
82
|
end
|
|
65
83
|
|
|
66
84
|
def test_uses_ssh_config_if_matched
|
|
@@ -70,6 +88,7 @@ class SshCommandTest < TestCase
|
|
|
70
88
|
assert_equal "bob", cmd.connection_options[:user]
|
|
71
89
|
assert_equal "id_rsa_bob", cmd.connection_options[:keys].first
|
|
72
90
|
assert_equal "bob", cmd.user
|
|
91
|
+
assert_equal false, cmd.connection_options[:config]
|
|
73
92
|
end
|
|
74
93
|
|
|
75
94
|
def test_handles_port_specification
|
|
@@ -88,6 +107,18 @@ class SshCommandTest < TestCase
|
|
|
88
107
|
assert_equal "/dev/null", cmd.connection_options[:user_known_hosts_file]
|
|
89
108
|
end
|
|
90
109
|
|
|
110
|
+
def test_handle_forward_agent
|
|
111
|
+
cmd = command("10.0.0.1", "--forward-agent")
|
|
112
|
+
assert_equal true, cmd.connection_options[:forward_agent]
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def test_handle_ssh_gateway
|
|
117
|
+
gateway = 'test@host.com'
|
|
118
|
+
cmd = command("10.0.0.1", "--ssh-gateway", gateway)
|
|
119
|
+
assert_equal gateway, cmd.connection_options[:gateway]
|
|
120
|
+
end
|
|
121
|
+
|
|
91
122
|
def test_handle_default_host_key_verify_is_paranoid
|
|
92
123
|
cmd = command("10.0.0.1")
|
|
93
124
|
assert_nil(cmd.connection_options[:paranoid]) # Net:SSH default is :paranoid => true
|
|
@@ -119,6 +150,14 @@ class SshCommandTest < TestCase
|
|
|
119
150
|
cmd = command("usertest@10.0.0.1", "--no-host-key-verify")
|
|
120
151
|
cmd.validate_ssh_options!
|
|
121
152
|
assert_equal "usertest@10.0.0.1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no", cmd.ssh_args
|
|
153
|
+
|
|
154
|
+
cmd = command("usertest@10.0.0.1", "--forward-agent")
|
|
155
|
+
cmd.validate_ssh_options!
|
|
156
|
+
assert_equal "usertest@10.0.0.1 -o ForwardAgent=yes", cmd.ssh_args
|
|
157
|
+
|
|
158
|
+
cmd = command("usertest@10.0.0.1", "--ssh-gateway=test@host.com")
|
|
159
|
+
cmd.validate_ssh_options!
|
|
160
|
+
assert_equal "usertest@10.0.0.1", cmd.ssh_args
|
|
122
161
|
end
|
|
123
162
|
|
|
124
163
|
def test_barks_without_atleast_a_hostname
|
metadata
CHANGED
|
@@ -1,215 +1,215 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: knife-solo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mat Schaffer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-06-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: berkshelf
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 3.0.0.beta.2
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: 3.0.0.beta.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: ffi
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - <
|
|
45
|
+
- - "<"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: 1.9.1
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - <
|
|
52
|
+
- - "<"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: 1.9.1
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: fog
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: librarian-chef
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: minitest
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - ~>
|
|
87
|
+
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
89
|
version: '4.7'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - ~>
|
|
94
|
+
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '4.7'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: mocha
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- -
|
|
101
|
+
- - ">="
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
103
|
version: '0'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
|
-
- -
|
|
108
|
+
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: parallel
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
|
-
- -
|
|
115
|
+
- - ">="
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
117
|
version: '0'
|
|
118
118
|
type: :development
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
|
-
- -
|
|
122
|
+
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
126
|
name: rake
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
|
-
- -
|
|
129
|
+
- - ">="
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
131
|
version: '0'
|
|
132
132
|
type: :development
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
|
-
- -
|
|
136
|
+
- - ">="
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
140
|
name: rdoc
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
|
-
- - ~>
|
|
143
|
+
- - "~>"
|
|
144
144
|
- !ruby/object:Gem::Version
|
|
145
145
|
version: '3.12'
|
|
146
146
|
type: :development
|
|
147
147
|
prerelease: false
|
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
|
-
- - ~>
|
|
150
|
+
- - "~>"
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '3.12'
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
154
|
name: coveralls
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements:
|
|
157
|
-
- -
|
|
157
|
+
- - ">="
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
159
|
version: '0'
|
|
160
160
|
type: :development
|
|
161
161
|
prerelease: false
|
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
163
|
requirements:
|
|
164
|
-
- -
|
|
164
|
+
- - ">="
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
168
|
name: chef
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
|
-
- -
|
|
171
|
+
- - ">="
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
173
|
version: '10.12'
|
|
174
174
|
type: :runtime
|
|
175
175
|
prerelease: false
|
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
|
-
- -
|
|
178
|
+
- - ">="
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
180
|
version: '10.12'
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
182
|
name: net-ssh
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
|
-
- -
|
|
185
|
+
- - ">="
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
187
|
version: 2.2.2
|
|
188
|
-
- - <
|
|
188
|
+
- - "<"
|
|
189
189
|
- !ruby/object:Gem::Version
|
|
190
190
|
version: '3.0'
|
|
191
191
|
type: :runtime
|
|
192
192
|
prerelease: false
|
|
193
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
194
194
|
requirements:
|
|
195
|
-
- -
|
|
195
|
+
- - ">="
|
|
196
196
|
- !ruby/object:Gem::Version
|
|
197
197
|
version: 2.2.2
|
|
198
|
-
- - <
|
|
198
|
+
- - "<"
|
|
199
199
|
- !ruby/object:Gem::Version
|
|
200
200
|
version: '3.0'
|
|
201
201
|
- !ruby/object:Gem::Dependency
|
|
202
202
|
name: erubis
|
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
|
204
204
|
requirements:
|
|
205
|
-
- - ~>
|
|
205
|
+
- - "~>"
|
|
206
206
|
- !ruby/object:Gem::Version
|
|
207
207
|
version: 2.7.0
|
|
208
208
|
type: :runtime
|
|
209
209
|
prerelease: false
|
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
|
211
211
|
requirements:
|
|
212
|
-
- - ~>
|
|
212
|
+
- - "~>"
|
|
213
213
|
- !ruby/object:Gem::Version
|
|
214
214
|
version: 2.7.0
|
|
215
215
|
description: Handles bootstrapping, running chef solo, rsyncing cookbooks etc
|
|
@@ -218,7 +218,7 @@ executables: []
|
|
|
218
218
|
extensions: []
|
|
219
219
|
extra_rdoc_files: []
|
|
220
220
|
files:
|
|
221
|
-
- .coveralls.yml
|
|
221
|
+
- ".coveralls.yml"
|
|
222
222
|
- CHANGELOG.md
|
|
223
223
|
- LICENSE
|
|
224
224
|
- README.rdoc
|
|
@@ -248,6 +248,29 @@ files:
|
|
|
248
248
|
- lib/knife-solo/librarian.rb
|
|
249
249
|
- lib/knife-solo/node_config_command.rb
|
|
250
250
|
- lib/knife-solo/resources/knife.rb
|
|
251
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/.travis.yml
|
|
252
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/CHANGELOG
|
|
253
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/LICENSE
|
|
254
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/NOTICE
|
|
255
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/README.md
|
|
256
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search.rb
|
|
257
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/overrides.rb
|
|
258
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb
|
|
259
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene.treetop
|
|
260
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb
|
|
261
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/query_transform.rb
|
|
262
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/metadata.rb
|
|
263
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/recipes/default.rb
|
|
264
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/Gemfile
|
|
265
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/alpha.json
|
|
266
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/beta.json
|
|
267
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/without_json_class.json
|
|
268
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/jerry.json
|
|
269
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/lea.json
|
|
270
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/mike.json
|
|
271
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/tom.json
|
|
272
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_data_bags.rb
|
|
273
|
+
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_search.rb
|
|
251
274
|
- lib/knife-solo/resources/solo.rb.erb
|
|
252
275
|
- lib/knife-solo/ssh_command.rb
|
|
253
276
|
- lib/knife-solo/ssh_connection.rb
|
|
@@ -311,29 +334,6 @@ files:
|
|
|
311
334
|
- test/support/validation_helper.rb
|
|
312
335
|
- test/test_helper.rb
|
|
313
336
|
- test/tools_test.rb
|
|
314
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/.travis.yml
|
|
315
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/CHANGELOG
|
|
316
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/LICENSE
|
|
317
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/NOTICE
|
|
318
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/README.md
|
|
319
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search.rb
|
|
320
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/overrides.rb
|
|
321
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/search/parser.rb
|
|
322
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene.treetop
|
|
323
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/lucene_nodes.rb
|
|
324
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/libraries/vendor/chef/solr_query/query_transform.rb
|
|
325
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/metadata.rb
|
|
326
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/recipes/default.rb
|
|
327
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/Gemfile
|
|
328
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/alpha.json
|
|
329
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/beta.json
|
|
330
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/node/without_json_class.json
|
|
331
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/jerry.json
|
|
332
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/lea.json
|
|
333
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/mike.json
|
|
334
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/data/data_bags/users/tom.json
|
|
335
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_data_bags.rb
|
|
336
|
-
- lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_search.rb
|
|
337
337
|
homepage: http://matschaffer.github.io/knife-solo/
|
|
338
338
|
licenses: []
|
|
339
339
|
metadata: {}
|
|
@@ -353,17 +353,17 @@ require_paths:
|
|
|
353
353
|
- lib
|
|
354
354
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
355
355
|
requirements:
|
|
356
|
-
- -
|
|
356
|
+
- - ">="
|
|
357
357
|
- !ruby/object:Gem::Version
|
|
358
358
|
version: '0'
|
|
359
359
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
360
360
|
requirements:
|
|
361
|
-
- -
|
|
361
|
+
- - ">="
|
|
362
362
|
- !ruby/object:Gem::Version
|
|
363
363
|
version: '0'
|
|
364
364
|
requirements: []
|
|
365
365
|
rubyforge_project:
|
|
366
|
-
rubygems_version: 2.
|
|
366
|
+
rubygems_version: 2.2.2
|
|
367
367
|
signing_key:
|
|
368
368
|
specification_version: 4
|
|
369
369
|
summary: A collection of knife plugins for dealing with chef solo
|