cluster_chef-knife 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -72,26 +72,26 @@ Dir[File.join('tasks', '*.rake')].sort.each{|f| load(f) }
72
72
  Jeweler::RubygemsDotOrgTasks.new
73
73
  end
74
74
 
75
- # # ---------------------------------------------------------------------------
76
- # #
77
- # # RSpec -- testing
78
- # #
79
- # RSpec::Core::RakeTask.new(:spec) do |spec|
80
- # spec.pattern = FileList['spec/**/*_spec.rb']
81
- # end
75
+ # ---------------------------------------------------------------------------
76
+ #
77
+ # RSpec -- testing
82
78
  #
83
- # RSpec::Core::RakeTask.new(:rcov) do |spec|
84
- # spec.pattern = 'spec/**/*_spec.rb'
85
- # spec.rcov = true
86
- # spec.rcov_opts = %w[ --exclude .rvm --no-comments --text-summary]
87
- # end
79
+ RSpec::Core::RakeTask.new(:spec) do |spec|
80
+ spec.pattern = FileList['spec/**/*_spec.rb']
81
+ end
82
+
83
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
84
+ spec.pattern = 'spec/**/*_spec.rb'
85
+ spec.rcov = true
86
+ spec.rcov_opts = %w[ --exclude .rvm --no-comments --text-summary]
87
+ end
88
88
 
89
- # # ---------------------------------------------------------------------------
90
- # #
91
- # # Yard -- documentation
92
- # #
93
- # YARD::Rake::YardocTask.new
89
+ # ---------------------------------------------------------------------------
94
90
  #
95
- # # ---------------------------------------------------------------------------
91
+ # Yard -- documentation
96
92
  #
97
- # task :default => :spec
93
+ YARD::Rake::YardocTask.new
94
+
95
+ # ---------------------------------------------------------------------------
96
+
97
+ task :default => :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.7
1
+ 3.0.8
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "cluster_chef-knife"
8
- s.version = "3.0.7"
8
+ s.version = "3.0.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Infochimps"]
12
- s.date = "2011-12-13"
12
+ s.date = "2011-12-14"
13
13
  s.description = "cluster_chef allows you to orchestrate not just systems but clusters of machines. It includes a powerful layer on top of knife and a collection of cloud cookbooks."
14
14
  s.email = "coders@infochimps.com"
15
15
  s.extra_rdoc_files = [
@@ -43,9 +43,14 @@ class Chef
43
43
  :long => "--sudo",
44
44
  :description => "Execute the bootstrap via sudo",
45
45
  :boolean => true
46
+ option :host_key_verify,
47
+ :long => "--[no-]host-key-verify",
48
+ :description => "Verify host key, enabled by default.",
49
+ :boolean => true,
50
+ :default => true
46
51
 
47
52
  import_banner_and_options(Chef::Knife::Bootstrap,
48
- :except => [:chef_node_name, :run_list, :ssh_user, :distro, :template_file])
53
+ :except => [:chef_node_name, :run_list, :ssh_user, :distro, :template_file, :no_host_key_verify, :host_key_verify])
49
54
  import_banner_and_options(ClusterChef::Script)
50
55
 
51
56
  deps do
@@ -31,7 +31,7 @@ class Chef
31
31
  end
32
32
 
33
33
  banner "knife cluster launch CLUSTER_NAME [FACET_NAME [INDEXES]] (options)"
