axtro-rubber 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -15,8 +15,8 @@ module Rubber
15
15
  AWS::S3::Base.establish_connection!(:access_key_id => @aws_env.access_key, :secret_access_key => @aws_env.secret_access_key)
16
16
  end
17
17
 
18
- def create_instance(ami, ami_type, security_groups, availability_zone)
19
- response = @ec2.run_instances(:image_id => ami, :key_name => @aws_env.key_name, :instance_type => ami_type, :security_group => security_groups, :availability_zone => availability_zone)
18
+ def create_instance(ami, ami_type, security_groups, availability_zone, user_data = nil)
19
+ response = @ec2.run_instances(:user_data => user_data, :image_id => ami, :key_name => @aws_env.key_name, :instance_type => ami_type, :security_group => security_groups, :availability_zone => availability_zone)
20
20
  instance_id = response.instancesSet.item[0].instanceId
21
21
  return instance_id
22
22
  end
@@ -46,12 +46,6 @@ namespace :rubber do
46
46
  on :load, "rubber:init"
47
47
 
48
48
  required_task :init do
49
- # Require cap 2.4 since we depend on bugs that have been fixed
50
- require 'capistrano/version'
51
- if Capistrano::Version::MAJOR < 2 || Capistrano::Version::MINOR < 4
52
- fatal "rubber requires capistrano 2.4.0 or greater"
53
- end
54
-
55
49
  set :rubber_cfg, Rubber::Configuration.get_configuration(RUBBER_ENV)
56
50
  set :rubber_env, rubber_cfg.environment.bind()
57
51
  set :rubber_instances, rubber_cfg.instance
@@ -35,7 +35,9 @@ namespace :rubber do
35
35
  # Add in roles that the given set of roles depends on
36
36
  ir = Rubber::Configuration::RoleItem.expand_role_dependencies(ir, get_role_dependencies)
37
37
 
38
- create_instance(instance_alias, ir, create_spot_instance)
38
+ user_data = env.cloud_providers[env.cloud_provider]["user_data"]
39
+
40
+ create_instance(instance_alias, ir, create_spot_instance, user_data)
39
41
  end
40
42
 
41
43
  desc <<-DESC
@@ -156,7 +158,7 @@ namespace :rubber do
156
158
 
157
159
  # Creates a new ec2 instance with the given alias and roles
158
160
  # Configures aliases (/etc/hosts) on local and remote machines
159
- def create_instance(instance_alias, instance_roles, create_spot_instance=false)
161
+ def create_instance(instance_alias, instance_roles, create_spot_instance=false, user_data = nil)
160
162
  fatal "Instance already exists: #{instance_alias}" if rubber_instances[instance_alias]
161
163
 
162
164
  role_names = instance_roles.collect{|x| x.name}
@@ -201,7 +203,7 @@ namespace :rubber do
201
203
 
202
204
  if !create_spot_instance || (create_spot_instance && max_wait_time < 0)
203
205
  logger.info "Creating instance #{ami}/#{ami_type}/#{security_groups.join(',') rescue 'Default'}/#{availability_zone || 'Default'}"
204
- instance_id = cloud.create_instance(ami, ami_type, security_groups, availability_zone)
206
+ instance_id = cloud.create_instance(ami, ami_type, security_groups, availability_zone, user_data)
205
207
  end
206
208
 
207
209
  logger.info "Instance #{instance_id} created"
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axtro-rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 2
9
+ - 2
10
+ version: 1.2.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Matt Conway
@@ -9,79 +15,97 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-22 00:00:00 +01:00
18
+ date: 2011-05-03 00:00:00 +02:00
13
19
  default_executable: vulcanize
14
20
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: gemcutter
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - <
22
- - !ruby/object:Gem::Version
23
- version: 0.4.0
24
- version:
25
21
  - !ruby/object:Gem::Dependency
26
22
  name: capistrano
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
30
26
  requirements:
31
27
  - - ">="
32
28
  - !ruby/object:Gem::Version
