rubber 1.6.1 → 1.6.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/CHANGELOG +7 -0
- data/VERSION +1 -1
- data/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +1 -1
- data/generators/vulcanize/templates/base/config/rubber/rubber.yml +3 -3
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber-rvm.yml +1 -1
- data/lib/generators/vulcanize/templates/base/config/rubber/rubber.yml +3 -3
- data/lib/rubber.rb +10 -7
- data/lib/rubber/recipes/rubber/instances.rb +23 -21
- metadata +4 -4
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.2
|
@@ -12,7 +12,7 @@
|
|
12
12
|
packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, zlib1g-dev, libssl-dev, libreadline5-dev, libxml2-dev]
|
13
13
|
|
14
14
|
# REQUIRED: the version of rvm itself
|
15
|
-
rvm_version: 1.0.
|
15
|
+
rvm_version: 1.0.11
|
16
16
|
|
17
17
|
# REQUIRED: Set to the rvm version string for the ruby version you wish to use
|
18
18
|
# Run "rvm list known" to see the list of possible options
|
@@ -75,12 +75,12 @@ cloud_providers:
|
|
75
75
|
|
76
76
|
# REQUIRED: the ami and instance type for creating instances
|
77
77
|
# The Ubuntu images at http://alestic.com/ work well
|
78
|
-
# Ubuntu 10.04 Lucid base install 32-bit ami-
|
79
|
-
# Ubuntu 10.04 Lucid base install 64-bit ami-
|
78
|
+
# Ubuntu 10.04 Lucid base install 32-bit ami-6407f20d
|
79
|
+
# Ubuntu 10.04 Lucid base install 64-bit ami-ac07f2c5
|
80
80
|
#
|
81
81
|
# m1.small or m1.large or m1.xlarge
|
82
82
|
image_type: m1.small
|
83
|
-
image_id: "#{ %w{m1.small c1.medium}.include?(image_type) ? 'ami-
|
83
|
+
image_id: "#{ %w{m1.small c1.medium}.include?(image_type) ? 'ami-6407f20d' : 'ami-ac07f2c5' }"
|
84
84
|
|
85
85
|
# OPTIONAL: EC2 spot instance request support.
|
86
86
|
#
|
@@ -12,7 +12,7 @@
|
|
12
12
|
packages: [build-essential, git-core, subversion, curl, autoconf, bison, ruby, zlib1g-dev, libssl-dev, libreadline5-dev, libxml2-dev]
|
13
13
|
|
14
14
|
# REQUIRED: the version of rvm itself
|
15
|
-
rvm_version: 1.0.
|
15
|
+
rvm_version: 1.0.11
|
16
16
|
|
17
17
|
# REQUIRED: Set to the rvm version string for the ruby version you wish to use
|
18
18
|
# Run "rvm list known" to see the list of possible options
|
@@ -75,12 +75,12 @@ cloud_providers:
|
|
75
75
|
|
76
76
|
# REQUIRED: the ami and instance type for creating instances
|
77
77
|
# The Ubuntu images at http://alestic.com/ work well
|
78
|
-
# Ubuntu 10.04 Lucid base install 32-bit ami-
|
79
|
-
# Ubuntu 10.04 Lucid base install 64-bit ami-
|
78
|
+
# Ubuntu 10.04 Lucid base install 32-bit ami-6407f20d
|
79
|
+
# Ubuntu 10.04 Lucid base install 64-bit ami-ac07f2c5
|
80
80
|
#
|
81
81
|
# m1.small or m1.large or m1.xlarge
|
82
82
|
image_type: m1.small
|
83
|
-
image_id: "#{ %w{m1.small c1.medium}.include?(image_type) ? 'ami-
|
83
|
+
image_id: "#{ %w{m1.small c1.medium}.include?(image_type) ? 'ami-6407f20d' : 'ami-ac07f2c5' }"
|
84
84
|
|
85
85
|
# OPTIONAL: EC2 spot instance request support.
|
86
86
|
#
|
data/lib/rubber.rb
CHANGED
@@ -12,6 +12,15 @@ module Rubber
|
|
12
12
|
Object.const_set('RUBBER_ENV', project_env)
|
13
13
|
Object.const_set('RUBBER_ROOT', File.expand_path(project_root))
|
14
14
|
|
15
|
+
if ! defined?(Rails) && ! Rubber::Util::is_bundler?
|
16
|
+
# pull in basic rails env. rubber only needs RAILS_ROOT and RAILS_ENV.
|
17
|
+
# We actually do NOT want the entire rails environment because it
|
18
|
+
# complicates bootstrap (i.e. can't run config to create db because full
|
19
|
+
# rails env needs db to exist as some plugin accesses model or something)
|
20
|
+
rails_boot_file = File.join(RUBBER_ROOT, 'config', 'boot.rb')
|
21
|
+
require(rails_boot_file) if File.exists? rails_boot_file
|
22
|
+
end
|
23
|
+
|
15
24
|
if defined?(Rails.logger) && Rails.logger
|
16
25
|
@@logger = Rails.logger
|
17
26
|
else
|
@@ -58,10 +67,4 @@ require 'rubber/generator'
|
|
58
67
|
require 'rubber/instance'
|
59
68
|
require 'rubber/util'
|
60
69
|
require 'rubber/cloud'
|
61
|
-
require 'rubber/dns'
|
62
|
-
|
63
|
-
if Rubber::Util::is_rails3?
|
64
|
-
module Rubber
|
65
|
-
require 'rubber/railtie'
|
66
|
-
end
|
67
|
-
end
|
70
|
+
require 'rubber/dns'
|
@@ -243,19 +243,21 @@ namespace :rubber do
|
|
243
243
|
instance_item.platform = instance[:platform]
|
244
244
|
rubber_instances.save()
|
245
245
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
246
|
+
unless instance_item.windows?
|
247
|
+
# weird cap/netssh bug, sometimes just hangs forever on initial connect, so force a timeout
|
248
|
+
begin
|
249
|
+
Timeout::timeout(30) do
|
250
|
+
# turn back on root ssh access if we are using root as the capistrano user for connecting
|
251
|
+
enable_root_ssh(instance_item.external_ip, fetch(:initial_ssh_user, 'ubuntu')) if user == 'root'
|
252
|
+
# force a connection so if above isn't enabled we still timeout if initial connection hangs
|
253
|
+
direct_connection(instance_item.external_ip) do
|
254
|
+
run "echo"
|
255
|
+
end
|
254
256
|
end
|
257
|
+
rescue Timeout::Error
|
258
|
+
logger.info "timeout in initial connect, retrying"
|
259
|
+
retry
|
255
260
|
end
|
256
|
-
rescue Timeout::Error
|
257
|
-
logger.info "timeout in initial connect, retrying"
|
258
|
-
retry
|
259
261
|
end
|
260
262
|
|
261
263
|
# setup amazon elastic ips if configured to do so
|
@@ -268,20 +270,20 @@ namespace :rubber do
|
|
268
270
|
# re-load the roles since we may have just defined new ones
|
269
271
|
load_roles() unless env.disable_auto_roles
|
270
272
|
|
271
|
-
#
|
272
|
-
#
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
273
|
+
# There's no good way to get the internal IP for a Windows host, so just set it to the external
|
274
|
+
# and let the router handle mapping to the internal network.
|
275
|
+
if instance_item.windows?
|
276
|
+
instance_item.internal_ip = instance_item.external_ip
|
277
|
+
else
|
278
|
+
# Connect to newly created instance and grab its internal ip
|
279
|
+
# so that we can update all aliases
|
280
|
+
direct_connection(instance_item.external_ip) do
|
279
281
|
instance_item.internal_ip = capture(print_ip_command).strip
|
280
282
|
end
|
281
|
-
|
282
|
-
rubber_instances.save()
|
283
283
|
end
|
284
284
|
|
285
|
+
rubber_instances.save()
|
286
|
+
|
285
287
|
# Add the aliases for this instance to all other hosts
|
286
288
|
setup_remote_aliases
|
287
289
|
setup_dns_aliases
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 1.6.
|
9
|
+
- 2
|
10
|
+
version: 1.6.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Conway
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-27 00:00:00 -04:00
|
19
19
|
default_executable: vulcanize
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|