ironfan 3.1.7 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +11 -0
- data/Gemfile +15 -12
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/config/ubuntu10.04-ironfan.erb +10 -0
- data/config/ubuntu11.10-ironfan.erb +10 -0
- data/ironfan.gemspec +29 -54
- data/lib/chef/knife/bootstrap/centos6.2-ironfan.erb +10 -0
- data/lib/chef/knife/bootstrap/ubuntu10.04-ironfan.erb +10 -0
- data/lib/chef/knife/bootstrap/ubuntu11.10-ironfan.erb +10 -0
- data/lib/chef/knife/cluster_kick.rb +7 -2
- data/lib/chef/knife/cluster_launch.rb +3 -0
- data/lib/chef/knife/cluster_ssh.rb +3 -3
- data/lib/chef/knife/ironfan_knife_common.rb +21 -0
- data/lib/chef/knife/ironfan_script.rb +2 -0
- data/lib/ironfan/chef_layer.rb +9 -9
- data/lib/ironfan/cloud.rb +232 -360
- data/lib/ironfan/cluster.rb +3 -3
- data/lib/ironfan/compute.rb +26 -40
- data/lib/ironfan/deprecated.rb +45 -10
- data/lib/ironfan/discovery.rb +1 -1
- data/lib/ironfan/dsl_builder.rb +99 -0
- data/lib/ironfan/facet.rb +2 -3
- data/lib/ironfan/fog_layer.rb +14 -10
- data/lib/ironfan/private_key.rb +1 -1
- data/lib/ironfan/security_group.rb +46 -44
- data/lib/ironfan/server.rb +26 -52
- data/lib/ironfan/server_slice.rb +13 -19
- data/lib/ironfan/volume.rb +47 -59
- data/lib/ironfan.rb +5 -4
- metadata +116 -122
- data/lib/ironfan/dsl_object.rb +0 -124
- data/notes/Backup of ec2-pricing_and_capacity.numbers +0 -0
- data/notes/Home.md +0 -45
- data/notes/INSTALL-cloud_setup.md +0 -103
- data/notes/INSTALL.md +0 -134
- data/notes/Ironfan-Roadmap.md +0 -70
- data/notes/advanced-superpowers.md +0 -16
- data/notes/aws_servers.jpg +0 -0
- data/notes/aws_user_key.png +0 -0
- data/notes/cookbook-versioning.md +0 -11
- data/notes/core_concepts.md +0 -200
- data/notes/declaring_volumes.md +0 -3
- data/notes/design_notes-aspect_oriented_devops.md +0 -36
- data/notes/design_notes-ci_testing.md +0 -169
- data/notes/design_notes-cookbook_event_ordering.md +0 -249
- data/notes/design_notes-meta_discovery.md +0 -59
- data/notes/ec2-pricing_and_capacity.md +0 -69
- data/notes/ec2-pricing_and_capacity.numbers +0 -0
- data/notes/homebase-layout.txt +0 -102
- data/notes/knife-cluster-commands.md +0 -18
- data/notes/named-cloud-objects.md +0 -11
- data/notes/opscode_org_key.png +0 -0
- data/notes/opscode_user_key.png +0 -0
- data/notes/philosophy.md +0 -13
- data/notes/rake_tasks.md +0 -24
- data/notes/renamed-recipes.txt +0 -142
- data/notes/silverware.md +0 -85
- data/notes/style_guide.md +0 -300
- data/notes/tips_and_troubleshooting.md +0 -92
- data/notes/version-3_2.md +0 -273
- data/notes/walkthrough-hadoop.md +0 -168
- data/notes/walkthrough-web.md +0 -166
data/lib/ironfan/cloud.rb
CHANGED
@@ -1,203 +1,210 @@
|
|
1
|
-
|
2
|
-
module Cloud
|
3
|
-
|
4
|
-
#
|
5
|
-
# Right now only one cloud provider is implemented, so the separation
|
6
|
-
# between `cloud` and `cloud(:ec2)` is muddy.
|
7
|
-
#
|
8
|
-
# The goal though is to allow
|
9
|
-
#
|
10
|
-
# * cloud with no predicate -- definitions that apply to all cloud
|
11
|
-
# providers. If you only use one provider ever nothing stops you from
|
12
|
-
# always saying `cloud`.
|
13
|
-
# * Declarations irrelevant to other providers are acceptable and will be ignored
|
14
|
-
# * Declarations that are wrong in the context of other providers (a `public_ip`
|
15
|
-
# that is not available) will presumably cause a downstream error -- it's
|
16
|
-
# your responsibility to overlay with provider-correct values.
|
17
|
-
# * There are several declarations that *could* be sensibly abstracted, but
|
18
|
-
# are not. Rather than specifying `flavor 'm1.xlarge'`, I could ask for
|
19
|
-
# :ram => 15, :cores => 4 or storage => 1500 and get the cheapest machine
|
20
|
-
# that met or exceeded each constraint -- the default of `:price =>
|
21
|
-
# :smallest` would get me a t1.micro on EC2, a 256MB on
|
22
|
-
# Rackspace. Availability zones could also plausibly be parameterized.
|
23
|
-
#
|
24
|
-
# @example
|
25
|
-
# # these apply regardless of cloud provider
|
26
|
-
# cloud do
|
27
|
-
# # this makes sense everywhere
|
28
|
-
# image_name 'maverick'
|
29
|
-
#
|
30
|
-
# # this is not offered by many providers, and its value is non-portable;
|
31
|
-
# # but if you only run in one cloud there's harm in putting it here
|
32
|
-
# # or overriding it.
|
33
|
-
# public_ip '1.2.3.4'
|
34
|
-
#
|
35
|
-
# # Implemented differently across providers but its meaning is clear
|
36
|
-
# security_group :nagios
|
37
|
-
#
|
38
|
-
# # This is harmless for the other clouds
|
39
|
-
# availability_zones ['us-east-1d']
|
40
|
-
# end
|
41
|
-
#
|
42
|
-
# # these only apply to ec2 launches.
|
43
|
-
# # `ec2` is sugar for `cloud(:ec2)`.
|
44
|
-
# ec2 do
|
45
|
-
# spot_price_fraction 0.4
|
46
|
-
# end
|
47
|
-
#
|
48
|
-
class Base < Ironfan::DslObject
|
49
|
-
has_keys(
|
50
|
-
:name, :flavor, :image_name, :image_id, :keypair,
|
51
|
-
:chef_client_script, :public_ip, :permanent )
|
52
|
-
attr_accessor :owner
|
1
|
+
require 'ironfan/private_key'
|
53
2
|
|
54
|
-
|
55
|
-
|
3
|
+
module Ironfan
|
4
|
+
module CloudDsl
|
5
|
+
class Base < Ironfan::DslBuilder
|
6
|
+
magic :bootstrap_distro, String, :default => "ubuntu10.04-gems"
|
7
|
+
magic :chef_client_script, String
|
8
|
+
magic :flavor, String
|
9
|
+
magic :flavor_info, Array
|
10
|
+
magic :image_name, String
|
11
|
+
magic :ssh_user, String, :default => 'root'
|
12
|
+
|
13
|
+
magic :owner, Whatever
|
14
|
+
|
15
|
+
def initialize(container, *args)
|
16
|
+
owner container
|
56
17
|
super(*args)
|
57
18
|
end
|
58
19
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
reverse_merge!({
|
63
|
-
:image_name => 'natty',
|
64
|
-
})
|
65
|
-
end
|
66
|
-
|
67
|
-
# The username to ssh with.
|
68
|
-
# @return the ssh_user if set explicitly; otherwise, the user implied by the image name, if any; or else 'root'
|
69
|
-
def ssh_user(val=nil)
|
70
|
-
from_setting_or_image_info :ssh_user, val, 'root'
|
71
|
-
end
|
72
|
-
|
73
|
-
# Location of ssh private keys
|
74
|
-
def ssh_identity_dir(val=nil)
|
75
|
-
set :ssh_identity_dir, File.expand_path(val) unless val.nil?
|
76
|
-
@settings.include?(:ssh_identity_dir) ? @settings[:ssh_identity_dir] : Chef::Config.ec2_key_dir
|
77
|
-
end
|
78
|
-
|
79
|
-
# SSH identity file used for knife ssh, knife boostrap and such
|
80
|
-
def ssh_identity_file(val=nil)
|
81
|
-
set :ssh_identity_file, File.expand_path(val) unless val.nil?
|
82
|
-
@settings.include?(:ssh_identity_file) ? @settings[:ssh_identity_file] : File.join(ssh_identity_dir, "#{keypair}.pem")
|
83
|
-
end
|
84
|
-
|
85
|
-
# ID of the machine image to use.
|
86
|
-
# @return the image_id if set explicitly; otherwise, the id implied by the image name
|
87
|
-
def image_id(val=nil)
|
88
|
-
from_setting_or_image_info :image_id, val
|
89
|
-
end
|
90
|
-
|
91
|
-
# Distribution knife should target when bootstrapping an instance
|
92
|
-
# @return the bootstrap_distro if set explicitly; otherwise, the bootstrap_distro implied by the image name
|
93
|
-
def bootstrap_distro(val=nil)
|
94
|
-
from_setting_or_image_info :bootstrap_distro, val, "ubuntu10.04-gems"
|
95
|
-
end
|
96
|
-
|
97
|
-
def validation_key
|
98
|
-
IO.read(Chef::Config.validation_key) rescue ''
|
99
|
-
end
|
100
|
-
|
101
|
-
# The instance price, drawn from the compute flavor's info
|
102
|
-
def price
|
103
|
-
flavor_info[:price]
|
20
|
+
def to_hash
|
21
|
+
Chef::Log.warn("Using to_hash is depreciated, use attributes instead")
|
22
|
+
attributes
|
104
23
|
end
|
105
24
|
|
106
|
-
#
|
107
|
-
def
|
108
|
-
flavor_info[:bits]
|
25
|
+
# Stub to be filled by child classes
|
26
|
+
def defaults
|
109
27
|
end
|
110
28
|
|
111
|
-
|
112
|
-
#
|
113
|
-
def
|
114
|
-
@
|
115
|
-
|
116
|
-
return image_info[key] unless image_info.nil?
|
117
|
-
return default # otherwise
|
29
|
+
# # TODO: Replace the lambda with an underlay from image_info?
|
30
|
+
# magic :image_id, String, :default => lambda { image_info[:image_id] unless image_info.nil? }
|
31
|
+
def image_id
|
32
|
+
return @image_id if @image_id
|
33
|
+
image_info[:image_id] unless image_info.nil?
|
118
34
|
end
|
35
|
+
## TODO: Replace with code that will assume ssh_identity_dir if ssh_identity_file isn't absolutely pathed
|
36
|
+
# # SSH identity file used for knife ssh, knife boostrap and such
|
37
|
+
# def ssh_identity_file(val=nil)
|
38
|
+
# set :ssh_identity_file, File.expand_path(val) unless val.nil?
|
39
|
+
# @settings.include?(:ssh_identity_file) ? @settings[:ssh_identity_file] : File.join(ssh_identity_dir, "#{keypair}.pem")
|
40
|
+
# end
|
119
41
|
end
|
120
|
-
|
42
|
+
|
121
43
|
class Ec2 < Base
|
122
|
-
has_keys(
|
123
|
-
:region, :availability_zones, :backing,
|
124
|
-
:spot_price, :spot_price_fraction,
|
125
|
-
:user_data, :security_groups,
|
126
|
-
:monitoring, :placement_group,
|
127
|
-
:vpc, :subnet
|
128
|
-
)
|
129
|
-
|
130
|
-
def initialize(*args)
|
131
|
-
super *args
|
132
|
-
name :ec2 # cloud provider name
|
133
|
-
@settings[:security_groups] ||= Mash.new
|
134
|
-
@settings[:user_data] ||= Mash.new
|
135
|
-
end
|
136
|
-
|
137
44
|
#
|
138
|
-
#
|
45
|
+
# To add to this list, use this snippet:
|
139
46
|
#
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
:flavor => 't1.micro',
|
150
|
-
})
|
151
|
-
super
|
152
|
-
end
|
153
|
-
|
154
|
-
# adds a security group to the cloud instance
|
155
|
-
def security_group(sg_name, hsh={}, &block)
|
156
|
-
sg_name = sg_name.to_s
|
157
|
-
security_groups[sg_name] ||= Ironfan::Cloud::SecurityGroup.new(self, sg_name)
|
158
|
-
security_groups[sg_name].configure(hsh, &block)
|
159
|
-
security_groups[sg_name]
|
160
|
-
end
|
161
|
-
|
162
|
-
# With a value, sets the spot price to the given fraction of the
|
163
|
-
# instance's full price (as found in Ironfan::Cloud::Aws::FLAVOR_INFO)
|
164
|
-
# With no value, returns the spot price as a fraction of the full instance price.
|
165
|
-
def spot_price_fraction(val=nil)
|
166
|
-
if val
|
167
|
-
spot_price( price.to_f * val )
|
168
|
-
else
|
169
|
-
spot_price / price rescue 0
|
170
|
-
end
|
171
|
-
end
|
172
|
-
|
173
|
-
# EC2 User data -- DNA typically used to bootstrap the machine.
|
174
|
-
# @param [Hash] value -- when present, merged with the existing user data (overriding it)
|
175
|
-
# @return the user_data hash
|
176
|
-
def user_data(hsh={})
|
177
|
-
@settings[:user_data].merge!(hsh.to_hash) unless hsh.empty?
|
178
|
-
@settings[:user_data]
|
179
|
-
end
|
47
|
+
# Chef::Config[:ec2_image_info] ||= {}
|
48
|
+
# Chef::Config[:ec2_image_info].merge!({
|
49
|
+
# # ... lines like the below
|
50
|
+
# })
|
51
|
+
#
|
52
|
+
# in your knife.rb or whereever. We'll notice that it exists and add to it, rather than clobbering it.
|
53
|
+
#
|
54
|
+
Chef::Config[:ec2_image_info] ||= {}
|
55
|
+
Chef::Config[:ec2_image_info].merge!({
|
180
56
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
57
|
+
#
|
58
|
+
# Lucid (Ubuntu 9.10)
|
59
|
+
#
|
60
|
+
%w[us-east-1 64-bit instance karmic ] => { :image_id => 'ami-55739e3c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
61
|
+
%w[us-east-1 32-bit instance karmic ] => { :image_id => 'ami-bb709dd2', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
62
|
+
%w[us-west-1 64-bit instance karmic ] => { :image_id => 'ami-cb2e7f8e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
63
|
+
%w[us-west-1 32-bit instance karmic ] => { :image_id => 'ami-c32e7f86', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
64
|
+
%w[eu-west-1 64-bit instance karmic ] => { :image_id => 'ami-05c2e971', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
65
|
+
%w[eu-west-1 32-bit instance karmic ] => { :image_id => 'ami-2fc2e95b', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
66
|
+
|
67
|
+
#
|
68
|
+
# Lucid (Ubuntu 10.04.3)
|
69
|
+
#
|
70
|
+
%w[ap-southeast-1 64-bit ebs lucid ] => { :image_id => 'ami-77f28d25', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
71
|
+
%w[ap-southeast-1 32-bit ebs lucid ] => { :image_id => 'ami-4df28d1f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
72
|
+
%w[ap-southeast-1 64-bit instance lucid ] => { :image_id => 'ami-57f28d05', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
73
|
+
%w[ap-southeast-1 32-bit instance lucid ] => { :image_id => 'ami-a5f38cf7', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
74
|
+
%w[eu-west-1 64-bit ebs lucid ] => { :image_id => 'ami-ab4d67df', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
75
|
+
%w[eu-west-1 32-bit ebs lucid ] => { :image_id => 'ami-a94d67dd', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
76
|
+
%w[eu-west-1 64-bit instance lucid ] => { :image_id => 'ami-a54d67d1', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
77
|
+
%w[eu-west-1 32-bit instance lucid ] => { :image_id => 'ami-cf4d67bb', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
78
|
+
#
|
79
|
+
%w[us-east-1 64-bit ebs lucid ] => { :image_id => 'ami-4b4ba522', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
80
|
+
%w[us-east-1 32-bit ebs lucid ] => { :image_id => 'ami-714ba518', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
81
|
+
%w[us-east-1 64-bit instance lucid ] => { :image_id => 'ami-fd4aa494', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
82
|
+
%w[us-east-1 32-bit instance lucid ] => { :image_id => 'ami-2d4aa444', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
83
|
+
#
|
84
|
+
%w[us-west-1 64-bit ebs lucid ] => { :image_id => 'ami-d197c694', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
85
|
+
%w[us-west-1 32-bit ebs lucid ] => { :image_id => 'ami-cb97c68e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
86
|
+
%w[us-west-1 64-bit instance lucid ] => { :image_id => 'ami-c997c68c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
87
|
+
%w[us-west-1 32-bit instance lucid ] => { :image_id => 'ami-c597c680', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
88
|
+
|
89
|
+
#
|
90
|
+
# Maverick (Ubuntu 10.10)
|
91
|
+
#
|
92
|
+
%w[ ap-southeast-1 64-bit ebs maverick ] => { :image_id => 'ami-32423c60', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
93
|
+
%w[ ap-southeast-1 64-bit instance maverick ] => { :image_id => 'ami-12423c40', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
94
|
+
%w[ ap-southeast-1 32-bit ebs maverick ] => { :image_id => 'ami-0c423c5e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
95
|
+
%w[ ap-southeast-1 32-bit instance maverick ] => { :image_id => 'ami-7c423c2e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
96
|
+
#
|
97
|
+
%w[ eu-west-1 64-bit ebs maverick ] => { :image_id => 'ami-e59ca991', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
98
|
+
%w[ eu-west-1 64-bit instance maverick ] => { :image_id => 'ami-1b9ca96f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
99
|
+
%w[ eu-west-1 32-bit ebs maverick ] => { :image_id => 'ami-fb9ca98f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
100
|
+
%w[ eu-west-1 32-bit instance maverick ] => { :image_id => 'ami-339ca947', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
101
|
+
#
|
102
|
+
%w[ us-east-1 64-bit ebs maverick ] => { :image_id => 'ami-cef405a7', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
103
|
+
%w[ us-east-1 64-bit instance maverick ] => { :image_id => 'ami-08f40561', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
104
|
+
%w[ us-east-1 32-bit ebs maverick ] => { :image_id => 'ami-ccf405a5', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
105
|
+
%w[ us-east-1 32-bit instance maverick ] => { :image_id => 'ami-a6f504cf', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
106
|
+
#
|
107
|
+
%w[ us-west-1 64-bit ebs maverick ] => { :image_id => 'ami-af7e2eea', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
108
|
+
%w[ us-west-1 64-bit instance maverick ] => { :image_id => 'ami-a17e2ee4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
109
|
+
%w[ us-west-1 32-bit ebs maverick ] => { :image_id => 'ami-ad7e2ee8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
110
|
+
%w[ us-west-1 32-bit instance maverick ] => { :image_id => 'ami-957e2ed0', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
111
|
+
|
112
|
+
#
|
113
|
+
# Natty (Ubuntu 11.04)
|
114
|
+
#
|
115
|
+
%w[ ap-northeast-1 32-bit ebs natty ] => { :image_id => 'ami-00b10501', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
116
|
+
%w[ ap-northeast-1 32-bit instance natty ] => { :image_id => 'ami-f0b004f1', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
117
|
+
%w[ ap-northeast-1 64-bit ebs natty ] => { :image_id => 'ami-02b10503', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
118
|
+
%w[ ap-northeast-1 64-bit instance natty ] => { :image_id => 'ami-fab004fb', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
119
|
+
#
|
120
|
+
%w[ ap-southeast-1 32-bit ebs natty ] => { :image_id => 'ami-06255f54', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
121
|
+
%w[ ap-southeast-1 32-bit instance natty ] => { :image_id => 'ami-72255f20', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
122
|
+
%w[ ap-southeast-1 64-bit ebs natty ] => { :image_id => 'ami-04255f56', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
123
|
+
%w[ ap-southeast-1 64-bit instance natty ] => { :image_id => 'ami-7a255f28', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
124
|
+
#
|
125
|
+
%w[ eu-west-1 32-bit ebs natty ] => { :image_id => 'ami-a4f7c5d0', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
126
|
+
%w[ eu-west-1 32-bit instance natty ] => { :image_id => 'ami-fef7c58a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
127
|
+
%w[ eu-west-1 64-bit ebs natty ] => { :image_id => 'ami-a6f7c5d2', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
128
|
+
%w[ eu-west-1 64-bit instance natty ] => { :image_id => 'ami-c0f7c5b4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
129
|
+
#
|
130
|
+
%w[ us-east-1 32-bit ebs natty ] => { :image_id => 'ami-e358958a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
131
|
+
%w[ us-east-1 32-bit instance natty ] => { :image_id => 'ami-c15994a8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
132
|
+
%w[ us-east-1 64-bit ebs natty ] => { :image_id => 'ami-fd589594', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
133
|
+
%w[ us-east-1 64-bit instance natty ] => { :image_id => 'ami-71589518', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
134
|
+
#
|
135
|
+
%w[ us-west-1 32-bit ebs natty ] => { :image_id => 'ami-43580406', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
136
|
+
%w[ us-west-1 32-bit instance natty ] => { :image_id => 'ami-e95f03ac', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
137
|
+
%w[ us-west-1 64-bit ebs natty ] => { :image_id => 'ami-4d580408', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
138
|
+
%w[ us-west-1 64-bit instance natty ] => { :image_id => 'ami-a15f03e4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
139
|
+
|
140
|
+
#
|
141
|
+
# Cluster Compute
|
142
|
+
#
|
143
|
+
# IMAGE ami-6d2ce204 205199409180/Globus Provision 0.4.AMI (Ubuntu 11.04 HVM) 205199409180 available public x86_64 machine ebs hvm xen
|
144
|
+
#
|
145
|
+
%w[ us-east-1 64-bit ebs natty-cc ] => { :image_id => 'ami-6d2ce204', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
146
|
+
|
147
|
+
#
|
148
|
+
# Oneiric (Ubuntu 11.10)
|
149
|
+
#
|
150
|
+
%w[ ap-northeast-1 32-bit ebs oneiric ] => { :image_id => 'ami-84902785', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
151
|
+
%w[ ap-northeast-1 32-bit instance oneiric ] => { :image_id => 'ami-5e90275f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
152
|
+
%w[ ap-northeast-1 64-bit ebs oneiric ] => { :image_id => 'ami-88902789', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
153
|
+
%w[ ap-northeast-1 64-bit instance oneiric ] => { :image_id => 'ami-7c90277d', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
154
|
+
#
|
155
|
+
%w[ ap-southeast-1 32-bit ebs oneiric ] => { :image_id => 'ami-0a327758', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
156
|
+
%w[ ap-southeast-1 32-bit instance oneiric ] => { :image_id => 'ami-00327752', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
157
|
+
%w[ ap-southeast-1 64-bit ebs oneiric ] => { :image_id => 'ami-0832775a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
158
|
+
%w[ ap-southeast-1 64-bit instance oneiric ] => { :image_id => 'ami-04327756', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
159
|
+
#
|
160
|
+
%w[ eu-west-1 32-bit ebs oneiric ] => { :image_id => 'ami-11f0cc65', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
161
|
+
%w[ eu-west-1 32-bit instance oneiric ] => { :image_id => 'ami-4ff0cc3b', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
162
|
+
%w[ eu-west-1 64-bit ebs oneiric ] => { :image_id => 'ami-1df0cc69', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
163
|
+
%w[ eu-west-1 64-bit instance oneiric ] => { :image_id => 'ami-23f0cc57', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
164
|
+
#
|
165
|
+
%w[ us-east-1 32-bit ebs oneiric ] => { :image_id => 'ami-a562a9cc', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
166
|
+
%w[ us-east-1 32-bit instance oneiric ] => { :image_id => 'ami-3962a950', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
167
|
+
%w[ us-east-1 64-bit ebs oneiric ] => { :image_id => 'ami-bf62a9d6', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
168
|
+
%w[ us-east-1 64-bit instance oneiric ] => { :image_id => 'ami-c162a9a8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
169
|
+
#
|
170
|
+
%w[ us-west-1 32-bit ebs oneiric ] => { :image_id => 'ami-c9a1fe8c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
171
|
+
%w[ us-west-1 32-bit instance oneiric ] => { :image_id => 'ami-21a1fe64', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
172
|
+
%w[ us-west-1 64-bit ebs oneiric ] => { :image_id => 'ami-cba1fe8e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
173
|
+
%w[ us-west-1 64-bit instance oneiric ] => { :image_id => 'ami-3fa1fe7a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
174
|
+
#
|
175
|
+
%w[ us-west-2 32-bit ebs oneiric ] => { :image_id => 'ami-ea9a17da', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
176
|
+
%w[ us-west-2 32-bit instance oneiric ] => { :image_id => 'ami-f49a17c4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
177
|
+
%w[ us-west-2 64-bit ebs oneiric ] => { :image_id => 'ami-ec9a17dc', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
178
|
+
%w[ us-west-2 64-bit instance oneiric ] => { :image_id => 'ami-fe9a17ce', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
179
|
+
})
|
180
|
+
|
181
|
+
magic :availability_zones, Array, :default => ['us-east-1d']
|
182
|
+
magic :backing, String, :default => 'ebs'
|
183
|
+
magic :ec2_image_info, Hash, :default => Chef::Config[:ec2_image_info]
|
184
|
+
magic :flavor, String, :default => 't1.micro'
|
185
|
+
magic :image_name, String, :default => 'natty'
|
186
|
+
magic :keypair, Whatever
|
187
|
+
magic :monitoring, String
|
188
|
+
magic :permanent, String
|
189
|
+
magic :public_ip, String
|
190
|
+
magic :region, String,
|
191
|
+
:default => ->{ default_availability_zone.gsub(/^(\w+-\w+-\d)[a-z]/, '\1') if default_availability_zone }
|
192
|
+
collection :security_groups, Ironfan::CloudDsl::SecurityGroup, :resolution => ->(f){ merge_resolve(f) }
|
193
|
+
magic :ssh_user, String, :default => 'ubuntu'
|
194
|
+
magic :ssh_identity_dir, String, :default => Chef::Config.ec2_key_dir
|
195
|
+
magic :ssh_identity_file, String #, :default => "#{keypair}.pem"
|
196
|
+
magic :subnet, String
|
197
|
+
magic :user_data, Hash, :default => {}
|
198
|
+
magic :validation_key, String, :default => IO.read(Chef::Config.validation_key) rescue ''
|
199
|
+
magic :vpc, String
|
187
200
|
|
188
|
-
def
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
else nil
|
201
|
+
def list_images
|
202
|
+
ui.info("Available images:")
|
203
|
+
ec2_image_info.each do |flavor_name, flavor|
|
204
|
+
ui.info(" %-55s\t%s" % [flavor_name, flavor.inspect])
|
193
205
|
end
|
194
206
|
end
|
195
207
|
|
196
|
-
def placement_group(val=nil)
|
197
|
-
set(:placement_group, val)
|
198
|
-
@settings[:placement_group] || owner.cluster_name
|
199
|
-
end
|
200
|
-
|
201
208
|
def default_availability_zone
|
202
209
|
availability_zones.first if availability_zones
|
203
210
|
end
|
@@ -210,50 +217,45 @@ module Ironfan
|
|
210
217
|
owner.volume(:ephemeral3, attrs){ device '/dev/sde'; volume_id 'ephemeral3' ; mount_point '/mnt4'; tags( :bulk => true, :local => true, :fallback => true) } if flavor_info[:ephemeral_volumes] > 3
|
211
218
|
end
|
212
219
|
|
213
|
-
# Utility methods
|
214
|
-
|
215
|
-
require 'pry'
|
216
|
-
|
217
220
|
def image_info
|
218
221
|
ec2_image_info[ [region, bits, backing, image_name] ] or ( ui.warn "Make sure to define the machine's region, bits, backing and image_name. (Have #{[region, bits, backing, image_name, virtualization].inspect})" ; {} )
|
219
222
|
end
|
220
223
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
def virtualization
|
229
|
-
flavor_info[:virtualization] || 'pv'
|
224
|
+
# EC2 User data -- DNA typically used to bootstrap the machine.
|
225
|
+
# @param [Hash] value -- when present, merged with the existing user data (overriding it)
|
226
|
+
# @return the user_data hash
|
227
|
+
def user_data(hsh={})
|
228
|
+
result = read_attribute(:user_data)
|
229
|
+
write_attribute(:user_data, result.merge!(hsh.to_hash)) unless hsh.empty?
|
230
|
+
result
|
230
231
|
end
|
231
232
|
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
233
|
+
# Sets default root volume for AWS
|
234
|
+
def defaults
|
235
|
+
owner.volume(:root).receive!({
|
236
|
+
:device => '/dev/sda1',
|
237
|
+
:mount_point => '/',
|
238
|
+
:mountable => false,
|
239
|
+
})
|
240
|
+
super
|
237
241
|
end
|
238
242
|
|
239
|
-
|
240
|
-
|
243
|
+
# The instance bitness, drawn from the compute flavor's info
|
244
|
+
def bits
|
245
|
+
flavor_info[:bits]
|
241
246
|
end
|
242
247
|
|
243
|
-
def
|
244
|
-
|
248
|
+
def virtualization
|
249
|
+
flavor_info[:virtualization] || 'pv'
|
245
250
|
end
|
246
251
|
|
247
|
-
def
|
248
|
-
if
|
252
|
+
def flavor_info
|
253
|
+
if flavor && (not FLAVOR_INFO.has_key?(flavor))
|
249
254
|
ui.warn("Unknown machine image flavor '#{val}'")
|
250
255
|
list_flavors
|
256
|
+
return nil
|
251
257
|
end
|
252
|
-
|
253
|
-
end
|
254
|
-
|
255
|
-
def flavor_info
|
256
|
-
FLAVOR_INFO[flavor] or ( ui.warn "Please define the machine's flavor: have #{self.inspect}" ; {} )
|
258
|
+
FLAVOR_INFO[flavor]
|
257
259
|
end
|
258
260
|
|
259
261
|
def list_flavors
|
@@ -293,159 +295,29 @@ module Ironfan
|
|
293
295
|
'cc1.8xlarge' => { :price => 2.40, :bits => '64-bit', :ram => 61952, :cores =>16, :core_size => 5.50, :inst_disks => 8, :inst_disk_size => 3370, :ephemeral_volumes => 4, :placement_groupable => true, :virtualization => 'hvm' },
|
294
296
|
'cg1.4xlarge' => { :price => 2.10, :bits => '64-bit', :ram => 22528, :cores => 8, :core_size => 4.19, :inst_disks => 4, :inst_disk_size => 1690, :ephemeral_volumes => 2, :placement_groupable => true, :virtualization => 'hvm' },
|
295
297
|
}
|
296
|
-
|
297
|
-
#
|
298
|
-
# To add to this list, use this snippet:
|
299
|
-
#
|
300
|
-
# Chef::Config[:ec2_image_info] ||= {}
|
301
|
-
# Chef::Config[:ec2_image_info].merge!({
|
302
|
-
# # ... lines like the below
|
303
|
-
# })
|
304
|
-
#
|
305
|
-
# in your knife.rb or whereever. We'll notice that it exists and add to it, rather than clobbering it.
|
306
|
-
#
|
307
|
-
Chef::Config[:ec2_image_info] ||= {}
|
308
|
-
Chef::Config[:ec2_image_info].merge!({
|
309
|
-
|
310
|
-
#
|
311
|
-
# Lucid (Ubuntu 9.10)
|
312
|
-
#
|
313
|
-
%w[us-east-1 64-bit instance karmic ] => { :image_id => 'ami-55739e3c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
314
|
-
%w[us-east-1 32-bit instance karmic ] => { :image_id => 'ami-bb709dd2', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
315
|
-
%w[us-west-1 64-bit instance karmic ] => { :image_id => 'ami-cb2e7f8e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
316
|
-
%w[us-west-1 32-bit instance karmic ] => { :image_id => 'ami-c32e7f86', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
317
|
-
%w[eu-west-1 64-bit instance karmic ] => { :image_id => 'ami-05c2e971', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
318
|
-
%w[eu-west-1 32-bit instance karmic ] => { :image_id => 'ami-2fc2e95b', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
319
|
-
|
320
|
-
#
|
321
|
-
# Lucid (Ubuntu 10.04.3)
|
322
|
-
#
|
323
|
-
%w[ap-southeast-1 64-bit ebs lucid ] => { :image_id => 'ami-77f28d25', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
324
|
-
%w[ap-southeast-1 32-bit ebs lucid ] => { :image_id => 'ami-4df28d1f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
325
|
-
%w[ap-southeast-1 64-bit instance lucid ] => { :image_id => 'ami-57f28d05', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
326
|
-
%w[ap-southeast-1 32-bit instance lucid ] => { :image_id => 'ami-a5f38cf7', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
327
|
-
%w[eu-west-1 64-bit ebs lucid ] => { :image_id => 'ami-ab4d67df', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
328
|
-
%w[eu-west-1 32-bit ebs lucid ] => { :image_id => 'ami-a94d67dd', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
329
|
-
%w[eu-west-1 64-bit instance lucid ] => { :image_id => 'ami-a54d67d1', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
330
|
-
%w[eu-west-1 32-bit instance lucid ] => { :image_id => 'ami-cf4d67bb', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
331
|
-
#
|
332
|
-
%w[us-east-1 64-bit ebs lucid ] => { :image_id => 'ami-4b4ba522', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
333
|
-
%w[us-east-1 32-bit ebs lucid ] => { :image_id => 'ami-714ba518', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
334
|
-
%w[us-east-1 64-bit instance lucid ] => { :image_id => 'ami-fd4aa494', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
335
|
-
%w[us-east-1 32-bit instance lucid ] => { :image_id => 'ami-2d4aa444', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
336
|
-
#
|
337
|
-
%w[us-west-1 64-bit ebs lucid ] => { :image_id => 'ami-d197c694', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
338
|
-
%w[us-west-1 32-bit ebs lucid ] => { :image_id => 'ami-cb97c68e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
339
|
-
%w[us-west-1 64-bit instance lucid ] => { :image_id => 'ami-c997c68c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
340
|
-
%w[us-west-1 32-bit instance lucid ] => { :image_id => 'ami-c597c680', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
341
|
-
|
342
|
-
#
|
343
|
-
# Maverick (Ubuntu 10.10)
|
344
|
-
#
|
345
|
-
%w[ ap-southeast-1 64-bit ebs maverick ] => { :image_id => 'ami-32423c60', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
346
|
-
%w[ ap-southeast-1 64-bit instance maverick ] => { :image_id => 'ami-12423c40', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
347
|
-
%w[ ap-southeast-1 32-bit ebs maverick ] => { :image_id => 'ami-0c423c5e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
348
|
-
%w[ ap-southeast-1 32-bit instance maverick ] => { :image_id => 'ami-7c423c2e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
349
|
-
#
|
350
|
-
%w[ eu-west-1 64-bit ebs maverick ] => { :image_id => 'ami-e59ca991', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
351
|
-
%w[ eu-west-1 64-bit instance maverick ] => { :image_id => 'ami-1b9ca96f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
352
|
-
%w[ eu-west-1 32-bit ebs maverick ] => { :image_id => 'ami-fb9ca98f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
353
|
-
%w[ eu-west-1 32-bit instance maverick ] => { :image_id => 'ami-339ca947', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
354
|
-
#
|
355
|
-
%w[ us-east-1 64-bit ebs maverick ] => { :image_id => 'ami-cef405a7', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
356
|
-
%w[ us-east-1 64-bit instance maverick ] => { :image_id => 'ami-08f40561', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
357
|
-
%w[ us-east-1 32-bit ebs maverick ] => { :image_id => 'ami-ccf405a5', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
358
|
-
%w[ us-east-1 32-bit instance maverick ] => { :image_id => 'ami-a6f504cf', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
359
|
-
#
|
360
|
-
%w[ us-west-1 64-bit ebs maverick ] => { :image_id => 'ami-af7e2eea', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
361
|
-
%w[ us-west-1 64-bit instance maverick ] => { :image_id => 'ami-a17e2ee4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
362
|
-
%w[ us-west-1 32-bit ebs maverick ] => { :image_id => 'ami-ad7e2ee8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
363
|
-
%w[ us-west-1 32-bit instance maverick ] => { :image_id => 'ami-957e2ed0', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
364
|
-
|
365
|
-
#
|
366
|
-
# Natty (Ubuntu 11.04)
|
367
|
-
#
|
368
|
-
%w[ ap-northeast-1 32-bit ebs natty ] => { :image_id => 'ami-00b10501', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
369
|
-
%w[ ap-northeast-1 32-bit instance natty ] => { :image_id => 'ami-f0b004f1', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
370
|
-
%w[ ap-northeast-1 64-bit ebs natty ] => { :image_id => 'ami-02b10503', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
371
|
-
%w[ ap-northeast-1 64-bit instance natty ] => { :image_id => 'ami-fab004fb', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
372
|
-
#
|
373
|
-
%w[ ap-southeast-1 32-bit ebs natty ] => { :image_id => 'ami-06255f54', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
374
|
-
%w[ ap-southeast-1 32-bit instance natty ] => { :image_id => 'ami-72255f20', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
375
|
-
%w[ ap-southeast-1 64-bit ebs natty ] => { :image_id => 'ami-04255f56', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
376
|
-
%w[ ap-southeast-1 64-bit instance natty ] => { :image_id => 'ami-7a255f28', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
377
|
-
#
|
378
|
-
%w[ eu-west-1 32-bit ebs natty ] => { :image_id => 'ami-a4f7c5d0', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
379
|
-
%w[ eu-west-1 32-bit instance natty ] => { :image_id => 'ami-fef7c58a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
380
|
-
%w[ eu-west-1 64-bit ebs natty ] => { :image_id => 'ami-a6f7c5d2', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
381
|
-
%w[ eu-west-1 64-bit instance natty ] => { :image_id => 'ami-c0f7c5b4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
382
|
-
#
|
383
|
-
%w[ us-east-1 32-bit ebs natty ] => { :image_id => 'ami-e358958a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
384
|
-
%w[ us-east-1 32-bit instance natty ] => { :image_id => 'ami-c15994a8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
385
|
-
%w[ us-east-1 64-bit ebs natty ] => { :image_id => 'ami-fd589594', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
386
|
-
%w[ us-east-1 64-bit instance natty ] => { :image_id => 'ami-71589518', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
387
|
-
#
|
388
|
-
%w[ us-west-1 32-bit ebs natty ] => { :image_id => 'ami-43580406', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
389
|
-
%w[ us-west-1 32-bit instance natty ] => { :image_id => 'ami-e95f03ac', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
390
|
-
%w[ us-west-1 64-bit ebs natty ] => { :image_id => 'ami-4d580408', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
391
|
-
%w[ us-west-1 64-bit instance natty ] => { :image_id => 'ami-a15f03e4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
392
|
-
|
393
|
-
#
|
394
|
-
# Cluster Compute
|
395
|
-
#
|
396
|
-
# IMAGE ami-6d2ce204 205199409180/Globus Provision 0.4.AMI (Ubuntu 11.04 HVM) 205199409180 available public x86_64 machine ebs hvm xen
|
397
|
-
#
|
398
|
-
%w[ us-east-1 64-bit ebs natty-cc ] => { :image_id => 'ami-6d2ce204', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
399
|
-
|
400
|
-
#
|
401
|
-
# Oneiric (Ubuntu 11.10)
|
402
|
-
#
|
403
|
-
%w[ ap-northeast-1 32-bit ebs oneiric ] => { :image_id => 'ami-84902785', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
404
|
-
%w[ ap-northeast-1 32-bit instance oneiric ] => { :image_id => 'ami-5e90275f', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
405
|
-
%w[ ap-northeast-1 64-bit ebs oneiric ] => { :image_id => 'ami-88902789', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
406
|
-
%w[ ap-northeast-1 64-bit instance oneiric ] => { :image_id => 'ami-7c90277d', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
407
|
-
#
|
408
|
-
%w[ ap-southeast-1 32-bit ebs oneiric ] => { :image_id => 'ami-0a327758', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
409
|
-
%w[ ap-southeast-1 32-bit instance oneiric ] => { :image_id => 'ami-00327752', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
410
|
-
%w[ ap-southeast-1 64-bit ebs oneiric ] => { :image_id => 'ami-0832775a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
411
|
-
%w[ ap-southeast-1 64-bit instance oneiric ] => { :image_id => 'ami-04327756', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
412
|
-
#
|
413
|
-
%w[ eu-west-1 32-bit ebs oneiric ] => { :image_id => 'ami-11f0cc65', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
414
|
-
%w[ eu-west-1 32-bit instance oneiric ] => { :image_id => 'ami-4ff0cc3b', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
415
|
-
%w[ eu-west-1 64-bit ebs oneiric ] => { :image_id => 'ami-1df0cc69', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
416
|
-
%w[ eu-west-1 64-bit instance oneiric ] => { :image_id => 'ami-23f0cc57', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
417
|
-
#
|
418
|
-
%w[ us-east-1 32-bit ebs oneiric ] => { :image_id => 'ami-a562a9cc', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
419
|
-
%w[ us-east-1 32-bit instance oneiric ] => { :image_id => 'ami-3962a950', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
420
|
-
%w[ us-east-1 64-bit ebs oneiric ] => { :image_id => 'ami-bf62a9d6', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
421
|
-
%w[ us-east-1 64-bit instance oneiric ] => { :image_id => 'ami-c162a9a8', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
422
|
-
#
|
423
|
-
%w[ us-west-1 32-bit ebs oneiric ] => { :image_id => 'ami-c9a1fe8c', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
424
|
-
%w[ us-west-1 32-bit instance oneiric ] => { :image_id => 'ami-21a1fe64', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
425
|
-
%w[ us-west-1 64-bit ebs oneiric ] => { :image_id => 'ami-cba1fe8e', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
426
|
-
%w[ us-west-1 64-bit instance oneiric ] => { :image_id => 'ami-3fa1fe7a', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
427
|
-
#
|
428
|
-
%w[ us-west-2 32-bit ebs oneiric ] => { :image_id => 'ami-ea9a17da', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
429
|
-
%w[ us-west-2 32-bit instance oneiric ] => { :image_id => 'ami-f49a17c4', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
430
|
-
%w[ us-west-2 64-bit ebs oneiric ] => { :image_id => 'ami-ec9a17dc', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
431
|
-
%w[ us-west-2 64-bit instance oneiric ] => { :image_id => 'ami-fe9a17ce', :ssh_user => 'ubuntu', :bootstrap_distro => "ubuntu10.04-gems", },
|
432
|
-
})
|
433
298
|
end
|
434
299
|
|
435
|
-
class
|
436
|
-
#
|
437
|
-
#
|
438
|
-
#
|
439
|
-
|
440
|
-
#
|
441
|
-
|
300
|
+
class VirtualBox < Base
|
301
|
+
# # These fields are probably nonsense in VirtualBox
|
302
|
+
# magic :availability_zones, String
|
303
|
+
# magic :backing, String
|
304
|
+
# magic :default_availability_zone, String
|
305
|
+
# magic :flavor_info, Array, :default => { :placement_groupable => false }
|
306
|
+
# magic :keypair, Ironfan::PrivateKey
|
307
|
+
# magic :monitoring, String
|
308
|
+
# magic :permanent, String
|
309
|
+
# magic :public_ip, String
|
310
|
+
# magic :security_groups, Array, :default => { :keys => nil }
|
311
|
+
# magic :subnet, String
|
312
|
+
# magic :user_data, String
|
313
|
+
# magic :validation_key, String
|
314
|
+
# magic :vpc, String
|
442
315
|
|
443
|
-
|
444
|
-
|
316
|
+
def initialize(*args)
|
317
|
+
Chef::Log.warn("Several fields (e.g. - availability_zones, backing, mount_ephemerals, etc.) are nonsense in VirtualBox context")
|
318
|
+
super(*args)
|
319
|
+
end
|
445
320
|
end
|
446
321
|
|
447
|
-
class Terremark < Base
|
448
|
-
# password, username, service
|
449
|
-
end
|
450
322
|
end
|
451
323
|
end
|