dew 0.1.1 → 0.1.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.
- data/lib/dew/models/environment.rb +3 -3
- data/lib/dew/models/server.rb +3 -2
- data/lib/dew/version.rb +1 -1
- metadata +120 -50
@@ -36,9 +36,9 @@ class Environment
|
|
36
36
|
(1..profile.count).each do
|
37
37
|
environment.add_server(profile.ami, profile.size, profile.keypair, profile.security_groups)
|
38
38
|
end
|
39
|
-
|
39
|
+
|
40
40
|
environment.add_elb(profile.elb_listener_ports) if profile.has_elb?
|
41
|
-
|
41
|
+
|
42
42
|
environment.wait_until_ready
|
43
43
|
|
44
44
|
environment.configure_servers_for_database password if profile.has_rds?
|
@@ -150,7 +150,7 @@ class Environment
|
|
150
150
|
if ip_permissions.flatten.empty?
|
151
151
|
Inform.warning "Server %{id} has no ip_permissions in its security groups %{security_group_names}", :id => server.id, :security_group_names => server.groups.inspect
|
152
152
|
else
|
153
|
-
Inform.debug "Trying to connect to %{id}
|
153
|
+
Inform.debug "Trying to connect to %{id}", :id => server.id
|
154
154
|
server.wait_until_ready
|
155
155
|
end
|
156
156
|
end
|
data/lib/dew/models/server.rb
CHANGED
@@ -4,6 +4,7 @@ class Server < FogModel
|
|
4
4
|
TEN_SECONDS = 10
|
5
5
|
SIXTY_SECONDS = 60
|
6
6
|
TWO_MINUTES = 120
|
7
|
+
THREE_MINUTES = 180
|
7
8
|
RUNNING_SERVER_STATES = %w{pending running}
|
8
9
|
|
9
10
|
def self.create! ami, size, keypair, groups
|
@@ -37,7 +38,7 @@ class Server < FogModel
|
|
37
38
|
Gofer::Host.new(public_ip_address, username, :key_data => [File.read(Cloud.keyfile_path(key_name))], :paranoid => false, :quiet => true)
|
38
39
|
end
|
39
40
|
|
40
|
-
def wait_until_ready ssh_timeout=
|
41
|
+
def wait_until_ready ssh_timeout=THREE_MINUTES
|
41
42
|
super()
|
42
43
|
Inform.debug("%{id} online at %{ip}, waiting for SSH connection...", :id => id, :ip => public_ip_address)
|
43
44
|
wait_for_ssh ssh_timeout
|
@@ -122,7 +123,7 @@ class Server < FogModel
|
|
122
123
|
success = true
|
123
124
|
rescue => e
|
124
125
|
time_spent = Time.now - start_time
|
125
|
-
Inform.debug("Exception: %{m} (%{c})
|
126
|
+
Inform.debug("Exception: %{m} (%{c}) after %{time_spent}s (retrying until %{timeout}s)...", :c => e.class.to_s, :m => e.message, :time_spent => time_spent.to_i, :timeout => timeout)
|
126
127
|
sleep 1
|
127
128
|
last_exception = e
|
128
129
|
end
|
data/lib/dew/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dew
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- PlayUp Devops
|
@@ -10,8 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-06-
|
14
|
-
default_executable:
|
18
|
+
date: 2011-06-29 00:00:00 Z
|
15
19
|
dependencies:
|
16
20
|
- !ruby/object:Gem::Dependency
|
17
21
|
name: inform
|
@@ -21,7 +25,12 @@ dependencies:
|
|
21
25
|
requirements:
|
22
26
|
- - ~>
|
23
27
|
- !ruby/object:Gem::Version
|
24
|
-
|
28
|
+
hash: 23
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
- 4
|
33
|
+
version: 0.0.4
|
25
34
|
type: :runtime
|
26
35
|
version_requirements: *id001
|
27
36
|
- !ruby/object:Gem::Dependency
|
@@ -32,6 +41,11 @@ dependencies:
|
|
32
41
|
requirements:
|
33
42
|
- - ~>
|
34
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 23
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 2
|
48
|
+
- 0
|
35
49
|
version: 0.2.0
|
36
50
|
type: :runtime
|
37
51
|
version_requirements: *id002
|
@@ -43,6 +57,11 @@ dependencies:
|
|
43
57
|
requirements:
|
44
58
|
- - ~>
|
45
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 59
|
61
|
+
segments:
|
62
|
+
- 0
|
63
|
+
- 8
|
64
|
+
- 2
|
46
65
|
version: 0.8.2
|
47
66
|
type: :runtime
|
48
67
|
version_requirements: *id003
|
@@ -54,6 +73,11 @@ dependencies:
|
|
54
73
|
requirements:
|
55
74
|
- - ~>
|
56
75
|
- !ruby/object:Gem::Version
|
76
|
+
hash: 29
|
77
|
+
segments:
|
78
|
+
- 0
|
79
|
+
- 2
|
80
|
+
- 5
|
57
81
|
version: 0.2.5
|
58
82
|
type: :runtime
|
59
83
|
version_requirements: *id004
|
@@ -65,6 +89,11 @@ dependencies:
|
|
65
89
|
requirements:
|
66
90
|
- - ~>
|
67
91
|
- !ruby/object:Gem::Version
|
92
|
+
hash: 11
|
93
|
+
segments:
|
94
|
+
- 1
|
95
|
+
- 6
|
96
|
+
- 2
|
68
97
|
version: 1.6.2
|
69
98
|
type: :runtime
|
70
99
|
version_requirements: *id005
|
@@ -76,6 +105,11 @@ dependencies:
|
|
76
105
|
requirements:
|
77
106
|
- - ~>
|
78
107
|
- !ruby/object:Gem::Version
|
108
|
+
hash: 3
|
109
|
+
segments:
|
110
|
+
- 1
|
111
|
+
- 4
|
112
|
+
- 2
|
79
113
|
version: 1.4.2
|
80
114
|
type: :runtime
|
81
115
|
version_requirements: *id006
|
@@ -87,6 +121,9 @@ dependencies:
|
|
87
121
|
requirements:
|
88
122
|
- - ">="
|
89
123
|
- !ruby/object:Gem::Version
|
124
|
+
hash: 3
|
125
|
+
segments:
|
126
|
+
- 0
|
90
127
|
version: "0"
|
91
128
|
type: :runtime
|
92
129
|
version_requirements: *id007
|
@@ -98,6 +135,11 @@ dependencies:
|
|
98
135
|
requirements:
|
99
136
|
- - ~>
|
100
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 49
|
139
|
+
segments:
|
140
|
+
- 0
|
141
|
+
- 8
|
142
|
+
- 7
|
101
143
|
version: 0.8.7
|
102
144
|
type: :development
|
103
145
|
version_requirements: *id008
|
@@ -109,6 +151,11 @@ dependencies:
|
|
109
151
|
requirements:
|
110
152
|
- - ~>
|
111
153
|
- !ruby/object:Gem::Version
|
154
|
+
hash: 23
|
155
|
+
segments:
|
156
|
+
- 2
|
157
|
+
- 6
|
158
|
+
- 0
|
112
159
|
version: 2.6.0
|
113
160
|
type: :development
|
114
161
|
version_requirements: *id009
|
@@ -120,6 +167,11 @@ dependencies:
|
|
120
167
|
requirements:
|
121
168
|
- - ~>
|
122
169
|
- !ruby/object:Gem::Version
|
170
|
+
hash: 49
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
- 10
|
174
|
+
- 3
|
123
175
|
version: 0.10.3
|
124
176
|
type: :development
|
125
177
|
version_requirements: *id010
|
@@ -131,6 +183,11 @@ dependencies:
|
|
131
183
|
requirements:
|
132
184
|
- - ~>
|
133
185
|
- !ruby/object:Gem::Version
|
186
|
+
hash: 15
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
- 4
|
190
|
+
- 0
|
134
191
|
version: 0.4.0
|
135
192
|
type: :development
|
136
193
|
version_requirements: *id011
|
@@ -142,6 +199,11 @@ dependencies:
|
|
142
199
|
requirements:
|
143
200
|
- - ~>
|
144
201
|
- !ruby/object:Gem::Version
|
202
|
+
hash: 3
|
203
|
+
segments:
|
204
|
+
- 1
|
205
|
+
- 4
|
206
|
+
- 2
|
145
207
|
version: 1.4.2
|
146
208
|
type: :development
|
147
209
|
version_requirements: *id012
|
@@ -153,6 +215,9 @@ dependencies:
|
|
153
215
|
requirements:
|
154
216
|
- - ">="
|
155
217
|
- !ruby/object:Gem::Version
|
218
|
+
hash: 3
|
219
|
+
segments:
|
220
|
+
- 0
|
156
221
|
version: "0"
|
157
222
|
type: :development
|
158
223
|
version_requirements: *id013
|
@@ -168,72 +233,71 @@ extensions: []
|
|
168
233
|
extra_rdoc_files: []
|
169
234
|
|
170
235
|
files:
|
236
|
+
- lib/dew/aws_resources.yaml
|
237
|
+
- lib/dew/base_command.rb
|
238
|
+
- lib/dew/cloud.rb
|
239
|
+
- lib/dew/commands/ami.rb
|
240
|
+
- lib/dew/commands/console/irb_override.rb
|
241
|
+
- lib/dew/commands/console.rb
|
242
|
+
- lib/dew/commands/deploy/templates/apache.conf.erb
|
243
|
+
- lib/dew/commands/deploy/templates/known_hosts
|
244
|
+
- lib/dew/commands/deploy/templates/rvmrc
|
245
|
+
- lib/dew/commands/deploy.rb
|
246
|
+
- lib/dew/commands/environments.rb
|
247
|
+
- lib/dew/commands/tidy.rb
|
171
248
|
- lib/dew/commands.rb
|
249
|
+
- lib/dew/controllers/amis_controller.rb
|
172
250
|
- lib/dew/controllers/deploy_controller.rb
|
173
251
|
- lib/dew/controllers/environments_controller.rb
|
174
|
-
- lib/dew/controllers
|
175
|
-
- lib/dew/
|
252
|
+
- lib/dew/controllers.rb
|
253
|
+
- lib/dew/models/account.rb
|
254
|
+
- lib/dew/models/database.rb
|
176
255
|
- lib/dew/models/deploy/puge.rb
|
177
256
|
- lib/dew/models/deploy/run.rb
|
178
257
|
- lib/dew/models/deploy.rb
|
179
|
-
- lib/dew/models/server.rb
|
180
|
-
- lib/dew/models/profile.rb
|
181
258
|
- lib/dew/models/environment.rb
|
182
|
-
- lib/dew/models/account.rb
|
183
|
-
- lib/dew/models/database.rb
|
184
259
|
- lib/dew/models/fog_model.rb
|
260
|
+
- lib/dew/models/profile.rb
|
261
|
+
- lib/dew/models/server.rb
|
262
|
+
- lib/dew/models.rb
|
185
263
|
- lib/dew/password.rb
|
186
|
-
- lib/dew/controllers.rb
|
187
|
-
- lib/dew/commands/ami.rb
|
188
|
-
- lib/dew/commands/deploy/templates/known_hosts
|
189
|
-
- lib/dew/commands/deploy/templates/rvmrc
|
190
|
-
- lib/dew/commands/deploy/templates/apache.conf.erb
|
191
|
-
- lib/dew/commands/deploy.rb
|
192
|
-
- lib/dew/commands/environments.rb
|
193
|
-
- lib/dew/commands/console.rb
|
194
|
-
- lib/dew/commands/tidy.rb
|
195
|
-
- lib/dew/commands/console/irb_override.rb
|
196
264
|
- lib/dew/tasks/spec.rake
|
197
|
-
- lib/dew/view.rb
|
198
|
-
- lib/dew/models.rb
|
199
|
-
- lib/dew/aws_resources.yaml
|
200
|
-
- lib/dew/version.rb
|
201
265
|
- lib/dew/validations.rb
|
202
|
-
- lib/dew/
|
203
|
-
- lib/
|
266
|
+
- lib/dew/version.rb
|
267
|
+
- lib/dew/view.rb
|
204
268
|
- lib/dew.rb
|
269
|
+
- lib/tasks/spec.rake
|
205
270
|
- README.md
|
206
271
|
- LICENSE
|
207
|
-
- example/dew/
|
272
|
+
- example/dew/accounts/development.yaml
|
208
273
|
- example/dew/profiles/template.yaml
|
274
|
+
- example/dew/profiles/test-full.yaml
|
209
275
|
- example/dew/profiles/test-light.yaml
|
210
|
-
- example/dew/accounts/development.yaml
|
211
276
|
- Rakefile
|
212
|
-
- spec/dew/
|
277
|
+
- spec/dew/cloud_spec.rb
|
213
278
|
- spec/dew/controllers/amis_controller_spec.rb
|
279
|
+
- spec/dew/controllers/deploy_controller_spec.rb
|
214
280
|
- spec/dew/controllers/environments_controller_spec.rb
|
215
|
-
- spec/dew/models/
|
281
|
+
- spec/dew/models/account_spec.rb
|
282
|
+
- spec/dew/models/database_spec.rb
|
216
283
|
- spec/dew/models/deploy/puge_spec.rb
|
217
284
|
- spec/dew/models/deploy/run_spec.rb
|
218
285
|
- spec/dew/models/environment_spec.rb
|
219
286
|
- spec/dew/models/fog_model_spec.rb
|
220
|
-
- spec/dew/models/
|
287
|
+
- spec/dew/models/profile_spec.rb
|
221
288
|
- spec/dew/models/server_spec.rb
|
222
|
-
- spec/dew/models/database_spec.rb
|
223
289
|
- spec/dew/password_spec.rb
|
224
|
-
- spec/dew/cloud_spec.rb
|
225
290
|
- spec/dew/spec_helper.rb
|
226
291
|
- spec/dew/view_spec.rb
|
227
|
-
- features/support/hooks.rb
|
228
|
-
- features/support/env.rb
|
229
|
-
- features/deploy-puge.feature
|
230
|
-
- features/step_definitions/deploy-puge-steps.rb
|
231
|
-
- features/step_definitions/aws-steps.rb
|
232
292
|
- features/create-ami.feature
|
233
293
|
- features/create-environments.feature
|
294
|
+
- features/deploy-puge.feature
|
295
|
+
- features/step_definitions/aws-steps.rb
|
296
|
+
- features/step_definitions/deploy-puge-steps.rb
|
297
|
+
- features/support/env.rb
|
298
|
+
- features/support/hooks.rb
|
234
299
|
- config/cucumber.yaml
|
235
300
|
- bin/dew
|
236
|
-
has_rdoc: true
|
237
301
|
homepage: http://github.com/playup/dew
|
238
302
|
licenses: []
|
239
303
|
|
@@ -247,42 +311,48 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
247
311
|
requirements:
|
248
312
|
- - ">="
|
249
313
|
- !ruby/object:Gem::Version
|
314
|
+
hash: 3
|
315
|
+
segments:
|
316
|
+
- 0
|
250
317
|
version: "0"
|
251
318
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
252
319
|
none: false
|
253
320
|
requirements:
|
254
321
|
- - ">="
|
255
322
|
- !ruby/object:Gem::Version
|
323
|
+
hash: 3
|
324
|
+
segments:
|
325
|
+
- 0
|
256
326
|
version: "0"
|
257
327
|
requirements: []
|
258
328
|
|
259
329
|
rubyforge_project:
|
260
|
-
rubygems_version: 1.
|
330
|
+
rubygems_version: 1.7.2
|
261
331
|
signing_key:
|
262
332
|
specification_version: 3
|
263
333
|
summary: Uses fog to access the cloud
|
264
334
|
test_files:
|
265
335
|
- Rakefile
|
266
|
-
- spec/dew/
|
336
|
+
- spec/dew/cloud_spec.rb
|
267
337
|
- spec/dew/controllers/amis_controller_spec.rb
|
338
|
+
- spec/dew/controllers/deploy_controller_spec.rb
|
268
339
|
- spec/dew/controllers/environments_controller_spec.rb
|
269
|
-
- spec/dew/models/
|
340
|
+
- spec/dew/models/account_spec.rb
|
341
|
+
- spec/dew/models/database_spec.rb
|
270
342
|
- spec/dew/models/deploy/puge_spec.rb
|
271
343
|
- spec/dew/models/deploy/run_spec.rb
|
272
344
|
- spec/dew/models/environment_spec.rb
|
273
345
|
- spec/dew/models/fog_model_spec.rb
|
274
|
-
- spec/dew/models/
|
346
|
+
- spec/dew/models/profile_spec.rb
|
275
347
|
- spec/dew/models/server_spec.rb
|
276
|
-
- spec/dew/models/database_spec.rb
|
277
348
|
- spec/dew/password_spec.rb
|
278
|
-
- spec/dew/cloud_spec.rb
|
279
349
|
- spec/dew/spec_helper.rb
|
280
350
|
- spec/dew/view_spec.rb
|
281
|
-
- features/support/hooks.rb
|
282
|
-
- features/support/env.rb
|
283
|
-
- features/deploy-puge.feature
|
284
|
-
- features/step_definitions/deploy-puge-steps.rb
|
285
|
-
- features/step_definitions/aws-steps.rb
|
286
351
|
- features/create-ami.feature
|
287
352
|
- features/create-environments.feature
|
353
|
+
- features/deploy-puge.feature
|
354
|
+
- features/step_definitions/aws-steps.rb
|
355
|
+
- features/step_definitions/deploy-puge-steps.rb
|
356
|
+
- features/support/env.rb
|
357
|
+
- features/support/hooks.rb
|
288
358
|
- config/cucumber.yaml
|