knife-ec2 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/chef/knife/ec2_server_create.rb +12 -0
- data/lib/chef/knife/ec2_server_list.rb +1 -1
- data/lib/knife-ec2/version.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -27,7 +27,7 @@ If your knife.rb file will be checked into a SCM system (ie readable by others)
|
|
27
27
|
You also have the option of passing your AWS API Key/Secret into the individual knife subcommands using the <tt>-A</tt> (or <tt>--aws-access-key-id</tt>) <tt>-K</tt> (or <tt>--aws-secret-access-key</tt>) command options
|
28
28
|
|
29
29
|
# provision a new m1.small Ubuntu 10.04 webserver
|
30
|
-
knife ec2 server create 'role[webserver]' -
|
30
|
+
knife ec2 server create 'role[webserver]' -I ami-7000f019 -f m1.small -A 'Your AWS Access Key ID' -K "Your AWS Secret Access Key"
|
31
31
|
|
32
32
|
Additionally the following options may be set in your `knife.rb`:
|
33
33
|
|
@@ -106,6 +106,11 @@ class Chef
|
|
106
106
|
:long => "--prerelease",
|
107
107
|
:description => "Install the pre-release chef gems"
|
108
108
|
|
109
|
+
option :bootstrap_version,
|
110
|
+
:long => "--bootstrap-version VERSION",
|
111
|
+
:description => "The version of Chef to install",
|
112
|
+
:proc => Proc.new { |v| Chef::Config[:knife][:bootstrap_version] = v }
|
113
|
+
|
109
114
|
option :region,
|
110
115
|
:long => "--region REGION",
|
111
116
|
:description => "Your AWS region",
|
@@ -184,6 +189,11 @@ class Chef
|
|
184
189
|
|
185
190
|
ami = connection.images.get(locate_config_value(:image))
|
186
191
|
|
192
|
+
if ami.nil?
|
193
|
+
ui.error("You have not provided a valid image (AMI) value. Please note the short option for this value recently changed from '-i' to '-I'.")
|
194
|
+
exit 1
|
195
|
+
end
|
196
|
+
|
187
197
|
server_def = {
|
188
198
|
:image_id => locate_config_value(:image),
|
189
199
|
:groups => config[:security_groups],
|
@@ -288,6 +298,7 @@ class Chef
|
|
288
298
|
end
|
289
299
|
end
|
290
300
|
end
|
301
|
+
puts "#{ui.color("Environment", :cyan)}: #{config[:environment] || '_default'}"
|
291
302
|
puts "#{ui.color("Run List", :cyan)}: #{config[:run_list].join(', ')}"
|
292
303
|
end
|
293
304
|
|
@@ -299,6 +310,7 @@ class Chef
|
|
299
310
|
bootstrap.config[:identity_file] = config[:identity_file]
|
300
311
|
bootstrap.config[:chef_node_name] = config[:chef_node_name] || server.id
|
301
312
|
bootstrap.config[:prerelease] = config[:prerelease]
|
313
|
+
bootstrap.config[:bootstrap_version] = locate_config_value(:bootstrap_version)
|
302
314
|
bootstrap.config[:distro] = locate_config_value(:distro)
|
303
315
|
bootstrap.config[:use_sudo] = true
|
304
316
|
bootstrap.config[:template_file] = locate_config_value(:template_file)
|
@@ -75,7 +75,7 @@ class Chef
|
|
75
75
|
server_list << (server.flavor_id == nil ? "" : server.flavor_id)
|
76
76
|
server_list << (server.image_id == nil ? "" : server.image_id)
|
77
77
|
server_list << server.groups.join(", ")
|
78
|
-
server_list << server.state
|
78
|
+
server_list << (server.state == nil ? "" : server.state)
|
79
79
|
end
|
80
80
|
puts ui.list(server_list, :columns_across, 7)
|
81
81
|
|
data/lib/knife-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: knife-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Adam Jacob
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-05-02 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|