33
- version: "0"
34
- version:
29
+ hash: 31
30
+ segments:
31
+ - 2
32
+ - 4
33
+ - 0
34
+ version: 2.4.0
35
+ type: :runtime
36
+ version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency
36
38
  name: amazon-ec2
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
40
42
  requirements:
41
43
  - - ">="
42
44
  - !ruby/object:Gem::Version
45
+ hash: 59
46
+ segments:
47
+ - 0
48
+ - 9
49
+ - 0
43
50
  version: 0.9.0
44
- version:
51
+ type: :runtime
52
+ version_requirements: *id002
45
53
  - !ruby/object:Gem::Dependency
46
54
  name: aws-s3
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
50
58
  requirements:
51
59
  - - ">="
52
60
  - !ruby/object:Gem::Version
61
+ hash: 3
62
+ segments:
63
+ - 0
53
64
  version: "0"
54
- version:
65
+ type: :runtime
66
+ version_requirements: *id003
55
67
  - !ruby/object:Gem::Dependency
56
68
  name: nettica
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
60
72
  requirements:
61
73
  - - ">="
62
74
  - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
63
78
  version: "0"
64
- version:
79
+ type: :runtime
80
+ version_requirements: *id004
65
81
  - !ruby/object:Gem::Dependency
66
82
  name: httparty
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
83
+ prerelease: false
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ none: false
70
86
  requirements:
71
87
  - - ">="
72
88
  - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
73
92
  version: "0"
74
- version:
93
+ type: :runtime
94
+ version_requirements: *id005
75
95
  - !ruby/object:Gem::Dependency
76
96
  name: rails
77
- type: :runtime
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
97
+ prerelease: false
98
+ requirement: &id006 !ruby/object:Gem::Requirement
99
+ none: false
80
100
  requirements:
81
101
  - - ">="
82
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
83
106
  version: "0"
84
- version:
107
+ type: :runtime
108
+ version_requirements: *id006
85
109
  description: The rubber plugin enables relatively complex multi-instance deployments of RubyOnRails applications to Amazon's Elastic Compute Cloud (EC2). Like capistrano, rubber is role based, so you can define a set of configuration files for a role and then assign that role to as many concrete instances as needed. One can also assign multiple roles to a single instance. This lets one start out with a single ec2 instance (belonging to all roles), and add new instances into the mix as needed to scale specific facets of your deployment, e.g. adding in instances that serve only as an 'app' role to handle increased app server load.
86
110
  email: matt@conwaysplace.com
87
111
  executables:
@@ -288,6 +312,11 @@ files:
288
312
  - lib/rubber/tasks/rubber.rb
289
313
  - lib/rubber/util.rb
290
314
  - rails/init.rb
315
+ - test/environment_test.rb
316
+ - test/generator_test.rb
317
+ - test/test_helper.rb
318
+ - test/util_test.rb
319
+ - test/instance_test.rb
291
320
  has_rdoc: true
292
321
  homepage: http://github.com/wr0ngway/rubber
293
322
  licenses: []
@@ -298,21 +327,27 @@ rdoc_options:
298
327
  require_paths:
299
328
  - lib
300
329
  required_ruby_version: !ruby/object:Gem::Requirement
330
+ none: false
301
331
  requirements:
302
332
  - - ">="
303
333
  - !ruby/object:Gem::Version
334
+ hash: 3
335
+ segments:
336
+ - 0
304
337
  version: "0"
305
- version:
306
338
  required_rubygems_version: !ruby/object:Gem::Requirement
339
+ none: false
307
340
  requirements:
308
341
  - - ">="
309
342
  - !ruby/object:Gem::Version
343
+ hash: 3
344
+ segments:
345
+ - 0
310
346
  version: "0"
311
- version:
312
347
  requirements: []
313
348
 
314
349
  rubyforge_project: rubber
315
- rubygems_version: 1.3.5
350
+ rubygems_version: 1.3.7
316
351
  signing_key:
317
352
  specification_version: 3
318
353
  summary: A capistrano plugin for managing multi-instance deployments to the cloud (ec2)