knife-zero 1.11.0 → 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/chef/knife/zero_bootstrap.rb +5 -0
- data/lib/chef/knife/zero_converge.rb +6 -0
- data/lib/knife-zero/helper.rb +13 -0
- data/lib/knife-zero/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd069912d8b815db4d447a3d19dc88af0d6bdcc
|
4
|
+
data.tar.gz: 455e737d9d4554952467e27d9bbc746fbdece401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11a07ff246595ed09b7888e9dd00005c33c491f83bd79429803554afeaff1e295d8aff5ac5434dcb3ef353f55187495642e1fb4ada68b802856324e98119780c
|
7
|
+
data.tar.gz: e3279e6fb9437b96eb9238f749e2ce6edab7a0c49917794ecb6c2ad63ffd9da61a87b90983560cadc466a4b46fae45527bdd27abba45065b5825e4662826b975
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -32,7 +32,7 @@ Relocated: [Installation | Knife-Zero Document](http://knife-zero.github.io/10_i
|
|
32
32
|
|
33
33
|
```
|
34
34
|
** ZERO COMMANDS **
|
35
|
-
knife zero bootstrap FQDN (options)
|
35
|
+
knife zero bootstrap [SSH_USER@]FQDN (options)
|
36
36
|
knife zero chef_client QUERY (options) | It's same as converge
|
37
37
|
knife zero converge QUERY (options)
|
38
38
|
knife zero diagnose # show configuration from file
|
@@ -32,6 +32,11 @@ class Chef
|
|
32
32
|
:proc => lambda { |v| Chef::Config[:knife][:bootstrap_converge] = v }
|
33
33
|
|
34
34
|
def run
|
35
|
+
## Command hook before_bootstrap (After launched Chef-Zero)
|
36
|
+
if Chef::Config[:knife][:before_bootstrap]
|
37
|
+
::Knife::Zero::Helper.hook_shell_out!("before_bootstrap", ui, Chef::Config[:knife][:before_bootstrap])
|
38
|
+
end
|
39
|
+
|
35
40
|
if @config[:first_boot_attributes_from_file]
|
36
41
|
@config[:first_boot_attributes_from_file] = @config[:first_boot_attributes_from_file].merge(build_knifezero_attributes_for_node)
|
37
42
|
else
|
@@ -50,6 +50,12 @@ class Chef
|
|
50
50
|
def initialize(argv=[])
|
51
51
|
super
|
52
52
|
self.configure_chef
|
53
|
+
|
54
|
+
## Command hook before_converge (Before launched Chef-Zero)
|
55
|
+
if Chef::Config[:knife][:before_converge]
|
56
|
+
::Knife::Zero::Helper.hook_shell_out!("before_converge", ui, Chef::Config[:knife][:before_converge])
|
57
|
+
end
|
58
|
+
|
53
59
|
@name_args = [@name_args[0], start_chef_client]
|
54
60
|
end
|
55
61
|
|
data/lib/knife-zero/helper.rb
CHANGED
@@ -3,6 +3,9 @@ require 'open-uri'
|
|
3
3
|
module Knife
|
4
4
|
module Zero
|
5
5
|
module Helper
|
6
|
+
|
7
|
+
extend Chef::Mixin::ShellOut
|
8
|
+
|
6
9
|
def self.zero_remote_port
|
7
10
|
return ::Chef::Config[:remote_chef_zero_port] if ::Chef::Config[:remote_chef_zero_port]
|
8
11
|
chef_zero_port = ::Chef::Config[:chef_zero_port] ||
|
@@ -23,6 +26,16 @@ module Knife
|
|
23
26
|
exit
|
24
27
|
end
|
25
28
|
end
|
29
|
+
|
30
|
+
def self.hook_shell_out!(event, ui, *command_args)
|
31
|
+
ui.info ui.color("Execute command hook in #{event}.", :green)
|
32
|
+
begin
|
33
|
+
ui.info shell_out!(*command_args).stdout
|
34
|
+
rescue => e
|
35
|
+
ui.error e.inspect
|
36
|
+
raise e
|
37
|
+
end
|
38
|
+
end
|
26
39
|
end
|
27
40
|
end
|
28
41
|
end
|
data/lib/knife-zero/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sawanoboly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -197,3 +197,4 @@ specification_version: 4
|
|
197
197
|
summary: Run chef-client at remote node with chef-zero(local-mode) via HTTP over SSH
|
198
198
|
port fowarding.
|
199
199
|
test_files: []
|
200
|
+
has_rdoc:
|