34
- [ :ssh_port, :ssh_password, :identity_file, :use_sudo, :no_host_key_verify,
34
+ [ :ssh_port, :ssh_password, :identity_file, :use_sudo,
35
35
  :prerelease, :bootstrap_version, :template_file,
36
36
  ].each do |name|
37
37
  option name, Chef::Knife::Bootstrap.options[name]
@@ -58,6 +58,11 @@ class Chef
58
58
  :description => "If bootstrap is invoked, the bootstrap script causes an initial run of chef-client (default true).",
59
59
  :boolean => true,
60
60
  :default => true
61
+ option :host_key_verify,
62
+ :long => "--[no-]host-key-verify",
63
+ :description => "Verify host key, enabled by default.",
64
+ :boolean => true,
65
+ :default => true
61
66
 
62
67
  def run
63
68
  load_cluster_chef
@@ -61,22 +61,23 @@ class Chef
61
61
  end
62
62
 
63
63
  def command_for_target(svr)
64
- config[:attribute] ||= Chef::Config[:knife][:ssh_address_attribute] || "fqdn"
65
- config[:ssh_user] ||= Chef::Config[:knife][:ssh_user]
66
- config[:identity_file] ||= svr.cloud.ssh_identity_file
64
+ config[:attribute] ||= Chef::Config[:knife][:ssh_address_attribute] || "fqdn"
65
+ config[:ssh_user] ||= Chef::Config[:knife][:ssh_user]
66
+ config[:identity_file] ||= svr.cloud.ssh_identity_file
67
+ config[:host_key_verify] ||= Chef::Config[:knife][:host_key_verify] || (not config[:no_host_key_verify]) # pre-vs-post 0.10.4
67
68
 
68
69
  if (svr.cloud.public_ip) then address = svr.cloud.public_ip ; end
69
70
  if (not address) && (svr.chef_node) then address = format_for_display( svr.chef_node )[config[:attribute]] ; end
70
71
  if (not address) && (svr.fog_server) then address = svr.fog_server.public_ip_address ; end
71
72
 
72
73
  cmd = [ 'ssh', '-N' ]
73
- cmd += [ '-D', config[:socks_port].to_s ]
74
- cmd += [ '-i', config[:identity_file] ] if config[:identity_file].present?
75
- cmd += [ '-p', config[:port].to_s ] if config[:port].present?
76
- cmd << '-f' if config[:background]
77
- cmd << "-#{'v' * config[:verbosity]}" if (config[:verbosity] > 0)
78
- cmd += %w[ -o StrictHostKeyChecking=no ] if config[:no_host_key_verify]
74
+ cmd += [ '-D', config[:socks_port].to_s ]
75
+ cmd += [ '-p', config[:port].to_s ] if config[:port].present?
76
+ cmd << '-f' if config[:background]
77
+ cmd << "-#{'v' * config[:verbosity].to_i}" if (config[:verbosity].to_i > 0)
78
+ cmd += %w[ -o StrictHostKeyChecking=no ] if config[:host_key_verify]
79
79
  cmd += %w[ -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ControlPath=none ]
80
+ cmd += [ '-i', File.expand_path(config[:identity_file]) ] if config[:identity_file].present?
80
81
  cmd << (config[:ssh_user] ? "#{config[:ssh_user]}@#{address}" : address)
81
82
 
82
83
  Chef::Log.debug("Cluster proxy config: #{config.inspect}")
@@ -86,6 +87,7 @@ class Chef
86
87
  "for", ui.color(svr.name, :cyan),
87
88
  "(#{address})"
88
89
  ].join(" "))
90
+
89
91
  cmd
90
92
  end
91
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cluster_chef-knife
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-13 00:00:00.000000000 Z
12
+ date: 2011-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chef
16
- requirement: &70278723207440 !ruby/object:Gem::Requirement
16
+ requirement: &70174880466240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70278723207440
24
+ version_requirements: *70174880466240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: fog
27
- requirement: &70278723223240 !ruby/object:Gem::Requirement
27
+ requirement: &70174880464680 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.1
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70278723223240
35
+ version_requirements: *70174880464680
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: formatador
38
- requirement: &70278723222620 !ruby/object:Gem::Requirement
38
+ requirement: &70174880479940 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70278723222620
46
+ version_requirements: *70174880479940
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: gorillib
49
- requirement: &70278723222040 !ruby/object:Gem::Requirement
49
+ requirement: &70174880477380 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.1.7
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70278723222040
57
+ version_requirements: *70174880477380
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: bundler
60
- requirement: &70278723221440 !ruby/object:Gem::Requirement
60
+ requirement: &70174880475480 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70278723221440
68
+ version_requirements: *70174880475480
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &70278723219280 !ruby/object:Gem::Requirement
71
+ requirement: &70174880473820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '1.6'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70278723219280
79
+ version_requirements: *70174880473820
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec
82
- requirement: &70278723217920 !ruby/object:Gem::Requirement
82
+ requirement: &70174880472800 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '2.5'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70278723217920
90
+ version_requirements: *70174880472800
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: yard
93
- requirement: &70278723216740 !ruby/object:Gem::Requirement
93
+ requirement: &70174880488500 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0.6'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70278723216740
101
+ version_requirements: *70174880488500
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: configliere
104
- requirement: &70278723215720 !ruby/object:Gem::Requirement
104
+ requirement: &70174880487740 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: 0.4.8
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70278723215720
112
+ version_requirements: *70174880487740
113
113
  description: cluster_chef allows you to orchestrate not just systems but clusters
114
114
  of machines. It includes a powerful layer on top of knife and a collection of cloud
115
115
  cookbooks.
@@ -176,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  segments:
178
178
  - 0
179
- hash: 2985633027269319547
179
+ hash: -3376503058401634367
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  none: false
182
182
  requirements: