madeira 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/madeira/provider/ec2.rb +7 -0
- data/lib/madeira/ui/create_command.rb +0 -1
- data/lib/madeira/ui/list_command.rb +16 -0
- data/lib/madeira/version.rb +1 -1
- metadata +5 -4
data/lib/madeira/provider/ec2.rb
CHANGED
@@ -31,6 +31,13 @@ module Madeira
|
|
31
31
|
server
|
32
32
|
end
|
33
33
|
|
34
|
+
# list all instances in a region
|
35
|
+
#
|
36
|
+
def list(options={})
|
37
|
+
connect(options)
|
38
|
+
servers = @fog.servers.all
|
39
|
+
tp servers, :id, :availability_zone, :state, {:dns_name => {:width => 65}}, :public_ip_address, :private_ip_address, :tags, :flavor_id, :key_name, :security_group_ids
|
40
|
+
end
|
34
41
|
|
35
42
|
# terminate an instance
|
36
43
|
#
|
@@ -36,7 +36,6 @@ command :create do |c|
|
|
36
36
|
c.action do |global_options, options, args|
|
37
37
|
opts=global_options.merge(options)
|
38
38
|
server = Madeira::Provider::EC2.create(opts)
|
39
|
-
pp server
|
40
39
|
if opts[:bootstrap]
|
41
40
|
server.wait_for { print '.'; openport?(server.public_ip_address, 22) }
|
42
41
|
Madeira::Provisioner::Capistrano.bootstrap(opts.merge(:dns_name => server.dns_name))
|
@@ -0,0 +1,16 @@
|
|
1
|
+
desc 'list all instances in a region'
|
2
|
+
long_desc '''
|
3
|
+
This will list all instances running in a region.
|
4
|
+
'''
|
5
|
+
command :list do |c|
|
6
|
+
|
7
|
+
c.desc 'EC2 region'
|
8
|
+
c.long_desc 'Which EC2 region ?'
|
9
|
+
c.default_value 'ap-southeast-2'
|
10
|
+
c.flag :region
|
11
|
+
|
12
|
+
c.action do |global_options, options, args|
|
13
|
+
opts=global_options.merge(options)
|
14
|
+
Madeira::Provider::EC2.list(opts)
|
15
|
+
end
|
16
|
+
end
|
data/lib/madeira/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: madeira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/madeira.rb
|
138
138
|
- lib/madeira/ui/terminate_command.rb
|
139
139
|
- lib/madeira/ui/bootstrap_command.rb
|
140
|
+
- lib/madeira/ui/list_command.rb
|
140
141
|
- lib/madeira/ui/global_command.rb
|
141
142
|
- lib/madeira/ui/create_command.rb
|
142
143
|
- lib/madeira/provisioner/capistrano.rb
|
@@ -166,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
166
167
|
version: '0'
|
167
168
|
segments:
|
168
169
|
- 0
|
169
|
-
hash:
|
170
|
+
hash: 1169240156632221890
|
170
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
172
|
none: false
|
172
173
|
requirements:
|
@@ -175,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
176
|
version: '0'
|
176
177
|
segments:
|
177
178
|
- 0
|
178
|
-
hash:
|
179
|
+
hash: 1169240156632221890
|
179
180
|
requirements: []
|
180
181
|
rubyforge_project:
|
181
182
|
rubygems_version: 1.8.23
|