auser-poolparty 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/Manifest.txt +1 -0
- data/PostInstall.txt +1 -1
- data/bin/cloud-refresh +4 -2
- data/config/requirements.rb +1 -1
- data/lib/poolparty/base_packages/haproxy.rb +4 -4
- data/lib/poolparty/base_packages/heartbeat.rb +31 -29
- data/lib/poolparty/base_packages/poolparty.rb +16 -10
- data/lib/poolparty/core/array.rb +3 -0
- data/lib/poolparty/core/kernel.rb +5 -2
- data/lib/poolparty/core/string.rb +5 -1
- data/lib/poolparty/helpers/provisioners/master.rb +5 -4
- data/lib/poolparty/helpers/provisioners/slave.rb +1 -1
- data/lib/poolparty/plugins/gem_package.rb +16 -2
- data/lib/poolparty/plugins/git.rb +19 -17
- data/lib/poolparty/pool/resource.rb +13 -6
- data/lib/poolparty/pool/resources/class_package.rb +2 -2
- data/lib/poolparty/pool/resources/exec.rb +6 -2
- data/lib/poolparty/pool/resources/file.rb +2 -2
- data/lib/poolparty/pool/resources/remote_file.rb +3 -1
- data/lib/poolparty/templates/cib.xml +0 -1
- data/lib/poolparty/templates/ha.cf +1 -1
- data/lib/poolparty/templates/haproxy.conf +3 -3
- data/lib/poolparty/templates/puppet.conf +1 -1
- data/lib/poolparty/version.rb +1 -1
- data/poolparty.gemspec +4 -4
- data/script/txt2html +2 -2
- data/spec/poolparty/core/array_spec.rb +5 -0
- data/spec/poolparty/core/string_spec.rb +7 -0
- data/spec/poolparty/pool/cloud_spec.rb +1 -1
- data/spec/poolparty/pool/resource_spec.rb +19 -0
- data/website/index.html +44 -18
- data/website/index.txt +41 -18
- data/website/stylesheets/code.css +29 -0
- data/website/stylesheets/screen.css +27 -18
- data/website/template.html.erb +1 -0
- metadata +4 -3
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/PostInstall.txt
CHANGED
data/bin/cloud-refresh
CHANGED
@@ -17,8 +17,10 @@ include Remote
|
|
17
17
|
@clouds.each do |name, cloud|
|
18
18
|
|
19
19
|
with_cloud(cloud, {:testing => o.testing}) do
|
20
|
-
cmd =
|
21
|
-
|
20
|
+
cmd = <<-EOE
|
21
|
+
puppetrun --host #{list_of_node_names.join(", --host ")}
|
22
|
+
EOE
|
23
|
+
run_command_on(cmd.runnable, master)
|
22
24
|
end
|
23
25
|
|
24
26
|
end
|
data/config/requirements.rb
CHANGED
@@ -20,10 +20,10 @@ module PoolParty
|
|
20
20
|
has_service(:name => "haproxy")
|
21
21
|
|
22
22
|
# Tempalte variables
|
23
|
-
variable(:name => "
|
24
|
-
variable(:name => "
|
25
|
-
variable(:name => "
|
26
|
-
variable(:name => "
|
23
|
+
variable(:name => "name_haproxy", :value => "#{@parent.name}")
|
24
|
+
variable(:name => "nodenames_haproxy", :value => list_of_node_names)
|
25
|
+
variable(:name => "node_ips_haproxy", :value => list_of_node_ips)
|
26
|
+
variable(:name => "ports_haproxy", :value => ([(self.respond_to?(:port) ? port : Base.port)].flatten))
|
27
27
|
variable(:name => "forwarding_port", :value => (respond_to?(:forwarding_port) ? forwarding_port : Base.forwarding_port))
|
28
28
|
variable(:name => "proxy_mode", :value => (respond_to?(:proxy_mode) ? proxy_mode : Base.proxy_mode))
|
29
29
|
|
@@ -2,40 +2,42 @@ module PoolParty
|
|
2
2
|
class Base
|
3
3
|
plugin :heartbeat do
|
4
4
|
|
5
|
-
def enable
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
def enable
|
6
|
+
execute_if("$hostname", "master") do
|
7
|
+
has_package(:name => "heartbeat-2", :ensure => "installed")
|
8
|
+
has_service(:name => "heartbeat", :hasstatus => true) do
|
9
|
+
ensures "running"
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
+
has_exec(:name => "heartbeat-update-cib", :command => "/usr/sbin/cibadmin -R -x /etc/ha.d/cib.xml", :refreshonly => true)
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
# variables for the templates
|
15
|
+
has_variable({:name => "ha_nodenames", :value => list_of_node_names})
|
16
|
+
has_variable({:name => "ha_node_ips", :value => list_of_node_ips})
|
17
|
+
has_variable({:name => "ha_port", :value => (self.respond_to?(:port) ? port : Base.port)})
|
17
18
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
# These can also be passed in via hash
|
20
|
+
has_remotefile(:name => "/etc/ha.d/ha.cf") do
|
21
|
+
mode 444
|
22
|
+
requires 'Package["heartbeat-2"]'
|
23
|
+
notify 'Service["heartbeat"]'
|
24
|
+
template File.join(File.dirname(__FILE__), "..", "templates/ha.cf")
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
has_remotefile(:name => "/etc/ha.d/authkeys") do
|
28
|
+
mode 400
|
29
|
+
requires 'Package["heartbeat-2"]'
|
30
|
+
notify 'Service["heartbeat"]'
|
31
|
+
template File.join(File.dirname(__FILE__), "..", "templates/authkeys")
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
has_remotefile(:name => "/etc/ha.d/cib.xml") do
|
35
|
+
mode 444
|
36
|
+
requires 'Package["heartbeat-2"]'
|
37
|
+
notify 'Exec["heartbeat-update-cib"]'
|
38
|
+
template File.join(File.dirname(__FILE__), "..", "templates/cib.xml")
|
39
|
+
end
|
40
|
+
end
|
39
41
|
|
40
42
|
end
|
41
43
|
end
|
@@ -5,22 +5,28 @@ module PoolParty
|
|
5
5
|
def enable
|
6
6
|
has_package(:name => "erlang")
|
7
7
|
# These should be installed automagically by poolparty, but just in case
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
has_gempackage(:name => "activesupport")
|
9
|
+
has_gempackage(:name => "logging")
|
10
|
+
has_gempackage(:name => "hoe")
|
11
|
+
has_gempackage(:name => "xml-simple")
|
12
|
+
has_gempackage(:name => "ParseTree", :version => "2.2.0", :requires => gempackage(:name => "hoe"))
|
13
|
+
|
14
|
+
has_gempackage(:name => "RubyInline", :requires => gempackage(:name => "ParseTree"))
|
15
|
+
has_gempackage(:name => "open4", :requires => gempackage(:name => "hoe"))
|
16
|
+
has_gempackage(:name => "ruby2ruby", :requires => gempackage(:name => "ParseTree"))
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
has_gempackage(:name => "grempe-amazon-ec2", :source => "http://gems.github.com", :requires => gempackage(:name => "xml-simple"))
|
19
|
+
has_gempackage(:name => "auser-poolparty", :source => "http://gems.github.com", :requires => [gempackage(:name => "activesupport"), gempackage(:name => "ParseTree")])
|
20
|
+
|
19
21
|
# Build hostsfile
|
20
22
|
# TODO: COME BACK AND CLEAN THIS UP
|
21
23
|
(self.respond_to?(:list_of_running_instances) ? self : parent).list_of_running_instances.each do |ri|
|
22
24
|
has_host({:name => "#{ri.name}", :ip => ri.ip })
|
23
25
|
end
|
26
|
+
|
27
|
+
has_cron({:command => "cloud-maintain"}) do
|
28
|
+
minute "*/5"
|
29
|
+
end
|
24
30
|
# has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
|
25
31
|
end
|
26
32
|
|
data/lib/poolparty/core/array.rb
CHANGED
@@ -10,8 +10,11 @@ module Kernel
|
|
10
10
|
block.in_context(klass_or_obj).call
|
11
11
|
end
|
12
12
|
def load_p(dir)
|
13
|
-
Dir["#{dir}
|
14
|
-
|
13
|
+
Dir["#{dir}/*.rb"].each do |file|
|
14
|
+
require "#{file}" if ::FileTest.file?(file)
|
15
|
+
end
|
16
|
+
Dir["#{dir}/*"].each do |dir|
|
17
|
+
load_p(dir) if ::FileTest.directory?(dir)
|
15
18
|
end
|
16
19
|
end
|
17
20
|
def with_warnings_suppressed
|
@@ -33,7 +33,11 @@ class String
|
|
33
33
|
def to_option_string(ns=[])
|
34
34
|
a_template = (self =~ /template/) == 0
|
35
35
|
a_service = self =~ /^[A-Z][a-zA-Z]*\[[a-zA-Z0-9\-\.\"\'_\$\{\}\/]*\]/
|
36
|
-
(
|
36
|
+
if is_a?(PoolParty::Resources::Resource)
|
37
|
+
self.to_s
|
38
|
+
else
|
39
|
+
(a_service || a_template) ? "#{self}" : "'#{self}'"
|
40
|
+
end
|
37
41
|
end
|
38
42
|
# Refactor this guy to get the class if the class is defined, and not always create a new one
|
39
43
|
# although, it doesn't really matter as ruby will just reopen the class
|
@@ -23,13 +23,13 @@ module PoolParty
|
|
23
23
|
setup_basic_structure,
|
24
24
|
setup_configs,
|
25
25
|
setup_fileserver,
|
26
|
-
setup_autosigning,
|
27
|
-
start_puppetmaster
|
26
|
+
setup_autosigning,
|
28
27
|
] << configure_tasks
|
29
28
|
end
|
30
29
|
|
31
30
|
def configure_tasks
|
32
31
|
[
|
32
|
+
start_puppetmaster,
|
33
33
|
create_local_node,
|
34
34
|
move_templates,
|
35
35
|
create_poolparty_manifest,
|
@@ -121,13 +121,14 @@ mv #{Base.remote_storage_path}/#{Base.tmp_path}/#{@cloud.full_keypair_name} #{@c
|
|
121
121
|
<<-EOS
|
122
122
|
ps aux | grep puppetmasterd | awk '{print $2}' | xargs kill
|
123
123
|
rm -rf /etc/puppet/ssl
|
124
|
-
puppetmasterd
|
124
|
+
puppetmasterd --verbose
|
125
125
|
EOS
|
126
126
|
end
|
127
127
|
|
128
128
|
def restart_puppetd
|
129
129
|
<<-EOS
|
130
|
-
puppetd --
|
130
|
+
puppetd --test
|
131
|
+
puppetd --listen --fqdn=#{@instance.name}
|
131
132
|
EOS
|
132
133
|
end
|
133
134
|
end
|
@@ -18,7 +18,7 @@ module PoolParty
|
|
18
18
|
def setup_puppet
|
19
19
|
<<-EOE
|
20
20
|
puppetd --mkusers
|
21
|
-
if [ -z "$(grep -v '#' /etc/hosts | grep '
|
21
|
+
if [ -z "$(grep -v '#' /etc/hosts | grep 'master')" ]; then echo "#{master_ip} puppet master" >> /etc/hosts; else echo "host already set"; fi
|
22
22
|
mv #{Base.remote_storage_path}/#{Base.tmp_path}/namespaceauth.conf /etc/puppet/namespaceauth.conf
|
23
23
|
EOE
|
24
24
|
end
|
@@ -3,13 +3,27 @@ module PoolParty
|
|
3
3
|
|
4
4
|
virtual_resource(:gempackage) do
|
5
5
|
|
6
|
+
# When we call gempackage, we want the exec to run on the directory we suggest
|
7
|
+
# we also only want it to run if there is NOT a local gem already installed with
|
8
|
+
# the package details (version and name)
|
6
9
|
def loaded(opts={})
|
7
|
-
has_exec(:name => "gem-package-#{name}", :cwd => "/tmp", :path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/var/lib/gems/1.8/bin") do
|
8
|
-
command "gem install -y --no-ri --no-rdoc #{"--version
|
10
|
+
has_exec(opts.merge({:name => "gem-package-#{name}", :cwd => "/tmp", :path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/var/lib/gems/1.8/bin"})) do
|
11
|
+
command "gem install -y --no-ri --no-rdoc #{"--version #{version}" if @parent.version} #{"--source #{@parent.source}" if @parent.source} #{@parent.name}"
|
9
12
|
ifnot "gem list --local #{@parent.name} | grep #{@parent.name} #{"| grep #{@parent.version}" if @parent.version}"
|
10
13
|
end
|
11
14
|
end
|
12
15
|
|
16
|
+
# Because we are only running this one command, we want to make sure that when we
|
17
|
+
# require it in another resource, that it is appropriately labeled
|
18
|
+
def class_type_name
|
19
|
+
"Exec"
|
20
|
+
end
|
21
|
+
# Additionally, because we change the name in the exec when required, we have to reflect
|
22
|
+
# it here in the key. This is just so poolparty is aware of the resource when looking for
|
23
|
+
# it in a requires statement
|
24
|
+
def key
|
25
|
+
"gem-package-#{name}"
|
26
|
+
end
|
13
27
|
end
|
14
28
|
|
15
29
|
end
|
@@ -12,23 +12,25 @@ module PoolParty
|
|
12
12
|
has_package(:name => "git-core")
|
13
13
|
end
|
14
14
|
|
15
|
-
def has_git_repos
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
15
|
+
def has_git_repos
|
16
|
+
with_options(:requires => 'Package["git-core"]') do
|
17
|
+
has_directory(:name => "#{path}")
|
18
|
+
|
19
|
+
exec({:name => "git-#{name}"}) do
|
20
|
+
command @parent.user ? "git clone #{@parent.user}@#{@parent.source} #{@parent.path}" : "git clone #{@parent.source} #{@parent.path}"
|
21
|
+
cwd "#{::File.dirname(@parent.path) if @parent.path}"
|
22
|
+
creates "#{@parent.path}"
|
23
|
+
end
|
24
|
+
|
25
|
+
exec(:name => "git-update-#{name}", :cwd => "#{path}") do
|
26
|
+
command "git pull"
|
27
|
+
requires "Exec['git-#{@parent.name}']"
|
28
|
+
end
|
29
|
+
|
30
|
+
if symlink
|
31
|
+
has_file(:name => "#{symlink}") do
|
32
|
+
ensures @parent.path
|
33
|
+
end
|
32
34
|
end
|
33
35
|
end
|
34
36
|
end
|
@@ -18,8 +18,13 @@ module PoolParty
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def add_resource(type, opts={}, parent=self, &block)
|
21
|
-
|
22
|
-
|
21
|
+
resource = get_resource(type, opts[:name])
|
22
|
+
if resource
|
23
|
+
return resource
|
24
|
+
else
|
25
|
+
returning "PoolParty::Resources::#{type.to_s.camelize}".classify.constantize.new(opts, parent, &block) do |o|
|
26
|
+
resource(type) << o
|
27
|
+
end
|
23
28
|
end
|
24
29
|
end
|
25
30
|
|
@@ -99,7 +104,7 @@ module PoolParty
|
|
99
104
|
# Overrides for syntax
|
100
105
|
# Allows us to send require to require a resource
|
101
106
|
def require(str="")
|
102
|
-
options[:require]
|
107
|
+
options[:require]
|
103
108
|
end
|
104
109
|
def requires(str="")
|
105
110
|
options.merge!(:require => str)
|
@@ -221,6 +226,10 @@ module PoolParty
|
|
221
226
|
|
222
227
|
end.join("\n")
|
223
228
|
end
|
229
|
+
|
230
|
+
def to_s
|
231
|
+
"#{class_type_name.capitalize}['#{key}']"
|
232
|
+
end
|
224
233
|
end
|
225
234
|
|
226
235
|
# Adds two methods to the module
|
@@ -245,6 +254,4 @@ module PoolParty
|
|
245
254
|
end
|
246
255
|
|
247
256
|
end
|
248
|
-
end
|
249
|
-
|
250
|
-
Kernel.load_p File.dirname(__FILE__) + "/resources/*"
|
257
|
+
end
|
@@ -27,14 +27,14 @@ module PoolParty
|
|
27
27
|
def to_string
|
28
28
|
returning String.new do |output|
|
29
29
|
output << "# #{name.sanitize}"
|
30
|
-
output << "\nclass #{name.sanitize} {\n"
|
30
|
+
output << "\nclass #{name.sanitize.downcase} {\n"
|
31
31
|
output << resources_string_from_resources(resources)
|
32
32
|
output << "\n}\n"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
def include_string
|
37
|
-
"include #{name.sanitize}"
|
37
|
+
"include #{name.sanitize.downcase}"
|
38
38
|
end
|
39
39
|
|
40
40
|
def name(*args)
|
@@ -7,9 +7,13 @@ module PoolParty
|
|
7
7
|
:path => "/usr/bin:/bin:/usr/local/bin:$PATH"
|
8
8
|
})
|
9
9
|
|
10
|
-
|
10
|
+
# Execs cannot have the following parameters
|
11
|
+
# We use version in the gempackage resource
|
12
|
+
# So we have to exclude it here. Alternatively, we could
|
13
|
+
# exclude it in the gempackage, but this is an example
|
14
|
+
# of how to exclude it as well
|
11
15
|
def disallowed_options
|
12
|
-
[:ensure, :name]
|
16
|
+
[:ensure, :name, :source, :version]
|
13
17
|
end
|
14
18
|
|
15
19
|
def key
|
@@ -1 +0,0 @@
|
|
1
|
-
<!-- cib.xml -->
|
@@ -28,9 +28,9 @@ defaults
|
|
28
28
|
stats uri /poolparty
|
29
29
|
stats realm Statistics\ for\ PoolParty
|
30
30
|
|
31
|
-
listen <%=
|
32
|
-
bind 0.0.0.0:<%=
|
33
|
-
<%
|
31
|
+
listen <%= name_haproxy %>
|
32
|
+
bind 0.0.0.0:<%= ports_haproxy.join(",0.0.0.0:") %>
|
33
|
+
<% node_ips_haproxy.each_with_index do |ip, index| -%>
|
34
34
|
cookie POOLPARTYPARTY
|
35
35
|
server node<%= index %> <%= ip %>:<%= forwarding_port %> weight 1 check cookie
|
36
36
|
<% end -%>
|
data/lib/poolparty/version.rb
CHANGED
data/poolparty.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{poolparty}
|
3
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.6"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Ari Lerner"]
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ["ari.lerner@citrusbyte.com"]
|
10
10
|
s.executables = ["cloud", "cloud-add-keypair", "cloud-configure", "cloud-contract", "cloud-expand", "cloud-list", "cloud-maintain", "cloud-osxcopy", "cloud-provision", "cloud-refresh", "cloud-ssh", "cloud-start", "cloud-terminate", "pool", "pool-console", "pool-describe", "pool-list", "pool-provision", "pool-spec", "pool-start", "pool-start-monitor"]
|
11
11
|
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "website/index.txt"]
|
12
|
-
s.files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "bin/cloud", "bin/cloud-add-keypair", "bin/cloud-configure", "bin/cloud-contract", "bin/cloud-expand", "bin/cloud-list", "bin/cloud-maintain", "bin/cloud-osxcopy", "bin/cloud-provision", "bin/cloud-refresh", "bin/cloud-ssh", "bin/cloud-start", "bin/cloud-terminate", "bin/pool", "bin/pool-console", "bin/pool-describe", "bin/pool-list", "bin/pool-provision", "bin/pool-spec", "bin/pool-start", "bin/pool-start-monitor", "config/hoe.rb", "config/requirements.rb", "examples/basic.rb", "examples/plugin_without_plugin_directory.rb", "examples/poolparty.rb", "examples/with_apache_plugin.rb", "generators/poolspec/USAGE", "generators/poolspec/poolspec_generator.rb", "generators/poolspec/templates/pool_spec_template.erb", "lib/erlang/eb_server.erl", "lib/poolparty.rb", "lib/poolparty/base_packages/haproxy.rb", "lib/poolparty/base_packages/heartbeat.rb", "lib/poolparty/base_packages/poolparty.rb", "lib/poolparty/base_packages/ruby.rb", "lib/poolparty/core/array.rb", "lib/poolparty/core/exception.rb", "lib/poolparty/core/float.rb", "lib/poolparty/core/hash.rb", "lib/poolparty/core/kernel.rb", "lib/poolparty/core/module.rb", "lib/poolparty/core/my_open_struct.rb", "lib/poolparty/core/object.rb", "lib/poolparty/core/proc.rb", "lib/poolparty/core/string.rb", "lib/poolparty/core/symbol.rb", "lib/poolparty/core/time.rb", "lib/poolparty/exceptions/RemoteException.rb", "lib/poolparty/exceptions/ResourceException.rb", "lib/poolparty/exceptions/RuntimeException.rb", "lib/poolparty/exceptions/SpecException.rb", "lib/poolparty/exceptions/TemplateNotFound.rb", "lib/poolparty/helpers/binary.rb", "lib/poolparty/helpers/console.rb", "lib/poolparty/helpers/display.rb", "lib/poolparty/helpers/optioner.rb", "lib/poolparty/helpers/provisioner_base.rb", "lib/poolparty/helpers/provisioners/master.rb", "lib/poolparty/helpers/provisioners/slave.rb", "lib/poolparty/modules/cloud_resourcer.rb", "lib/poolparty/modules/configurable.rb", "lib/poolparty/modules/definable_resource.rb", "lib/poolparty/modules/file_writer.rb", "lib/poolparty/modules/method_missing_sugar.rb", "lib/poolparty/modules/output.rb", "lib/poolparty/modules/pretty_printer.rb", "lib/poolparty/modules/s3_string.rb", "lib/poolparty/modules/safe_instance.rb", "lib/poolparty/monitors/base_monitor.rb", "lib/poolparty/net/remote.rb", "lib/poolparty/net/remote_bases/ec2.rb", "lib/poolparty/net/remote_instance.rb", "lib/poolparty/net/remoter.rb", "lib/poolparty/net/remoter_base.rb", "lib/poolparty/plugins/gem_package.rb", "lib/poolparty/plugins/git.rb", "lib/poolparty/plugins/line.rb", "lib/poolparty/plugins/svn.rb", "lib/poolparty/pool/base.rb", "lib/poolparty/pool/cloud.rb", "lib/poolparty/pool/custom_resource.rb", "lib/poolparty/pool/loggable.rb", "lib/poolparty/pool/plugin.rb", "lib/poolparty/pool/plugin_model.rb", "lib/poolparty/pool/pool.rb", "lib/poolparty/pool/resource.rb", "lib/poolparty/pool/resources/class_package.rb", "lib/poolparty/pool/resources/conditional.rb", "lib/poolparty/pool/resources/cron.rb", "lib/poolparty/pool/resources/directory.rb", "lib/poolparty/pool/resources/exec.rb", "lib/poolparty/pool/resources/file.rb", "lib/poolparty/pool/resources/gem.rb", "lib/poolparty/pool/resources/host.rb", "lib/poolparty/pool/resources/package.rb", "lib/poolparty/pool/resources/remote_file.rb", "lib/poolparty/pool/resources/service.rb", "lib/poolparty/pool/resources/sshkey.rb", "lib/poolparty/pool/resources/variable.rb", "lib/poolparty/pool/script.rb", "lib/poolparty/templates/authkeys", "lib/poolparty/templates/cib.xml", "lib/poolparty/templates/fileserver.conf", "lib/poolparty/templates/gem", "lib/poolparty/templates/ha.cf", "lib/poolparty/templates/haproxy.conf", "lib/poolparty/templates/namespaceauth.conf", "lib/poolparty/templates/puppet.conf", "lib/poolparty/version.rb", "lib/poolpartycl.rb", "poolparty.gemspec", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "spec/poolparty/base_packages/haproxy_spec.rb", "spec/poolparty/base_packages/heartbeat_spec.rb", "spec/poolparty/bin/console_spec.rb", "spec/poolparty/core/array_spec.rb", "spec/poolparty/core/float.rb", "spec/poolparty/core/hash_spec.rb", "spec/poolparty/core/kernel_spec.rb", "spec/poolparty/core/module_spec.rb", "spec/poolparty/core/object_spec.rb", "spec/poolparty/core/string_spec.rb", "spec/poolparty/core/time_spec.rb", "spec/poolparty/helpers/binary_spec.rb", "spec/poolparty/helpers/display_spec.rb", "spec/poolparty/helpers/optioner_spec.rb", "spec/poolparty/helpers/provisioner_base_spec.rb", "spec/poolparty/helpers/provisioners/master_spec.rb", "spec/poolparty/helpers/provisioners/slave_spec.rb", "spec/poolparty/modules/cloud_resourcer_spec.rb", "spec/poolparty/modules/configurable_spec.rb", "spec/poolparty/modules/definable_resource.rb", "spec/poolparty/modules/file_writer_spec.rb", "spec/poolparty/modules/s3_string_spec.rb", "spec/poolparty/modules/tmp/willy/nilly.rb", "spec/poolparty/net/remote_bases/ec2_spec.rb", "spec/poolparty/net/remote_instance_spec.rb", "spec/poolparty/net/remote_spec.rb", "spec/poolparty/net/remoter_base_spec.rb", "spec/poolparty/net/remoter_spec.rb", "spec/poolparty/plugins/git_spec.rb", "spec/poolparty/plugins/line_spec.rb", "spec/poolparty/plugins/svn_spec.rb", "spec/poolparty/pool/base_spec.rb", "spec/poolparty/pool/cloud_spec.rb", "spec/poolparty/pool/configurers/files/ruby_basic.rb", "spec/poolparty/pool/configurers/files/ruby_plugins.rb", "spec/poolparty/pool/configurers/ruby_spec.rb", "spec/poolparty/pool/custom_resource_spec.rb", "spec/poolparty/pool/example_spec.rb", "spec/poolparty/pool/plugin_model_spec.rb", "spec/poolparty/pool/plugin_spec.rb", "spec/poolparty/pool/pool_spec.rb", "spec/poolparty/pool/resource_spec.rb", "spec/poolparty/pool/resources/class_package_spec.rb", "spec/poolparty/pool/resources/conditional_spec.rb", "spec/poolparty/pool/resources/cron_spec.rb", "spec/poolparty/pool/resources/directory_spec.rb", "spec/poolparty/pool/resources/exec_spec.rb", "spec/poolparty/pool/resources/file_spec.rb", "spec/poolparty/pool/resources/gem_spec.rb", "spec/poolparty/pool/resources/host_spec.rb", "spec/poolparty/pool/resources/package_spec.rb", "spec/poolparty/pool/resources/remote_file_spec.rb", "spec/poolparty/pool/resources/service_spec.rb", "spec/poolparty/pool/resources/sshkey_spec.rb", "spec/poolparty/pool/resources/variable_spec.rb", "spec/poolparty/pool/script_spec.rb", "spec/poolparty/pool/test_plugins/sshkey_test", "spec/poolparty/pool/test_plugins/virtual_host_template.erb", "spec/poolparty/pool/test_plugins/webserver.rb", "spec/poolparty/poolparty_spec.rb", "spec/poolparty/spec_helper.rb", "tasks/cloud.rake", "tasks/deployment.rake", "tasks/development.rake", "tasks/ec2.rake", "tasks/environment.rake", "tasks/instance.rake", "tasks/server.rake", "tasks/spec.rake", "tasks/website.rake", "test/test_generator_helper.rb", "test/test_helper.rb", "test/test_pool_spec_generator.rb", "test/test_poolparty.rb", "test_manifest.pp", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.html.erb"]
|
12
|
+
s.files = ["History.txt", "License.txt", "Manifest.txt", "PostInstall.txt", "README.txt", "Rakefile", "bin/cloud", "bin/cloud-add-keypair", "bin/cloud-configure", "bin/cloud-contract", "bin/cloud-expand", "bin/cloud-list", "bin/cloud-maintain", "bin/cloud-osxcopy", "bin/cloud-provision", "bin/cloud-refresh", "bin/cloud-ssh", "bin/cloud-start", "bin/cloud-terminate", "bin/pool", "bin/pool-console", "bin/pool-describe", "bin/pool-list", "bin/pool-provision", "bin/pool-spec", "bin/pool-start", "bin/pool-start-monitor", "config/hoe.rb", "config/requirements.rb", "examples/basic.rb", "examples/plugin_without_plugin_directory.rb", "examples/poolparty.rb", "examples/with_apache_plugin.rb", "generators/poolspec/USAGE", "generators/poolspec/poolspec_generator.rb", "generators/poolspec/templates/pool_spec_template.erb", "lib/erlang/eb_server.erl", "lib/poolparty.rb", "lib/poolparty/base_packages/haproxy.rb", "lib/poolparty/base_packages/heartbeat.rb", "lib/poolparty/base_packages/poolparty.rb", "lib/poolparty/base_packages/ruby.rb", "lib/poolparty/core/array.rb", "lib/poolparty/core/exception.rb", "lib/poolparty/core/float.rb", "lib/poolparty/core/hash.rb", "lib/poolparty/core/kernel.rb", "lib/poolparty/core/module.rb", "lib/poolparty/core/my_open_struct.rb", "lib/poolparty/core/object.rb", "lib/poolparty/core/proc.rb", "lib/poolparty/core/string.rb", "lib/poolparty/core/symbol.rb", "lib/poolparty/core/time.rb", "lib/poolparty/exceptions/RemoteException.rb", "lib/poolparty/exceptions/ResourceException.rb", "lib/poolparty/exceptions/RuntimeException.rb", "lib/poolparty/exceptions/SpecException.rb", "lib/poolparty/exceptions/TemplateNotFound.rb", "lib/poolparty/helpers/binary.rb", "lib/poolparty/helpers/console.rb", "lib/poolparty/helpers/display.rb", "lib/poolparty/helpers/optioner.rb", "lib/poolparty/helpers/provisioner_base.rb", "lib/poolparty/helpers/provisioners/master.rb", "lib/poolparty/helpers/provisioners/slave.rb", "lib/poolparty/modules/cloud_resourcer.rb", "lib/poolparty/modules/configurable.rb", "lib/poolparty/modules/definable_resource.rb", "lib/poolparty/modules/file_writer.rb", "lib/poolparty/modules/method_missing_sugar.rb", "lib/poolparty/modules/output.rb", "lib/poolparty/modules/pretty_printer.rb", "lib/poolparty/modules/s3_string.rb", "lib/poolparty/modules/safe_instance.rb", "lib/poolparty/monitors/base_monitor.rb", "lib/poolparty/net/remote.rb", "lib/poolparty/net/remote_bases/ec2.rb", "lib/poolparty/net/remote_instance.rb", "lib/poolparty/net/remoter.rb", "lib/poolparty/net/remoter_base.rb", "lib/poolparty/plugins/gem_package.rb", "lib/poolparty/plugins/git.rb", "lib/poolparty/plugins/line.rb", "lib/poolparty/plugins/svn.rb", "lib/poolparty/pool/base.rb", "lib/poolparty/pool/cloud.rb", "lib/poolparty/pool/custom_resource.rb", "lib/poolparty/pool/loggable.rb", "lib/poolparty/pool/plugin.rb", "lib/poolparty/pool/plugin_model.rb", "lib/poolparty/pool/pool.rb", "lib/poolparty/pool/resource.rb", "lib/poolparty/pool/resources/class_package.rb", "lib/poolparty/pool/resources/conditional.rb", "lib/poolparty/pool/resources/cron.rb", "lib/poolparty/pool/resources/directory.rb", "lib/poolparty/pool/resources/exec.rb", "lib/poolparty/pool/resources/file.rb", "lib/poolparty/pool/resources/gem.rb", "lib/poolparty/pool/resources/host.rb", "lib/poolparty/pool/resources/package.rb", "lib/poolparty/pool/resources/remote_file.rb", "lib/poolparty/pool/resources/service.rb", "lib/poolparty/pool/resources/sshkey.rb", "lib/poolparty/pool/resources/variable.rb", "lib/poolparty/pool/script.rb", "lib/poolparty/templates/authkeys", "lib/poolparty/templates/cib.xml", "lib/poolparty/templates/fileserver.conf", "lib/poolparty/templates/gem", "lib/poolparty/templates/ha.cf", "lib/poolparty/templates/haproxy.conf", "lib/poolparty/templates/namespaceauth.conf", "lib/poolparty/templates/puppet.conf", "lib/poolparty/version.rb", "lib/poolpartycl.rb", "poolparty.gemspec", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "spec/poolparty/base_packages/haproxy_spec.rb", "spec/poolparty/base_packages/heartbeat_spec.rb", "spec/poolparty/bin/console_spec.rb", "spec/poolparty/core/array_spec.rb", "spec/poolparty/core/float.rb", "spec/poolparty/core/hash_spec.rb", "spec/poolparty/core/kernel_spec.rb", "spec/poolparty/core/module_spec.rb", "spec/poolparty/core/object_spec.rb", "spec/poolparty/core/string_spec.rb", "spec/poolparty/core/time_spec.rb", "spec/poolparty/helpers/binary_spec.rb", "spec/poolparty/helpers/display_spec.rb", "spec/poolparty/helpers/optioner_spec.rb", "spec/poolparty/helpers/provisioner_base_spec.rb", "spec/poolparty/helpers/provisioners/master_spec.rb", "spec/poolparty/helpers/provisioners/slave_spec.rb", "spec/poolparty/modules/cloud_resourcer_spec.rb", "spec/poolparty/modules/configurable_spec.rb", "spec/poolparty/modules/definable_resource.rb", "spec/poolparty/modules/file_writer_spec.rb", "spec/poolparty/modules/s3_string_spec.rb", "spec/poolparty/modules/tmp/willy/nilly.rb", "spec/poolparty/net/remote_bases/ec2_spec.rb", "spec/poolparty/net/remote_instance_spec.rb", "spec/poolparty/net/remote_spec.rb", "spec/poolparty/net/remoter_base_spec.rb", "spec/poolparty/net/remoter_spec.rb", "spec/poolparty/plugins/git_spec.rb", "spec/poolparty/plugins/line_spec.rb", "spec/poolparty/plugins/svn_spec.rb", "spec/poolparty/pool/base_spec.rb", "spec/poolparty/pool/cloud_spec.rb", "spec/poolparty/pool/configurers/files/ruby_basic.rb", "spec/poolparty/pool/configurers/files/ruby_plugins.rb", "spec/poolparty/pool/configurers/ruby_spec.rb", "spec/poolparty/pool/custom_resource_spec.rb", "spec/poolparty/pool/example_spec.rb", "spec/poolparty/pool/plugin_model_spec.rb", "spec/poolparty/pool/plugin_spec.rb", "spec/poolparty/pool/pool_spec.rb", "spec/poolparty/pool/resource_spec.rb", "spec/poolparty/pool/resources/class_package_spec.rb", "spec/poolparty/pool/resources/conditional_spec.rb", "spec/poolparty/pool/resources/cron_spec.rb", "spec/poolparty/pool/resources/directory_spec.rb", "spec/poolparty/pool/resources/exec_spec.rb", "spec/poolparty/pool/resources/file_spec.rb", "spec/poolparty/pool/resources/gem_spec.rb", "spec/poolparty/pool/resources/host_spec.rb", "spec/poolparty/pool/resources/package_spec.rb", "spec/poolparty/pool/resources/remote_file_spec.rb", "spec/poolparty/pool/resources/service_spec.rb", "spec/poolparty/pool/resources/sshkey_spec.rb", "spec/poolparty/pool/resources/variable_spec.rb", "spec/poolparty/pool/script_spec.rb", "spec/poolparty/pool/test_plugins/sshkey_test", "spec/poolparty/pool/test_plugins/virtual_host_template.erb", "spec/poolparty/pool/test_plugins/webserver.rb", "spec/poolparty/poolparty_spec.rb", "spec/poolparty/spec_helper.rb", "tasks/cloud.rake", "tasks/deployment.rake", "tasks/development.rake", "tasks/ec2.rake", "tasks/environment.rake", "tasks/instance.rake", "tasks/server.rake", "tasks/spec.rake", "tasks/website.rake", "test/test_generator_helper.rb", "test/test_helper.rb", "test/test_pool_spec_generator.rb", "test/test_poolparty.rb", "test_manifest.pp", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/code.css", "website/stylesheets/screen.css", "website/template.html.erb"]
|
13
13
|
s.has_rdoc = true
|
14
14
|
s.homepage = %q{http://poolparty.rubyforge.org}
|
15
15
|
s.post_install_message = %q{Get ready to jump in the pool, you just installed poolpartyrb!
|
@@ -23,10 +23,10 @@ Please check out the documentation for any questions or check out the google gro
|
|
23
23
|
|
24
24
|
Don't forget to check out the plugin tutorial @ http://poolpartyrb.com for extending PoolParty!
|
25
25
|
|
26
|
-
For more information, check http://
|
26
|
+
For more information, check http://PoolPartyrb.com
|
27
27
|
On IRC:
|
28
28
|
irc.freenode.net
|
29
|
-
#
|
29
|
+
#poolpartyrb
|
30
30
|
|
31
31
|
*** Ari Lerner @ <arilerner@mac.com> ***}
|
32
32
|
s.rdoc_options = ["--main", "README.txt"]
|
data/script/txt2html
CHANGED
@@ -129,6 +129,13 @@ listen web_proxy 127.0.0.1:3000
|
|
129
129
|
it "should return File['/etc/apache2/conf.d/base.conf'] as a string" do
|
130
130
|
'File["/etc/apache2/conf.d/base.conf"]'.to_option_string.should == "File[\"/etc/apache2/conf.d/base.conf\"]"
|
131
131
|
end
|
132
|
+
it "should turn a resource into a requires file" do
|
133
|
+
@cloud = cloud :app do
|
134
|
+
file(:name => "franke")
|
135
|
+
end
|
136
|
+
@file = @cloud.resource(:file).first
|
137
|
+
@file.to_option_string.should == "File['franke']"
|
138
|
+
end
|
132
139
|
end
|
133
140
|
describe "sanitize" do
|
134
141
|
it "should remove the periods from the string" do
|
@@ -179,7 +179,7 @@ describe "Cloud" do
|
|
179
179
|
end
|
180
180
|
it "should have 3 resources" do
|
181
181
|
@cloud.add_poolparty_base_requirements
|
182
|
-
@cloud.number_of_resources.should
|
182
|
+
@cloud.number_of_resources.should > 3
|
183
183
|
end
|
184
184
|
it "should receive add_poolparty_base_requirements before building the manifest" do
|
185
185
|
@cloud.should_receive(:add_poolparty_base_requirements).once
|
@@ -220,5 +220,24 @@ describe "Resource" do
|
|
220
220
|
@file.parent.tangerine.should == "orange"
|
221
221
|
end
|
222
222
|
end
|
223
|
+
describe "fetching" do
|
224
|
+
before(:each) do
|
225
|
+
@file = file(:name => "pancakes")
|
226
|
+
end
|
227
|
+
it "should not create a new resource if the same resource exists" do
|
228
|
+
PoolParty::Resources::File.should_not_receive(:new)
|
229
|
+
file(:name => "pancakes")
|
230
|
+
end
|
231
|
+
it "should return the file previously created" do
|
232
|
+
get_resource(:file, "pancakes").should == @file
|
233
|
+
end
|
234
|
+
it "should be able to use the helper to grab the file" do
|
235
|
+
PoolParty::Resources::File.should_not_receive(:new)
|
236
|
+
file(:name => "pancakes").should == @file
|
237
|
+
end
|
238
|
+
it "should turn the resource into a string" do
|
239
|
+
@file.to_s.should == "File['pancakes']"
|
240
|
+
end
|
241
|
+
end
|
223
242
|
end
|
224
243
|
end
|
data/website/index.html
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
PoolParty
|
9
9
|
</title>
|
10
10
|
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<link href="stylesheets/code.css" media="screen" rel="stylesheet" type="text/css" />
|
11
12
|
<style>
|
12
13
|
|
13
14
|
</style>
|
@@ -31,46 +32,71 @@
|
|
31
32
|
<div id="main">
|
32
33
|
|
33
34
|
<h1>PoolParty</h1>
|
34
|
-
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/
|
35
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/poolparty"; return false'>
|
35
36
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/
|
37
|
+
<a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.6</a>
|
37
38
|
</div>
|
38
|
-
<h1
|
39
|
+
<h1>‘Easy cloud computing’</h1>
|
39
40
|
<h2>What</h2>
|
41
|
+
<p>A self-healing, load-balanced cloud computing solution. Combined with the power of <a href="http://reductivelabs.com/trac/puppet/">Puppet</a>, the <a href="http://www.linux-ha.org/">High Availability</a> project, ruby and erlang, PoolParty makes it easy and fun to set up your cloud! Currently, you can use it with ec2, but it’s not tied to any particular service. You can use PoolParty to manage and monitor your home network!</p>
|
40
42
|
<h2>Installing</h2>
|
41
|
-
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="
|
43
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="punct">--</span><span class="ident">source</span> <span class="ident">http</span><span class="punct">:/</span><span class="regex"></span><span class="punct">/</span><span class="ident">gems</span><span class="punct">.</span><span class="ident">github</span><span class="punct">.</span><span class="ident">com</span> <span class="ident">auser</span><span class="punct">-</span><span class="ident">poolparty</span></pre></p>
|
42
44
|
<h2>The basics</h2>
|
43
45
|
<h2>Demonstration of usage</h2>
|
46
|
+
<pre>
|
47
|
+
cloud spec [name]
|
48
|
+
</pre>
|
49
|
+
<p>This will create a basic spec for you in the spec directory. Then, write your spec file. There are examples in the repos as well as the one below:</p>
|
50
|
+
<p><pre class='syntax'>
|
51
|
+
<span class="comment"># Basic poolparty template with apache plugin</span>
|
52
|
+
<span class="ident">require</span> <span class="punct">"</span><span class="string">poolparty-apache2-plugin</span><span class="punct">"</span>
|
53
|
+
|
54
|
+
<span class="ident">pool</span> <span class="symbol">:app</span> <span class="keyword">do</span>
|
55
|
+
|
56
|
+
<span class="ident">instances</span> <span class="number">2</span><span class="punct">..</span><span class="number">5</span>
|
57
|
+
<span class="ident">port</span> <span class="number">80</span>
|
58
|
+
<span class="ident">ami</span> <span class="punct">"</span><span class="string">ami-1cd73375</span><span class="punct">"</span> <span class="comment"># Alestic Ubuntu AMI</span>
|
59
|
+
|
60
|
+
<span class="ident">cloud</span> <span class="symbol">:app</span> <span class="keyword">do</span>
|
61
|
+
|
62
|
+
<span class="ident">apache</span> <span class="keyword">do</span>
|
63
|
+
<span class="ident">installed_as_worker</span>
|
64
|
+
|
65
|
+
<span class="ident">has_virtualhost</span> <span class="keyword">do</span>
|
66
|
+
|
67
|
+
<span class="ident">name</span> <span class="punct">"</span><span class="string">poolpartyrb.com</span><span class="punct">"</span>
|
68
|
+
<span class="ident">listen</span><span class="punct">("</span><span class="string">8080</span><span class="punct">")</span>
|
69
|
+
<span class="ident">virtual_host_entry</span> <span class="punct">::</span><span class="constant">File</span><span class="punct">.</span><span class="ident">join</span><span class="punct">(</span><span class="constant">File</span><span class="punct">.</span><span class="ident">dirname</span><span class="punct">(</span><span class="constant">__FILE__</span><span class="punct">),</span> <span class="punct">"</span><span class="string">templates</span><span class="punct">",</span> <span class="punct">"</span><span class="string">virtual_host.conf.erb</span><span class="punct">")</span>
|
70
|
+
|
71
|
+
<span class="ident">has_git</span><span class="punct">(</span><span class="symbol">:name</span> <span class="punct">=></span> <span class="punct">"</span><span class="string">poolpartyrepos</span><span class="punct">",</span> <span class="symbol">:source</span> <span class="punct">=></span> <span class="punct">"</span><span class="string">git://github.com/auser/xnot.org.git</span><span class="punct">",</span> <span class="symbol">:path</span> <span class="punct">=></span> <span class="punct">"</span><span class="string">/var/www/xnot.org/public</span><span class="punct">")</span>
|
72
|
+
|
73
|
+
<span class="keyword">end</span>
|
74
|
+
<span class="keyword">end</span>
|
75
|
+
|
76
|
+
<span class="keyword">end</span>
|
77
|
+
|
78
|
+
<span class="keyword">end</span>
|
79
|
+
</pre></p>
|
44
80
|
<h2>Forum</h2>
|
45
81
|
<p><a href="http://groups.google.com/group/PoolParty">http://groups.google.com/group/PoolParty</a></p>
|
46
82
|
<h2>How to submit patches</h2>
|
47
83
|
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
48
|
-
<p>The trunk repository is <code>
|
49
|
-
<p><span class="caps">OOOORRRR</span></p>
|
84
|
+
<p>The trunk repository is <code>http://github.com/auser/poolparty</code> for anonymous access.</p>
|
50
85
|
<p>You can fetch the source from either:</p>
|
51
|
-
<ul>
|
52
|
-
<li>rubyforge: <span class="caps">MISSING</span> IN <span class="caps">ACTION</span></li>
|
53
|
-
</ul>
|
54
|
-
<p>When you do this, this message will magically disappear!</p>
|
55
|
-
<p>Or you can hack website/index.txt and make it all go away!!</p>
|
56
86
|
<ul>
|
57
87
|
<li>github: <a href="http://github.com/auser/PoolParty/tree/master">http://github.com/auser/PoolParty/tree/master</a></li>
|
58
88
|
</ul>
|
59
89
|
<pre>git clone git://github.com/auser/PoolParty.git</pre>
|
60
|
-
<ul>
|
61
|
-
<li>gitorious: <a href="git://gitorious.org/PoolParty/mainline.git">git://gitorious.org/PoolParty/mainline.git</a></li>
|
62
|
-
</ul>
|
63
|
-
<pre>git clone git://gitorious.org/PoolParty/mainline.git</pre>
|
64
90
|
<h3>Build and test instructions</h3>
|
65
|
-
<pre>cd PoolParty
|
91
|
+
<p><pre class='syntax'>cd PoolParty
|
66
92
|
rake test
|
67
|
-
rake install_gem</pre>
|
93
|
+
rake install_gem</pre></p>
|
68
94
|
<h2>License</h2>
|
69
95
|
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
70
96
|
<h2>Contact</h2>
|
71
97
|
<p>Comments are welcome. Send an email to <a href="mailto:ari.lerner@citrusbyte.com">Ari Lerner</a> email via the <a href="http://groups.google.com/group/PoolParty">forum</a></p>
|
72
98
|
<p class="coda">
|
73
|
-
<a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>,
|
99
|
+
<a href="http://blog.citrusbyte.com">Ari Lerner</a> at <a href="http://citrusbyte.com">CitrusByte</a>, 14th October 2008<br>
|
74
100
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
75
101
|
</p>
|
76
102
|
</div>
|
data/website/index.txt
CHANGED
@@ -1,21 +1,58 @@
|
|
1
1
|
h1. PoolParty
|
2
2
|
|
3
|
-
h1.
|
3
|
+
h1. 'Easy cloud computing'
|
4
4
|
|
5
5
|
|
6
6
|
h2. What
|
7
7
|
|
8
|
+
A self-healing, load-balanced cloud computing solution. Combined with the power of <a href="http://reductivelabs.com/trac/puppet/">Puppet</a>, the <a href="http://www.linux-ha.org/">High Availability</a> project, ruby and erlang, PoolParty makes it easy and fun to set up your cloud! Currently, you can use it with ec2, but it's not tied to any particular service. You can use PoolParty to manage and monitor your home network!
|
9
|
+
|
8
10
|
|
9
11
|
h2. Installing
|
10
12
|
|
11
|
-
<pre syntax="ruby">sudo gem install
|
13
|
+
<pre syntax="ruby">sudo gem install --source http://gems.github.com auser-poolparty</pre>
|
12
14
|
|
13
15
|
h2. The basics
|
14
16
|
|
15
17
|
|
16
18
|
h2. Demonstration of usage
|
17
19
|
|
20
|
+
<pre>
|
21
|
+
cloud spec [name]
|
22
|
+
</pre>
|
23
|
+
|
24
|
+
This will create a basic spec for you in the spec directory. Then, write your spec file. There are examples in the repos as well as the one below:
|
25
|
+
|
26
|
+
<pre syntax="ruby">
|
27
|
+
# Basic poolparty template with apache plugin
|
28
|
+
require "poolparty-apache2-plugin"
|
29
|
+
|
30
|
+
pool :app do
|
31
|
+
|
32
|
+
instances 2..5
|
33
|
+
port 80
|
34
|
+
ami "ami-1cd73375" # Alestic Ubuntu AMI
|
35
|
+
|
36
|
+
cloud :app do
|
37
|
+
|
38
|
+
apache do
|
39
|
+
installed_as_worker
|
40
|
+
|
41
|
+
has_virtualhost do
|
42
|
+
|
43
|
+
name "poolpartyrb.com"
|
44
|
+
listen("8080")
|
45
|
+
virtual_host_entry ::File.join(File.dirname(__FILE__), "templates", "virtual_host.conf.erb")
|
46
|
+
|
47
|
+
has_git(:name => "poolpartyrepos", :source => "git://github.com/auser/xnot.org.git", :path => "/var/www/xnot.org/public")
|
18
48
|
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
</pre>
|
19
56
|
|
20
57
|
h2. Forum
|
21
58
|
|
@@ -25,9 +62,7 @@ h2. How to submit patches
|
|
25
62
|
|
26
63
|
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
27
64
|
|
28
|
-
The trunk repository is <code>
|
29
|
-
|
30
|
-
OOOORRRR
|
65
|
+
The trunk repository is <code>http://github.com/auser/poolparty</code> for anonymous access.
|
31
66
|
|
32
67
|
You can fetch the source from either:
|
33
68
|
|
@@ -37,27 +72,15 @@ You can fetch the source from either:
|
|
37
72
|
|
38
73
|
<pre>git clone git://rubyforge.org/PoolParty.git</pre>
|
39
74
|
|
40
|
-
<% else %>
|
41
|
-
|
42
|
-
* rubyforge: MISSING IN ACTION
|
43
|
-
|
44
|
-
When you do this, this message will magically disappear!
|
45
|
-
|
46
|
-
Or you can hack website/index.txt and make it all go away!!
|
47
|
-
|
48
75
|
<% end %>
|
49
76
|
|
50
77
|
* github: "http://github.com/auser/PoolParty/tree/master":http://github.com/auser/PoolParty/tree/master
|
51
78
|
|
52
79
|
<pre>git clone git://github.com/auser/PoolParty.git</pre>
|
53
80
|
|
54
|
-
* gitorious: "git://gitorious.org/PoolParty/mainline.git":git://gitorious.org/PoolParty/mainline.git
|
55
|
-
|
56
|
-
<pre>git clone git://gitorious.org/PoolParty/mainline.git</pre>
|
57
|
-
|
58
81
|
h3. Build and test instructions
|
59
82
|
|
60
|
-
<pre>cd PoolParty
|
83
|
+
<pre syntax="bash">cd PoolParty
|
61
84
|
rake test
|
62
85
|
rake install_gem</pre>
|
63
86
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
pre {
|
2
|
+
background-color: #f1f1f3;
|
3
|
+
color: #112;
|
4
|
+
padding: 10px;
|
5
|
+
font-size: 0.9em;
|
6
|
+
overflow: auto;
|
7
|
+
margin: 4px 0px;
|
8
|
+
width: 95%;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* Syntax highlighting */
|
12
|
+
pre .normal {}
|
13
|
+
pre .comment { color: #005; font-style: italic; }
|
14
|
+
pre .keyword { color: #A00; font-weight: bold; }
|
15
|
+
pre .method { color: #077; }
|
16
|
+
pre .class { color: #074; }
|
17
|
+
pre .module { color: #050; }
|
18
|
+
pre .punct { color: #447; font-weight: bold; }
|
19
|
+
pre .symbol { color: #099; }
|
20
|
+
pre .string { color: #944; }
|
21
|
+
pre .char { color: #F07; }
|
22
|
+
pre .ident { color: #004; }
|
23
|
+
pre .constant { color: #07F; }
|
24
|
+
pre .regex { color: #B66; background: #FEF; }
|
25
|
+
pre .number { color: #A11; }
|
26
|
+
pre .attribute { color: #5bb; }
|
27
|
+
pre .global { color: #7FB; }
|
28
|
+
pre .expr { color: #227; }
|
29
|
+
pre .escape { color: #277; }
|
@@ -77,24 +77,34 @@ td {
|
|
77
77
|
.unknown {
|
78
78
|
color: #995000;
|
79
79
|
}
|
80
|
-
pre
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
80
|
+
pre {
|
81
|
+
background-color: #f1f1f3;
|
82
|
+
color: #112;
|
83
|
+
padding: 10px;
|
84
|
+
font-size: 1.1em;
|
85
|
+
overflow: auto;
|
86
|
+
margin: 4px 0px;
|
87
87
|
}
|
88
|
-
|
89
|
-
|
90
|
-
.
|
91
|
-
.
|
92
|
-
.
|
93
|
-
.
|
94
|
-
.
|
95
|
-
.
|
96
|
-
.
|
97
|
-
.
|
88
|
+
|
89
|
+
/* Syntax highlighting */
|
90
|
+
pre .normal {}
|
91
|
+
pre .comment { color: #005; font-style: italic; }
|
92
|
+
pre .keyword { color: #A00; font-weight: bold; }
|
93
|
+
pre .method { color: #077; }
|
94
|
+
pre .class { color: #074; }
|
95
|
+
pre .module { color: #050; }
|
96
|
+
pre .punct { color: #447; font-weight: bold; }
|
97
|
+
pre .symbol { color: #099; }
|
98
|
+
pre .string { color: #944; }
|
99
|
+
pre .char { color: #F07; }
|
100
|
+
pre .ident { color: #004; }
|
101
|
+
pre .constant { color: #07F; }
|
102
|
+
pre .regex { color: #B66; background: #FEF; }
|
103
|
+
pre .number { color: #A11; }
|
104
|
+
pre .attribute { color: #5bb; }
|
105
|
+
pre .global { color: #7FB; }
|
106
|
+
pre .expr { color: #227; }
|
107
|
+
pre .escape { color: #277; }
|
98
108
|
|
99
109
|
#version {
|
100
110
|
float: right;
|
@@ -135,4 +145,3 @@ pre, code {
|
|
135
145
|
cursor: pointer;
|
136
146
|
cursor: hand;
|
137
147
|
}
|
138
|
-
|
data/website/template.html.erb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auser-poolparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -292,6 +292,7 @@ files:
|
|
292
292
|
- website/index.html
|
293
293
|
- website/index.txt
|
294
294
|
- website/javascripts/rounded_corners_lite.inc.js
|
295
|
+
- website/stylesheets/code.css
|
295
296
|
- website/stylesheets/screen.css
|
296
297
|
- website/template.html.erb
|
297
298
|
has_rdoc: true
|
@@ -308,10 +309,10 @@ post_install_message: |-
|
|
308
309
|
|
309
310
|
Don't forget to check out the plugin tutorial @ http://poolpartyrb.com for extending PoolParty!
|
310
311
|
|
311
|
-
For more information, check http://
|
312
|
+
For more information, check http://PoolPartyrb.com
|
312
313
|
On IRC:
|
313
314
|
irc.freenode.net
|
314
|
-
#
|
315
|
+
#poolpartyrb
|
315
316
|
|
316
317
|
*** Ari Lerner @ <arilerner@mac.com> ***
|
317
318
|
rdoc_options:
|