ironfan 4.9.2 → 4.9.3
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.
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/ironfan.gemspec +2 -2
- data/lib/chef/knife/cluster_launch.rb +4 -10
- data/lib/ironfan/provider/ec2/machine.rb +5 -5
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.9.
|
|
1
|
+
4.9.3
|
data/ironfan.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "ironfan"
|
|
8
|
-
s.version = "4.9.
|
|
8
|
+
s.version = "4.9.3"
|
|
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 = "2013-04-
|
|
12
|
+
s.date = "2013-04-16"
|
|
13
13
|
s.description = "Ironfan 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 = [
|
|
@@ -95,12 +95,12 @@ class Chef
|
|
|
95
95
|
# As each server finishes, configure it
|
|
96
96
|
Ironfan.parallel(launched) do |computer|
|
|
97
97
|
if (computer.is_a?(Exception)) then ui.warn "Error launching #{computer.inspect}; skipping after-launch tasks."; next; end
|
|
98
|
-
Ironfan.step(computer.name, 'launching', :white)
|
|
99
98
|
perform_after_launch_tasks(computer)
|
|
100
99
|
end
|
|
101
100
|
|
|
102
101
|
if healthy?
|
|
103
|
-
|
|
102
|
+
section('All computers launched correctly', :white)
|
|
103
|
+
section('Applying aggregations:')
|
|
104
104
|
all_computers(*@name_args).aggregate
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -108,23 +108,17 @@ class Chef
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def perform_after_launch_tasks(computer)
|
|
111
|
-
Ironfan.step(computer.name, 'waiting for ready', :white)
|
|
112
|
-
# Wait for machine creation on amazon side
|
|
113
|
-
computer.machine.wait_for{ ready? }
|
|
114
|
-
|
|
115
111
|
# Try SSH
|
|
116
112
|
unless config[:dry_run]
|
|
117
113
|
Ironfan.step(computer.name, 'trying ssh', :white)
|
|
114
|
+
# FIXME: This is EC2-specific, abstract it
|
|
118
115
|
address = computer.machine.vpc_id.nil? ? computer.machine.public_hostname : computer.machine.public_ip_address
|
|
119
116
|
nil until tcp_test_ssh(address){ sleep @initial_sleep_delay ||= 10 }
|
|
120
117
|
end
|
|
121
|
-
|
|
122
|
-
Ironfan.step(computer.name, 'final provisioning', :white)
|
|
123
|
-
computer.save
|
|
124
118
|
|
|
125
119
|
# Run Bootstrap
|
|
126
120
|
if config[:bootstrap]
|
|
127
|
-
|
|
121
|
+
Ironfan.step(computer.name, 'bootstrapping', :green)
|
|
128
122
|
run_bootstrap(computer)
|
|
129
123
|
end
|
|
130
124
|
end
|
|
@@ -172,6 +172,7 @@ module Ironfan
|
|
|
172
172
|
|
|
173
173
|
# Trying a more brute force "I tell you 3 times", to get around
|
|
174
174
|
# https://github.com/infochimps-labs/ironfan/issues/271
|
|
175
|
+
Ironfan.step(fog_server.id,"waiting for machine to be ready", :gray)
|
|
175
176
|
begin
|
|
176
177
|
fog_server.wait_for { ready? }
|
|
177
178
|
rescue Fog::Errors::Error => e
|
|
@@ -179,7 +180,8 @@ module Ironfan
|
|
|
179
180
|
raise if try > 3
|
|
180
181
|
try += 1
|
|
181
182
|
pause_for = 3 * try
|
|
182
|
-
|
|
183
|
+
Ironfan.step(fog_server.id,"rescue ##{try}, sleeping #{pause_for} seconds")
|
|
184
|
+
Ironfan.ui.debug "Error was #{e.inspect}"
|
|
183
185
|
sleep pause_for
|
|
184
186
|
retry
|
|
185
187
|
end
|
|
@@ -220,8 +222,8 @@ module Ironfan
|
|
|
220
222
|
info = [computer.name, cloud.inspect]
|
|
221
223
|
errors = {}
|
|
222
224
|
server_errors = computer.server.lint
|
|
223
|
-
errors["Unhappy Server"]
|
|
224
|
-
errors["No AMI found"]
|
|
225
|
+
errors["Unhappy Server"] = server_errors if server_errors.present?
|
|
226
|
+
errors["No AMI found"] = info if cloud.image_id.blank?
|
|
225
227
|
errors['Missing client'] = info unless computer.client?
|
|
226
228
|
errors['Missing private_key'] = computer.client unless computer.private_key
|
|
227
229
|
#
|
|
@@ -235,8 +237,6 @@ module Ironfan
|
|
|
235
237
|
cloud = computer.server.cloud(:ec2)
|
|
236
238
|
user_data_hsh = {
|
|
237
239
|
:chef_server => Chef::Config[:chef_server_url],
|
|
238
|
-
# :validation_client_name => Chef::Config[:validation_client_name],
|
|
239
|
-
#
|
|
240
240
|
:node_name => computer.name,
|
|
241
241
|
:organization => Chef::Config[:organization],
|
|
242
242
|
:cluster_name => computer.server.cluster_name,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ironfan
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.9.
|
|
4
|
+
version: 4.9.3
|
|
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-04-
|
|
12
|
+
date: 2013-04-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: chef
|
|
@@ -359,7 +359,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
359
359
|
version: '0'
|
|
360
360
|
segments:
|
|
361
361
|
- 0
|
|
362
|
-
hash:
|
|
362
|
+
hash: 3514382002150288212
|
|
363
363
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
364
364
|
none: false
|
|
365
365
|
requirements:
|