rubber 1.5.6 → 1.5.7

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 CHANGED
@@ -1,3 +1,19 @@
1
+ 1.5.6
2
+ -----
3
+
4
+ Merge branch 'master' of github.com:wr0ngway/rubber <9d6ca8a> [Matt Conway]
5
+ force unattended apt-get for some rare cases <94fa160> [Matt Conway]
6
+ fixed typo <2382e8d> [Matt Conway]
7
+ mongrel custom_install should be rvm agnostic <b620f71> [Matt Conway]
8
+ setup_gem_sources should precede install_gems on rvm <52f9d48> [Matt Conway]
9
+ Restore DynDNS update support <80f3c0e> [Matt Conway]
10
+ update munin conf for new ubuntu package <672db55> [Matt Conway]
11
+ exclude unneeded/large files during noscm deploy <286c8da> [Matt Conway]
12
+ Merge branch 'master' of github.com:wr0ngway/rubber <3da29cb> [Matt Conway]
13
+ use specific rvm version to stop rubber breaking everytime they change stuff <71cba60> [Matt Conway]
14
+ Don't try to set up SSH access on Windows hosts. <e1df646> [Kevin Menard]
15
+ increase ulimit for cassandra <e45bae1> [Matt Conway]
16
+
1
17
  1.5.5
2
18
  -----
3
19
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.6
1
+ 1.5.7
@@ -51,6 +51,7 @@ module Rubber
51
51
  # dest_file (if not nil) before returning it
52
52
  def transform(src_data, options={})
53
53
  config = ConfigDescriptor.new
54
+ config.generator = self
54
55
 
55
56
  # for development/test, if we have a fake root, echo any
56
57
  # calls to system
@@ -183,6 +184,9 @@ module Rubber
183
184
  # options passed in through code
184
185
  attr_accessor :options
185
186
 
187
+ # allow access to calling generator so can determine stuff like fake_root
188
+ attr_accessor :generator
189
+
186
190
  def initialize
187
191
  @backup = true
188
192
  end
@@ -216,62 +216,9 @@ namespace :rubber do
216
216
  while true do
217
217
  print "."
218
218
  sleep 2
219
- instance = cloud.describe_instances(instance_id).first
220
-
221
- if instance[:state] == "running"
222
- print "\n"
223
- logger.info "Instance running, fetching hostname/ip data"
224
- instance_item.external_host = instance[:external_host]
225
- instance_item.external_ip = instance[:external_ip]
226
- instance_item.internal_host = instance[:internal_host]
227
- instance_item.zone = instance[:zone]
228
- instance_item.platform = instance[:platform]
229
- rubber_instances.save()
230
-
231
- # turn back on root ssh access if we are using root as the capistrano user for connecting
232
- enable_root_ssh(instance_item.external_ip, fetch(:initial_ssh_user, 'ubuntu')) if (user == 'root' && ! instance_item.windows?)
233
-
234
- # setup amazon elastic ips if configured to do so
235
- setup_static_ips
236
-
237
- # Need to setup aliases so ssh doesn't give us errors when we
238
- # later try? to connect to same ip but using alias
239
- setup_local_aliases
240
-
241
- # re-load the roles since we may have just defined new ones
242
- load_roles() unless env.disable_auto_roles
243
-
244
- # Connect to newly created instance and grab its internal ip
245
- # so that we can update all aliases
246
-
247
- task :_get_ip, :hosts => instance_item.external_ip do
248
- # There's no good way to get the internal IP for a Windows host, so just set it to the external
249
- # and let the router handle mapping to the internal network.
250
- if instance_item.windows?
251
- instance_item.internal_ip = instance_item.external_ip
252
- else
253
- instance_item.internal_ip = capture(print_ip_command).strip
254
- end
255
-
256
- rubber_instances.save()
257
- end
258
-
259
- # even though instance is running, sometimes ssh hasn't started yet,
260
- # so retry on connect failure
261
- begin
262
- _get_ip
263
- rescue ConnectionError
264
- sleep 2
265
- logger.info "Failed to connect to #{instance_alias} (#{instance_item.external_ip}), retrying"
266
- retry
267
- end
268
219
 
269
- # Add the aliases for this instance to all other hosts
270
- setup_remote_aliases
271
- setup_dns_aliases
220
+ break if refresh_instance(instance_alias)
272
221
 
273
- break
274
- end
275
222
  end
276
223
  end
277
224
 
@@ -283,19 +230,21 @@ namespace :rubber do
283
230
  fatal "Instance does not exist: #{instance_alias}" if ! instance_item
284
231
 
285
232
  env = rubber_cfg.environment.bind(instance_item.role_names, instance_alias)
286
-
287
- instance = cloud.describe_instances(instance_item.instance_id).first
233
+
234
+ instance = cloud.describe_instances(instance_item.instance_id).first rescue {}
288
235
 
289
236
  if instance[:state] == "running"
290
- logger.info "\nInstance running, fetching hostname/ip data"
237
+ print "\n"
238
+ logger.info "Instance running, fetching hostname/ip data"
291
239
  instance_item.external_host = instance[:external_host]
292
240
  instance_item.external_ip = instance[:external_ip]
293
241
  instance_item.internal_host = instance[:internal_host]
294
242
  instance_item.zone = instance[:zone]
295
243
  instance_item.platform = instance[:platform]
244
+ rubber_instances.save()
296
245
 
297
246
  # turn back on root ssh access if we are using root as the capistrano user for connecting
298
- enable_root_ssh(instance_item.external_ip, fetch(:initial_ssh_user, 'ubuntu')) if user == 'root'
247
+ enable_root_ssh(instance_item.external_ip, fetch(:initial_ssh_user, 'ubuntu')) if (user == 'root' && ! instance_item.windows?)
299
248
 
300
249
  # setup amazon elastic ips if configured to do so
301
250
  setup_static_ips
@@ -317,6 +266,8 @@ namespace :rubber do
317
266
  else
318
267
  instance_item.internal_ip = capture(print_ip_command).strip
319
268
  end
269
+
270
+ rubber_instances.save()
320
271
  end
321
272
 
322
273
  # even though instance is running, sometimes ssh hasn't started yet,
@@ -333,7 +284,10 @@ namespace :rubber do
333
284
  # Add the aliases for this instance to all other hosts
334
285
  setup_remote_aliases
335
286
  setup_dns_aliases
287
+
288
+ return true
336
289
  end
290
+ return false
337
291
  end
338
292
 
339
293
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 5
8
- - 6
9
- version: 1.5.6
8
+ - 7
9
+ version: 1.5.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Conway
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-01 00:00:00 -04:00
17
+ date: 2010-07-07 00:00:00 -04:00
18
18
  default_executable: vulcanize
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency