poolparty 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +103 -0
- data/VERSION.yml +3 -2
- data/config/jeweler.rb +1 -6
- data/lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb +29 -25
- metadata +5 -4
data/README.rdoc
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
= PoolParty
|
2
|
+
|
3
|
+
http://poolpartyrb.com
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
PoolParty makes cloud provisioning and management easy. PoolParty provides a unified interface for defining and managing cloud infrasturcure on different cloud providers (just Ec2 for now).
|
8
|
+
|
9
|
+
Code your cloud!
|
10
|
+
|
11
|
+
== SYNOPSIS:
|
12
|
+
|
13
|
+
PoolParty is written with the intention of being as application-agnostic as possible. It installs only the basic
|
14
|
+
required software to glue the cloud together on the instances as listed below.
|
15
|
+
|
16
|
+
== Quickstart
|
17
|
+
|
18
|
+
For instance, to start a basic cloud, let's write one:
|
19
|
+
|
20
|
+
pool "demo" do
|
21
|
+
cloud "app" do
|
22
|
+
instances 2..10
|
23
|
+
using :ec2
|
24
|
+
autscale
|
25
|
+
security_group do
|
26
|
+
authorize :from_port => 22, :to_port => 22
|
27
|
+
end
|
28
|
+
load_balancer do
|
29
|
+
listener :external_port => 8080, :internal_port => 8080, :protocol => 'tcp'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
Simply by issuing the command:
|
35
|
+
|
36
|
+
cloud start
|
37
|
+
|
38
|
+
This will create an ec2 auto scaling group that will launch the minimum_instances (2 in this case,) inside a security group. The default naming of most objects, such as security_groups, auto scaling groups, launch_configurations, load_balancers and keypairs follow the poolname-cloudname convention.
|
39
|
+
There are a number of commands PoolParty offers to interact with your cloud. They include:
|
40
|
+
|
41
|
+
* <tt>cloud start</tt>
|
42
|
+
* <tt>cloud terminate</tt>
|
43
|
+
* <tt>cloud reboot</tt>
|
44
|
+
* <tt>cloud configure</tt>
|
45
|
+
* <tt>cloud compile</tt>
|
46
|
+
* <tt>cloud console</tt>
|
47
|
+
* <tt>cloud expand</tt>
|
48
|
+
* <tt>cloud contract</tt>
|
49
|
+
* <tt>cloud list</tt>
|
50
|
+
* <tt>cloud show</tt>
|
51
|
+
* <tt>cloud ssh</tt>
|
52
|
+
|
53
|
+
Clouds are distinguished by security groups. If a security group is not specified in your cloud block, one will be created based on the naming convention poolname-cloudname.
|
54
|
+
|
55
|
+
== Extending
|
56
|
+
|
57
|
+
To add a cloud_provider, there are four methods that need to be implemented. Simply sublcass the CloudProviders module and require it in your clouds.rb (or commit it back to PoolParty). Those four methods are:
|
58
|
+
|
59
|
+
* <tt>run_instance</tt>
|
60
|
+
* <tt>terminate_instance</tt>
|
61
|
+
* <tt>describe_instances</tt>
|
62
|
+
* <tt>describe_instance</tt>
|
63
|
+
|
64
|
+
== Examples
|
65
|
+
Checkout the [examples](examples/) directory and its README for some more ideas and examples.
|
66
|
+
|
67
|
+
That's it!
|
68
|
+
|
69
|
+
More documentation can be found at the site: <a href="http://poolpartyrb.com">http://poolpartyrb.com</a>.
|
70
|
+
|
71
|
+
== REQUIREMENTS:
|
72
|
+
|
73
|
+
* Ruby
|
74
|
+
|
75
|
+
== INSTALL:
|
76
|
+
from gemcutter.org;
|
77
|
+
|
78
|
+
sudo gem install poolparty
|
79
|
+
|
80
|
+
== LICENSE:
|
81
|
+
|
82
|
+
(The MIT License)
|
83
|
+
|
84
|
+
Copyright (c) 2009 Ari Lerner, CloudTeam
|
85
|
+
|
86
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
87
|
+
a copy of this software and associated documentation files (the
|
88
|
+
'Software'), to deal in the Software without restriction, including
|
89
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
90
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
91
|
+
permit persons to whom the Software is furnished to do so, subject to
|
92
|
+
the following conditions:
|
93
|
+
|
94
|
+
The above copyright notice and this permission notice shall be
|
95
|
+
included in all copies or substantial portions of the Software.
|
96
|
+
|
97
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
98
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
99
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
100
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
101
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
102
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
103
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/VERSION.yml
CHANGED
data/config/jeweler.rb
CHANGED
@@ -25,19 +25,14 @@ end
|
|
25
25
|
s.test_files = Dir["test/**/test_*.rb"]
|
26
26
|
|
27
27
|
s.files = (%w(Rakefile README.rdoc License.txt VERSION.yml) + Dir["{config,examples,lib,test,tasks,script,generators,bin,vendor}/**/*"])
|
28
|
-
s.files += ["vendor/erlang/hermes/ebin/*.tar.gz"]
|
29
|
-
|
30
|
-
s.files.exclude 'vendor/erlang/hermes'
|
31
|
-
s.files.exclude 'examples/thrift/**/*.beam'
|
32
28
|
# s.files.exclude "**/*/erl_crash.dump"
|
33
29
|
|
34
30
|
s.has_rdoc = true
|
35
|
-
s.extra_rdoc_files = ["README.rdoc", "License.txt", 'History.txt']
|
36
31
|
s.require_paths = ["lib"]
|
37
32
|
s.rdoc_options = ['--quiet', '--title', 'PoolParty documentation',
|
38
33
|
# "index.html",
|
39
34
|
"--line-numbers",
|
40
|
-
"--main", "README"
|
35
|
+
"--main", "README.rdoc"
|
41
36
|
]
|
42
37
|
|
43
38
|
end
|
@@ -113,31 +113,35 @@ module CloudProviders
|
|
113
113
|
elastic_load_balancers.select {|lc| lc.name =~ /#{name}/ }.flatten
|
114
114
|
end
|
115
115
|
def elastic_load_balancers
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
116
|
+
begin
|
117
|
+
@elastic_load_balancers ||= elb.describe_load_balancers.DescribeLoadBalancersResult.LoadBalancerDescriptions.member.map do |lb|
|
118
|
+
{
|
119
|
+
:created_time => lb["CreatedTime"],
|
120
|
+
:availability_zones => (lb["AvailabilityZones"]["member"] rescue []),
|
121
|
+
:dns_name => lb["DNSName"],
|
122
|
+
:name => lb["LoadBalancerName"],
|
123
|
+
:instances => (g["Instances"]["member"] rescue []).map {|i| {:instance_id => i["InstanceId"]}},
|
124
|
+
:health_check => ([lb["HealthCheck"]] rescue []).map do |hc|
|
125
|
+
{
|
126
|
+
:healthy_threshold => hc["HealthyThreshold"],
|
127
|
+
:timeout => hc["Timeout"],
|
128
|
+
:unhealthy_threshold => hc["UnhealthyThreshold"],
|
129
|
+
:interval => hc["Interval"],
|
130
|
+
:target => hc["Target"]
|
131
|
+
}
|
132
|
+
end,
|
133
|
+
:listeners => (lb["Listeners"]["member"] rescue []).map do |listener|
|
134
|
+
{
|
135
|
+
:instance_port => listener["InstancePort"],
|
136
|
+
:protocol => listener["Protocol"],
|
137
|
+
:load_balancer_port => listener["LoadBalancerPort"]
|
138
|
+
}
|
139
|
+
end
|
140
|
+
}
|
141
|
+
end
|
142
|
+
rescue Exception => e
|
143
|
+
[]
|
144
|
+
end
|
141
145
|
end
|
142
146
|
def instance_healths
|
143
147
|
@instance_healths ||=
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poolparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-
|
14
|
+
date: 2009-12-01 00:00:00 -08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies: []
|
17
17
|
|
@@ -35,9 +35,10 @@ executables:
|
|
35
35
|
extensions: []
|
36
36
|
|
37
37
|
extra_rdoc_files:
|
38
|
-
-
|
38
|
+
- README.rdoc
|
39
39
|
files:
|
40
40
|
- License.txt
|
41
|
+
- README.rdoc
|
41
42
|
- Rakefile
|
42
43
|
- VERSION.yml
|
43
44
|
- bin/cloud
|
@@ -502,7 +503,7 @@ rdoc_options:
|
|
502
503
|
- PoolParty documentation
|
503
504
|
- --line-numbers
|
504
505
|
- --main
|
505
|
-
- README
|
506
|
+
- README.rdoc
|
506
507
|
require_paths:
|
507
508
|
- lib
|
508
509
|
required_ruby_version: !ruby/object:Gem::Requirement
|