knife-nodefu 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
data/knife-nodefu.gemspec
CHANGED
@@ -100,7 +100,7 @@ class NodefuCreate < Chef::Knife
|
|
100
100
|
ui.msg("#{ui.color('Auto generated security groups',:cyan)}: #{generate_security_groups("#{base_name}#{start_range}-#{end_range}",env,domain)}")
|
101
101
|
end
|
102
102
|
|
103
|
-
config[:yes] ? user_response = 'yes' : user_response = ui.ask_question("Does this seem right to you? [y/n]").downcase
|
103
|
+
config[:yes] ? user_response = 'yes' : user_response = ui.ask_question("Does this seem right to you? [y/n] ").downcase
|
104
104
|
abort("See ya!") unless (['yes','y',].include?(user_response))
|
105
105
|
|
106
106
|
threads = []
|
@@ -137,6 +137,7 @@ class NodefuCreate < Chef::Knife
|
|
137
137
|
ec2_server_request.config[:server_connect_attribute] = node_spec['server_connect_attribute'] if node_spec['server_connect_attribute']
|
138
138
|
ec2_server_request.config[:environment] = Chef::Config[:environment]
|
139
139
|
ec2_server_request.config[:ssh_port] = "22"
|
140
|
+
ec2_server_request.config[:iam_instance_profile] = node_spec['iam_instance_profile']
|
140
141
|
threads << Thread.new(full_node_name,ec2_server_request) do |full_node_name,request|
|
141
142
|
e = nil
|
142
143
|
begin
|
@@ -175,5 +176,5 @@ class NodefuCreate < Chef::Knife
|
|
175
176
|
ui.msg(ui.color('Successful Nodes:',:green))
|
176
177
|
successful.each_pair { |k,v| ui.msg("#{k}: #{v['id']}, #{v['server'].dns_name}, #{v['server'].id}") }
|
177
178
|
end
|
178
|
-
end
|
179
|
+
end
|
179
180
|
end
|
@@ -45,25 +45,25 @@ class NodefuDestroy < Chef::Knife
|
|
45
45
|
ui.msg("#{ui.color('Nodes to be deleted:',:red)}")
|
46
46
|
pretty_print_hash nodes_to_delete
|
47
47
|
|
48
|
-
ui.msg("#{ui.color('EC2 instances to be terminated:',:red)}")
|
48
|
+
ui.msg("#{ui.color('EC2 instances to be terminated:',:red)}")
|
49
49
|
nodes_to_delete.each_pair do |name,node|
|
50
50
|
instance_id = node['ec2']['instance_id']
|
51
51
|
ui.msg("#{ui.color(name,:magenta)}: #{instance_id}")
|
52
52
|
end
|
53
|
-
|
54
|
-
config[:yes] ? user_response = 'yes' : user_response = ui.ask_question("Does this seem right to you? [y/n]").downcase
|
53
|
+
|
54
|
+
config[:yes] ? user_response = 'yes' : user_response = ui.ask_question("Does this seem right to you? [y/n] ").downcase
|
55
55
|
abort("See ya!") unless (['yes','y',].include?(user_response))
|
56
56
|
|
57
57
|
threads = []
|
58
58
|
#Delete the ec2 server
|
59
59
|
nodes_to_delete.each_pair do |name,node|
|
60
|
-
ec2_delete = Ec2ServerDelete.new
|
60
|
+
ec2_delete = Ec2ServerDelete.new
|
61
61
|
ec2_delete.name_args[0] = node['ec2']['instance_id']
|
62
62
|
ec2_delete.config[:chef_node_name] = name
|
63
63
|
ec2_delete.config[:purge] = true
|
64
64
|
ec2_delete.config[:yes] = true
|
65
65
|
threads << Thread.new(node) { |node| ec2_delete.run }
|
66
|
-
end
|
66
|
+
end
|
67
67
|
threads.each(&:join)
|
68
68
|
end
|
69
69
|
end
|
data/lib/knife-nodefu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-nodefu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: knife-ec2
|