auser-poolparty 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/bin/cloud-verify +2 -0
- data/bin/install-poolparty +216 -0
- data/lib/poolparty/{aska/aska.rb → aska.rb} +0 -0
- data/lib/poolparty/core/string.rb +11 -0
- data/lib/poolparty/core/symbol.rb +10 -0
- data/lib/poolparty/dependency_resolver/chef_resolver.rb +16 -34
- data/lib/poolparty/dependency_resolver/dependency_resolver_cloud_extensions.rb +4 -4
- data/lib/poolparty/dependency_resolver/puppet_resolver.rb +15 -27
- data/lib/poolparty/lite.rb +1 -1
- data/lib/poolparty/modules/searchable_paths.rb +91 -0
- data/lib/poolparty/net/init.rb +0 -1
- data/lib/poolparty/net/remote_bases.rb +0 -1
- data/lib/poolparty/net/remoter_base.rb +5 -0
- data/lib/poolparty/net/remoter_bases/ec2/ec2.rb +3 -1
- data/lib/poolparty/plugins/apache2/apache.rb +340 -0
- data/lib/poolparty/plugins/rails_deploy.rb +76 -0
- data/lib/poolparty/poolparty/default.rb +1 -0
- data/lib/poolparty/poolparty/plugin.rb +4 -1
- data/lib/poolparty/poolparty/poolparty_base_class.rb +2 -4
- data/lib/poolparty/poolparty/resource.rb +4 -0
- data/lib/poolparty/poolparty/service.rb +8 -0
- data/lib/poolparty/resources/file.rb +3 -3
- data/lib/poolparty/templates/apache2/apache2.conf +14 -0
- data/lib/poolparty/templates/apache2/base.conf.erb +168 -0
- data/lib/poolparty/templates/apache2/browser_fixes.conf.erb +26 -0
- data/lib/poolparty/templates/apache2/debian.conf.erb +675 -0
- data/lib/poolparty/templates/apache2/default-site.conf.erb +41 -0
- data/lib/poolparty/templates/apache2/directory_indexes.conf.erb +101 -0
- data/lib/poolparty/templates/apache2/logging-syslog.conf.erb +42 -0
- data/lib/poolparty/templates/apache2/mime-extras.conf.erb +211 -0
- data/lib/poolparty/templates/apache2/mime-minimal.conf.erb +15 -0
- data/lib/poolparty/templates/apache2/mpm-worker.conf.erb +20 -0
- data/lib/poolparty/templates/apache2/mpm-worker.erb +20 -0
- data/lib/poolparty/templates/apache2/passenger.conf.erb +20 -0
- data/lib/poolparty/templates/apache2/php.ini.erb +1253 -0
- data/lib/poolparty/templates/apache2/server-status.erb +19 -0
- data/lib/poolparty/verification/verifiers/http_match.rb +43 -0
- data/lib/poolparty/verification/verifiers/http_status.rb +59 -0
- data/lib/poolparty/verification/verifiers/ping.rb +13 -1
- data/lib/poolparty.rb +1 -1
- data/lib/poolpartycl.rb +51 -0
- data/spec/poolparty/dependency_resolver/dependency_resolver_cloud_extensions_spec.rb +5 -11
- data/spec/poolparty/modules/searchable_paths_spec.rb +76 -0
- data/spec/poolparty/plugins/git_spec.rb +4 -3
- data/spec/poolparty/poolparty/cloud_spec.rb +3 -19
- data/spec/poolparty/resources/file_spec.rb +1 -0
- data/spec/poolparty/resources/service_spec.rb +1 -1
- data/test/poolparty/dependency_resolver/puppet_resolver_test.rb +5 -11
- data/test/poolparty/poolparty/poolparty_base_class_test.rb +1 -1
- metadata +27 -7
- data/lib/poolparty/plugins/apache2.rb +0 -53
- data/lib/poolparty/plugins/dynomite.rb +0 -14
- data/lib/poolparty/plugins/tokyo_tyrant.rb +0 -23
@@ -0,0 +1,19 @@
|
|
1
|
+
# create a virtual host which provides statistics
|
2
|
+
ExtendedStatus on
|
3
|
+
NameVirtualHost <%= 127.0.0.1 %>
|
4
|
+
<VirtualHost <%= 127.0.0.1 %>>
|
5
|
+
# hide this a little bit from "normal" accesses
|
6
|
+
# This expects that external users only use the fqdn to access a service
|
7
|
+
ServerName <%= hostname %>
|
8
|
+
<Directory />
|
9
|
+
Order deny,allow
|
10
|
+
Deny from all
|
11
|
+
</Directory>
|
12
|
+
<Location /server-status>
|
13
|
+
SetHandler server-status
|
14
|
+
Order deny,allow
|
15
|
+
Deny from all
|
16
|
+
Allow from <%= 127.0.0.1 %>
|
17
|
+
</Location>
|
18
|
+
</VirtualHost>
|
19
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module PoolParty
|
2
|
+
module Verifiers
|
3
|
+
|
4
|
+
=begin
|
5
|
+
|
6
|
+
== HttpMatch Verifier
|
7
|
+
|
8
|
+
Verify the body of an HTTP call matches a regular expression
|
9
|
+
|
10
|
+
== Usage
|
11
|
+
|
12
|
+
http_match url, response_code
|
13
|
+
|
14
|
+
== Example
|
15
|
+
|
16
|
+
verify do
|
17
|
+
http_match "http://host/index.html", /Welcome to your/
|
18
|
+
http_match "http://host/index.html", /new poolparty instance/
|
19
|
+
end
|
20
|
+
|
21
|
+
=end
|
22
|
+
|
23
|
+
class HttpMatch < VerifierBase
|
24
|
+
require 'open-uri'
|
25
|
+
|
26
|
+
attr_reader :uri, :regexp
|
27
|
+
def initialize(uri, regexp)
|
28
|
+
@uri = URI.parse(uri)
|
29
|
+
@regexp = regexp
|
30
|
+
end
|
31
|
+
|
32
|
+
def passing?
|
33
|
+
@regexp.match(@uri.read) ? true : false
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_s
|
37
|
+
"<#{self.class.to_s} uri:#{uri} regexp:#{regexp}>"
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
module PoolParty
|
2
|
+
module Verifiers
|
3
|
+
|
4
|
+
=begin
|
5
|
+
|
6
|
+
== HttpStatus Verifier
|
7
|
+
|
8
|
+
Verify the HTTP response code from a particular url
|
9
|
+
|
10
|
+
== Usage
|
11
|
+
|
12
|
+
http_status url, response_code
|
13
|
+
|
14
|
+
== Example
|
15
|
+
|
16
|
+
verify do
|
17
|
+
http_status "http://host/index.html", 200
|
18
|
+
http_status "http://host/index.html", :success
|
19
|
+
http_status "http://host/asdfasdfads.html", 404
|
20
|
+
end
|
21
|
+
|
22
|
+
=end
|
23
|
+
|
24
|
+
class HttpStatus < VerifierBase
|
25
|
+
require 'net/http'
|
26
|
+
require 'uri'
|
27
|
+
|
28
|
+
attr_reader :uri, :status
|
29
|
+
def initialize(uri, status)
|
30
|
+
@uri = URI.parse(uri)
|
31
|
+
@status = status
|
32
|
+
end
|
33
|
+
|
34
|
+
def passing?
|
35
|
+
http = Net::HTTP.new(@uri.host)
|
36
|
+
response = http.request_get(@uri.path && !@uri.path.empty? ? @uri.path : "/")
|
37
|
+
|
38
|
+
return case true
|
39
|
+
when status.kind_of?(Numeric)
|
40
|
+
response.code == @status.to_s
|
41
|
+
when status.kind_of?(Symbol)
|
42
|
+
case status
|
43
|
+
when :success then response.kind_of?(Net::HTTPSuccess)
|
44
|
+
else
|
45
|
+
raise "unknown symbol #{status}"
|
46
|
+
end
|
47
|
+
else
|
48
|
+
raise "unknown status type #{status}"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def to_s
|
53
|
+
"<#{self.class.to_s} uri:#{uri} status:#{status}>"
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
end
|
data/lib/poolparty.rb
CHANGED
data/lib/poolpartycl.rb
CHANGED
@@ -6,6 +6,57 @@ def help_array
|
|
6
6
|
["-h", "--help", "-V", "--version", "--debug", "-d"]
|
7
7
|
end
|
8
8
|
|
9
|
+
def ask_with_help(opts={}, &block)
|
10
|
+
help_str = opts[:help]
|
11
|
+
message = opts[:message]
|
12
|
+
|
13
|
+
o = ask("#{message} (h for help)") do |q|
|
14
|
+
q.validate = opts[:validate] if opts.has_key?(:validate)
|
15
|
+
end
|
16
|
+
|
17
|
+
if %w(h H).include?(o)
|
18
|
+
colored_say help_str, :help
|
19
|
+
ask_with_help(opts, &block)
|
20
|
+
else
|
21
|
+
block.call(o)
|
22
|
+
end
|
23
|
+
o
|
24
|
+
end
|
25
|
+
|
26
|
+
def rescued_ask(m, r)
|
27
|
+
begin
|
28
|
+
t = colored_ask m
|
29
|
+
rescue Exception => e
|
30
|
+
say r
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def colored_ask(str, color = :notice)
|
35
|
+
setup_colors
|
36
|
+
ask("<%= color(\"#{str}\", :#{color}) %>")
|
37
|
+
end
|
38
|
+
|
39
|
+
def colored_say(str, color = :headline)
|
40
|
+
setup_colors
|
41
|
+
say("<%= color(\"#{str}\", :#{color}) %>")
|
42
|
+
end
|
43
|
+
|
44
|
+
def setup_colors
|
45
|
+
unless @setup_colors
|
46
|
+
ft = HighLine::ColorScheme.new do |cs|
|
47
|
+
cs[:headline] = [ :bold, :yellow, :on_black ]
|
48
|
+
cs[:horizontal_line] = [ :bold, :white, :on_blue]
|
49
|
+
cs[:critical] = [ :yellow, :on_red ]
|
50
|
+
cs[:error] = [ :bold, :red ]
|
51
|
+
cs[:help] = [ :bold, :white, :on_blue]
|
52
|
+
cs[:notice] = [ :blue, :on_white]
|
53
|
+
end
|
54
|
+
|
55
|
+
HighLine.color_scheme = ft
|
56
|
+
@setup_colors = true
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
9
60
|
def are_you_sure?(msg)
|
10
61
|
puts msg
|
11
62
|
resp = gets.strip!
|
@@ -42,7 +42,7 @@ describe "Resolution spec" do
|
|
42
42
|
@cloud.keypair "bob"
|
43
43
|
@cloud.name "dog"
|
44
44
|
|
45
|
-
(@cloud.
|
45
|
+
(@cloud.resources[:apache] ||= []) << @apache
|
46
46
|
|
47
47
|
@cloud_file_motd = DependencyResolverSpecTestResource.new
|
48
48
|
@cloud_file_motd.name "/etc/motd"
|
@@ -67,20 +67,17 @@ describe "Resolution spec" do
|
|
67
67
|
end
|
68
68
|
describe "to_properties_hash" do
|
69
69
|
it "should output a hash" do
|
70
|
-
@cloud.to_properties_hash.class.should ==
|
71
|
-
# puts "<pre>#{@cloud.to_properties_hash.to_yaml}</pre>"
|
70
|
+
@cloud.to_properties_hash.class.should == Hash
|
72
71
|
end
|
73
72
|
it "should have resources on the cloud as an array of hashes" do
|
74
73
|
@cloud.to_properties_hash[:resources].class.should == Array
|
75
74
|
end
|
76
|
-
it "should have services on the cloud as an array of hashes" do
|
77
|
-
@cloud.to_properties_hash[:services].class.should == OrderedHash
|
78
|
-
end
|
79
75
|
end
|
80
76
|
|
81
77
|
describe "defined cloud" do
|
82
78
|
before(:each) do
|
83
79
|
reset!
|
80
|
+
::File.stub!(:basename).and_return "template"
|
84
81
|
@file = "Hello <%= friends %> on port <%= listen %>"
|
85
82
|
@file.stub!(:read).and_return @file
|
86
83
|
Template.stub!(:open).and_return @file
|
@@ -101,7 +98,7 @@ describe "Resolution spec" do
|
|
101
98
|
end
|
102
99
|
@cloud = clouds[:dog_for_test]
|
103
100
|
@properties = @cloud.to_properties_hash
|
104
|
-
@apache_key = @properties[:
|
101
|
+
@apache_key = @properties[:resources].select {|hsh| hsh[:name] =~ /apache/ }.first
|
105
102
|
end
|
106
103
|
|
107
104
|
it "should have the method to_properties_hash on the cloud" do
|
@@ -112,10 +109,7 @@ describe "Resolution spec" do
|
|
112
109
|
@properties[:resources].class.should == Array
|
113
110
|
end
|
114
111
|
it "contain content in the template's hash" do
|
115
|
-
@
|
116
|
-
end
|
117
|
-
it "should have services" do
|
118
|
-
@properties[:services][@apache_key].empty?.should == false
|
112
|
+
@apache_key.resources.select_with_hash(:pp_type => "file").last[:content].should == "Hello bob on port 8080"
|
119
113
|
end
|
120
114
|
it "contain the files in a hash" do
|
121
115
|
# puts "<pre>#{@properties.to_yaml}</pre>"
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
PATH_TEST_ROOT = Default.storage_directory / "path_test"
|
4
|
+
PATH_ONE = PATH_TEST_ROOT / "one"
|
5
|
+
PATH_TWO = PATH_TEST_ROOT / "two"
|
6
|
+
|
7
|
+
class TestFile
|
8
|
+
include SearchablePaths
|
9
|
+
has_searchable_paths(:dir => "templates", :paths => [PATH_ONE, PATH_TWO])
|
10
|
+
end
|
11
|
+
|
12
|
+
class TestFile2
|
13
|
+
include SearchablePaths
|
14
|
+
has_searchable_paths(:dirs => ["clouds", "/"], :prepend_paths => [PATH_ONE, PATH_TWO])
|
15
|
+
end
|
16
|
+
|
17
|
+
def File.write_to_file(name, content="")
|
18
|
+
open(name, "w") {|f| f.print content}
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "FileWriter" do
|
22
|
+
before(:each) do
|
23
|
+
# create path one
|
24
|
+
[PATH_ONE/:clouds, PATH_ONE/:templates, PATH_ONE/:foo].each {|dir| FileUtils.mkdir_p(dir) }
|
25
|
+
[PATH_ONE/'clouds.rb', PATH_ONE/:clouds/'special.rb', PATH_ONE/:templates/'apache.conf'].each do |f|
|
26
|
+
File.write_to_file(f)
|
27
|
+
end
|
28
|
+
|
29
|
+
# create path two
|
30
|
+
[PATH_TWO/:clouds, PATH_TWO/:templates, PATH_TWO/:foo].each {|dir| FileUtils.mkdir_p(dir) }
|
31
|
+
[PATH_TWO/'swing.rb', PATH_TWO/'clouds.rb', PATH_TWO/:clouds/'common.rb', PATH_TWO/:templates/'mysql.conf'].each do |f|
|
32
|
+
File.write_to_file(f)
|
33
|
+
end
|
34
|
+
|
35
|
+
@template = TestFile.new
|
36
|
+
@cloud = TestFile2.new
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "class methods" do
|
40
|
+
it "should have class options set" do
|
41
|
+
TestFile.searchable_paths_dir.should == "templates"
|
42
|
+
TestFile.searchable_paths_dirs.should == ["templates"]
|
43
|
+
TestFile2.searchable_paths_dirs.should == ["clouds", "/"]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "#find_file" do
|
48
|
+
it "should be able to find a template" do
|
49
|
+
@template.find_file("apache.conf").should_not be_nil
|
50
|
+
@template.find_file("apache.conf").should == PATH_ONE/:templates/'apache.conf'
|
51
|
+
@template.find_file("mysql.conf").should == PATH_TWO/:templates/'mysql.conf'
|
52
|
+
end
|
53
|
+
|
54
|
+
it "shouldn't find a template that doesn't exist" do
|
55
|
+
@template.find_file("post-office.conf").should be_nil
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should find something with prepended paths" do
|
59
|
+
@cloud.find_file("clouds.rb").should == PATH_ONE/'clouds.rb'
|
60
|
+
@cloud.find_file("swing.rb").should == PATH_TWO/'swing.rb'
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should find things in the right order" do
|
64
|
+
@cloud.find_file("clouds.rb").should == PATH_ONE/'clouds.rb'
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
after(:each) do
|
74
|
+
FileUtils.rm_rf(PATH_TEST_ROOT)
|
75
|
+
end
|
76
|
+
end
|
@@ -8,12 +8,13 @@ describe "Remote Instance" do
|
|
8
8
|
before(:each) do
|
9
9
|
reset!
|
10
10
|
@tc = cloud :test_git_class_cloud do
|
11
|
+
has_file "/var/www/bino"
|
11
12
|
has_git_repos :at => "/var/www/", :name => "gitrepos.git", :source => "git://git/repos/source.git", :requires_user => "finger"
|
12
13
|
end
|
13
|
-
@compiled =
|
14
|
+
@compiled = ChefResolver.new(@tc.to_properties_hash).compile
|
14
15
|
end
|
15
16
|
it "should be a string" do
|
16
|
-
@compiled.should =~ /
|
17
|
+
@compiled.should =~ /execute/
|
17
18
|
end
|
18
19
|
it "should included the flushed out options" do
|
19
20
|
@compiled.should =~ /finger@git:/
|
@@ -33,7 +34,7 @@ describe "Remote Instance" do
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
it "should have the path set within the resource" do
|
36
|
-
|
37
|
+
ChefResolver.new(@tc.to_properties_hash).compile.should =~ /execute \"git-gittr/
|
37
38
|
end
|
38
39
|
end
|
39
40
|
end
|
@@ -100,12 +100,6 @@ describe "Cloud" do
|
|
100
100
|
end
|
101
101
|
cloud(:paddy_wack).parent.should == pool(:knick_knack)
|
102
102
|
end
|
103
|
-
it "should have services in an OrderedHash" do
|
104
|
-
@cloud.services.class.should == OrderedHash
|
105
|
-
end
|
106
|
-
it "should have no services (other than the base ones) in the array when there are no services defined" do
|
107
|
-
@cloud.services.size.should > 2
|
108
|
-
end
|
109
103
|
it "should respond to a options method (from Dslify)" do
|
110
104
|
@cloud.respond_to?(:options).should == true
|
111
105
|
end
|
@@ -207,9 +201,9 @@ describe "Cloud" do
|
|
207
201
|
@cloud.should_receive(:haproxy)
|
208
202
|
@cloud.add_optional_enabled_services
|
209
203
|
end
|
210
|
-
it "should have 3 resources" do
|
204
|
+
it "should have at least 3 resources" do
|
211
205
|
@cloud.add_poolparty_base_requirements
|
212
|
-
@cloud.
|
206
|
+
@cloud.ordered_resources.size.should > 2
|
213
207
|
end
|
214
208
|
it "should receive add_poolparty_base_requirements before building the manifest" do
|
215
209
|
@cloud.should_receive(:add_poolparty_base_requirements).once
|
@@ -241,23 +235,13 @@ describe "Cloud" do
|
|
241
235
|
stub_list_from_remote_for(@cloud)
|
242
236
|
@cloud.add_poolparty_base_requirements
|
243
237
|
end
|
244
|
-
it "should add resources onto the heartbeat class inside the cloud" do
|
245
|
-
@cloud.services.size.should > 0
|
246
|
-
end
|
247
|
-
it "should store the class heartbeat" do
|
248
|
-
@cloud.services.keys.include?(:poolparty_base_heartbeat_class).should == true
|
249
|
-
end
|
250
|
-
it "should have an array of services on the heartbeat" do
|
251
|
-
@cloud.services.class.should == OrderedHash
|
252
|
-
end
|
253
238
|
describe "resources" do
|
254
239
|
before(:each) do
|
255
240
|
reset!
|
256
241
|
@cloud8 = cloud :tester do
|
257
242
|
test_service
|
258
243
|
end
|
259
|
-
@
|
260
|
-
@service = clouds[:tester].services[@tskey].first
|
244
|
+
@service = clouds[:tester].ordered_resources.select {|hsh| hsh.class == TestServiceClass }.first
|
261
245
|
@files = @service.resource(:file)
|
262
246
|
end
|
263
247
|
it "should have a file resource" do
|
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
|
|
3
3
|
describe "Service" do
|
4
4
|
describe "instances" do
|
5
5
|
before(:each) do
|
6
|
-
@tc = TestBaseClass.new do
|
6
|
+
@tc = TestBaseClass.new :test_base_class_cloud do
|
7
7
|
has_service("apache2", {:hasrestart => true})
|
8
8
|
end
|
9
9
|
@service = @tc.resource(:service).first
|
@@ -14,18 +14,12 @@ class TestPuppetResolver < Test::Unit::TestCase
|
|
14
14
|
:resources => [
|
15
15
|
{:name => "/etc/motd", :content => "Welcome to the cloud", :pp_type => "file"},
|
16
16
|
{:name => "/etc/profile", :content => "profile info", :pp_type => "file"},
|
17
|
-
{:name => "/var/www", :pp_type => "directory"}
|
17
|
+
{:name => "/var/www", :pp_type => "directory"},
|
18
|
+
{:name => "apache_class", :pp_type => "plugin", :resources => [
|
19
|
+
{:name => "/etc/apache2/apache2.conf", :pp_type => "file", :template => "/absolute/path/to/template", :content => "rendered template string"}
|
20
|
+
]}
|
18
21
|
],
|
19
|
-
|
20
|
-
:apache => [{
|
21
|
-
:options => {:listen => "8080"},
|
22
|
-
:resources => [
|
23
|
-
{:name => "/etc/apache2/apache2.conf", :pp_type => "file", :template => "/absolute/path/to/template", :content => "rendered template string"}
|
24
|
-
],
|
25
|
-
:services => {}
|
26
|
-
}]
|
27
|
-
}
|
28
|
-
}
|
22
|
+
}
|
29
23
|
end
|
30
24
|
|
31
25
|
should "throw an exception if not given a hash" do
|
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: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-05 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -74,6 +74,7 @@ executables:
|
|
74
74
|
- cloud-start
|
75
75
|
- cloud-terminate
|
76
76
|
- cloud-verify
|
77
|
+
- install-poolparty
|
77
78
|
- server-butterfly
|
78
79
|
- server-cloud-elections
|
79
80
|
- server-ensure-provisioning
|
@@ -111,8 +112,7 @@ files:
|
|
111
112
|
- examples/plugin_without_plugin_directory.rb
|
112
113
|
- examples/poolparty.rb
|
113
114
|
- lib/poolparty
|
114
|
-
- lib/poolparty/aska
|
115
|
-
- lib/poolparty/aska/aska.rb
|
115
|
+
- lib/poolparty/aska.rb
|
116
116
|
- lib/poolparty/base_packages
|
117
117
|
- lib/poolparty/base_packages/haproxy.rb
|
118
118
|
- lib/poolparty/base_packages/heartbeat.rb
|
@@ -181,6 +181,7 @@ files:
|
|
181
181
|
- lib/poolparty/modules/resourcing_dsl.rb
|
182
182
|
- lib/poolparty/modules/s3_string.rb
|
183
183
|
- lib/poolparty/modules/safe_instance.rb
|
184
|
+
- lib/poolparty/modules/searchable_paths.rb
|
184
185
|
- lib/poolparty/modules/thread_pool.rb
|
185
186
|
- lib/poolparty/modules/user_helpers.rb
|
186
187
|
- lib/poolparty/monitors
|
@@ -215,19 +216,19 @@ files:
|
|
215
216
|
- lib/poolparty/net/remoter_bases/vmrun/vmrun.rb
|
216
217
|
- lib/poolparty/net/remoter_bases/vmrun/vmrun_instance.rb
|
217
218
|
- lib/poolparty/plugins
|
218
|
-
- lib/poolparty/plugins/apache2
|
219
|
+
- lib/poolparty/plugins/apache2
|
220
|
+
- lib/poolparty/plugins/apache2/apache.rb
|
219
221
|
- lib/poolparty/plugins/bind.rb
|
220
222
|
- lib/poolparty/plugins/chef.rb
|
221
223
|
- lib/poolparty/plugins/chef_deploy.rb
|
222
224
|
- lib/poolparty/plugins/deploy_directory.rb
|
223
|
-
- lib/poolparty/plugins/dynomite.rb
|
224
225
|
- lib/poolparty/plugins/gem_package.rb
|
225
226
|
- lib/poolparty/plugins/git.rb
|
226
227
|
- lib/poolparty/plugins/line_in_file.rb
|
227
228
|
- lib/poolparty/plugins/nanite.rb
|
229
|
+
- lib/poolparty/plugins/rails_deploy.rb
|
228
230
|
- lib/poolparty/plugins/runit.rb
|
229
231
|
- lib/poolparty/plugins/svn.rb
|
230
|
-
- lib/poolparty/plugins/tokyo_tyrant.rb
|
231
232
|
- lib/poolparty/poolparty
|
232
233
|
- lib/poolparty/poolparty/cloud.rb
|
233
234
|
- lib/poolparty/poolparty/default.rb
|
@@ -265,6 +266,21 @@ files:
|
|
265
266
|
- lib/poolparty/resources.rb
|
266
267
|
- lib/poolparty/schema.rb
|
267
268
|
- lib/poolparty/templates
|
269
|
+
- lib/poolparty/templates/apache2
|
270
|
+
- lib/poolparty/templates/apache2/apache2.conf
|
271
|
+
- lib/poolparty/templates/apache2/base.conf.erb
|
272
|
+
- lib/poolparty/templates/apache2/browser_fixes.conf.erb
|
273
|
+
- lib/poolparty/templates/apache2/debian.conf.erb
|
274
|
+
- lib/poolparty/templates/apache2/default-site.conf.erb
|
275
|
+
- lib/poolparty/templates/apache2/directory_indexes.conf.erb
|
276
|
+
- lib/poolparty/templates/apache2/logging-syslog.conf.erb
|
277
|
+
- lib/poolparty/templates/apache2/mime-extras.conf.erb
|
278
|
+
- lib/poolparty/templates/apache2/mime-minimal.conf.erb
|
279
|
+
- lib/poolparty/templates/apache2/mpm-worker.conf.erb
|
280
|
+
- lib/poolparty/templates/apache2/mpm-worker.erb
|
281
|
+
- lib/poolparty/templates/apache2/passenger.conf.erb
|
282
|
+
- lib/poolparty/templates/apache2/php.ini.erb
|
283
|
+
- lib/poolparty/templates/apache2/server-status.erb
|
268
284
|
- lib/poolparty/templates/authkeys
|
269
285
|
- lib/poolparty/templates/chef
|
270
286
|
- lib/poolparty/templates/cib.xml
|
@@ -299,6 +315,8 @@ files:
|
|
299
315
|
- lib/poolparty/verification
|
300
316
|
- lib/poolparty/verification/verifier_base.rb
|
301
317
|
- lib/poolparty/verification/verifiers
|
318
|
+
- lib/poolparty/verification/verifiers/http_match.rb
|
319
|
+
- lib/poolparty/verification/verifiers/http_status.rb
|
302
320
|
- lib/poolparty/verification/verifiers/ping.rb
|
303
321
|
- lib/poolparty/verification/verify.rb
|
304
322
|
- lib/poolparty.rb
|
@@ -348,6 +366,7 @@ files:
|
|
348
366
|
- spec/poolparty/modules/definable_resource.rb
|
349
367
|
- spec/poolparty/modules/file_writer_spec.rb
|
350
368
|
- spec/poolparty/modules/s3_string_spec.rb
|
369
|
+
- spec/poolparty/modules/searchable_paths_spec.rb
|
351
370
|
- spec/poolparty/monitors
|
352
371
|
- spec/poolparty/monitors/base_monitor_spec.rb
|
353
372
|
- spec/poolparty/monitors/monitors
|
@@ -472,6 +491,7 @@ files:
|
|
472
491
|
- bin/cloud-start
|
473
492
|
- bin/cloud-terminate
|
474
493
|
- bin/cloud-verify
|
494
|
+
- bin/install-poolparty
|
475
495
|
- bin/server-butterfly
|
476
496
|
- bin/server-cloud-elections
|
477
497
|
- bin/server-ensure-provisioning
|
@@ -1,53 +0,0 @@
|
|
1
|
-
module PoolParty
|
2
|
-
class Base
|
3
|
-
plugin :apache do
|
4
|
-
|
5
|
-
# Called after the plugin is loaded entirely, all the options are set, etc.
|
6
|
-
def loaded(o={}, &block)
|
7
|
-
include_chef_recipe chef_apache2_recipe_root # We want to include the chef apache2 recipe to use it
|
8
|
-
end
|
9
|
-
|
10
|
-
def present_apache_module(*names)
|
11
|
-
names.each do |name|
|
12
|
-
has_chef_recipe "apache2::mod_" + name
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
def chef_apache2_recipe_root
|
18
|
-
"#{::File.dirname(__FILE__)}/../../../vendor/chef/apache2"
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
# Usage:°
|
25
|
-
#°
|
26
|
-
# enable_php5 do
|
27
|
-
# extras :cli, :pspell, :mysql
|
28
|
-
# end
|
29
|
-
virtual_resource(:enable_php5) do
|
30
|
-
def loaded(opts={}, parent=self)
|
31
|
-
has_package("php5")
|
32
|
-
has_package("libapache2-mod-php5")
|
33
|
-
present_apache_module("php5")
|
34
|
-
has_file({:name => "/etc/php5/apache2/php.ini",
|
35
|
-
:template => File.dirname(__FILE__) + "/../templates/php.ini.erb",
|
36
|
-
:mode => 755,
|
37
|
-
:requires => get_package("libapache2-mod-php5")})
|
38
|
-
# :notify => get_exec("reload-apache2")})
|
39
|
-
end
|
40
|
-
|
41
|
-
def extras(*names)
|
42
|
-
names.each do |name|
|
43
|
-
# has_package(:name => "php5-#{name}", :requires => get_package("php5"))
|
44
|
-
has_package(:name => "php5-#{name}")
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module PoolParty
|
2
|
-
class Base
|
3
|
-
plugin :dynomite do
|
4
|
-
|
5
|
-
def enable
|
6
|
-
has_exec "install dynomite" do
|
7
|
-
command "git clone git://github.com/cliffmoon/dynomite.git && cd dynomite && git submodule init && git submodule update && rake"
|
8
|
-
not_if "which tcrtest"
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module PoolParty
|
2
|
-
class Base
|
3
|
-
plugin :tokyo_tyrant do
|
4
|
-
|
5
|
-
def enable
|
6
|
-
has_package "build-essential"
|
7
|
-
has_package "zlib1g-dev"
|
8
|
-
has_package "libbz2-dev"
|
9
|
-
has_gem_package "rufus-tokyo"
|
10
|
-
|
11
|
-
has_exec "install tokyo-cabinet" do
|
12
|
-
command "cd ~ && git clone git://github.com/etrepum/tokyo-cabinet.git && cd tokyo-cabinet/ && ./configure && make && make install && cd ~"
|
13
|
-
not_if "which tcrtest"
|
14
|
-
end
|
15
|
-
has_exec "install tokyo-tyrant" do
|
16
|
-
command "cd ~ && git clone git://github.com/etrepum/tokyo-tyrant.git && cd tokyo-tyrant/ && ./configure && make && make install && cd ~"
|
17
|
-
not_if "which ttserver"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|