auser-poolparty 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +2 -1
- data/bin/cloud-configure +11 -15
- data/bin/cloud-maintain +1 -1
- data/bin/{cloud-reconfigure → cloud-refresh} +1 -1
- data/bin/cloud-start +1 -0
- data/lib/poolparty/base_packages/poolparty.rb +11 -7
- data/lib/poolparty/base_packages/ruby.rb +7 -3
- data/lib/poolparty/helpers/provisioner_base.rb +27 -5
- data/lib/poolparty/helpers/provisioners/master.rb +14 -33
- data/lib/poolparty/helpers/provisioners/slave.rb +2 -10
- data/lib/poolparty/modules/method_missing_sugar.rb +30 -2
- data/lib/poolparty/net/remoter.rb +2 -2
- data/lib/poolparty/plugins/gem_package.rb +3 -3
- data/lib/poolparty/plugins/git.rb +25 -8
- data/lib/poolparty/pool/resource.rb +7 -3
- data/lib/poolparty/templates/gem +25 -0
- data/lib/poolparty/templates/haproxy.conf +2 -2
- data/lib/poolparty/templates/puppet.conf +5 -3
- data/lib/poolparty/version.rb +1 -1
- data/poolparty.gemspec +4 -4
- data/spec/poolparty/helpers/provisioners/slave_spec.rb +2 -2
- data/spec/poolparty/plugins/git_spec.rb +15 -1
- data/tasks/ec2.rake +1 -1
- data/website/index.html +1 -1
- metadata +5 -4
data/Manifest.txt
CHANGED
@@ -13,7 +13,7 @@ bin/cloud-list
|
|
13
13
|
bin/cloud-maintain
|
14
14
|
bin/cloud-osxcopy
|
15
15
|
bin/cloud-provision
|
16
|
-
bin/cloud-
|
16
|
+
bin/cloud-refresh
|
17
17
|
bin/cloud-ssh
|
18
18
|
bin/cloud-start
|
19
19
|
bin/cloud-terminate
|
@@ -108,6 +108,7 @@ lib/poolparty/pool/script.rb
|
|
108
108
|
lib/poolparty/templates/authkeys
|
109
109
|
lib/poolparty/templates/cib.xml
|
110
110
|
lib/poolparty/templates/fileserver.conf
|
111
|
+
lib/poolparty/templates/gem
|
111
112
|
lib/poolparty/templates/ha.cf
|
112
113
|
lib/poolparty/templates/haproxy.conf
|
113
114
|
lib/poolparty/templates/namespaceauth.conf
|
data/bin/cloud-configure
CHANGED
@@ -15,21 +15,17 @@ include Remote
|
|
15
15
|
@clouds = o.cloudname ? {:cloud => cloud(o.cloudname.downcase.to_sym)} : clouds
|
16
16
|
|
17
17
|
@clouds.each do |name, cloud|
|
18
|
+
|
19
|
+
with_cloud(cloud, {:testing => o.testing, :location => @location, :provision_class => @provision_class}) do
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
Provisioner.configure_master(self, testing)
|
28
|
-
end
|
29
|
-
if provision_class == "slave" || provision_class == "all"
|
30
|
-
Provisioner.configure_slaves(self, testing)
|
31
|
-
end
|
32
|
-
|
21
|
+
hide_output do
|
22
|
+
if provision_class == "master" || provision_class == "all"
|
23
|
+
Provisioner.configure_master(self, testing)
|
24
|
+
end
|
25
|
+
if provision_class == "slave" || provision_class == "all"
|
26
|
+
Provisioner.configure_slaves(self, testing)
|
27
|
+
end
|
28
|
+
end
|
33
29
|
clear_base_directory unless testing
|
34
|
-
end
|
30
|
+
end
|
35
31
|
end
|
data/bin/cloud-maintain
CHANGED
@@ -18,7 +18,7 @@ include Remote
|
|
18
18
|
|
19
19
|
@clouds.each do |name, cloud|
|
20
20
|
|
21
|
-
with_cloud(cloud, {:location => @location}) do
|
21
|
+
with_cloud(cloud, {:location => @location, :testing => o.testing}) do
|
22
22
|
logger.info header("Maintaining cloud #{name}")
|
23
23
|
if !minimum_number_of_instances_are_running?
|
24
24
|
logger.warn "#{list_of_running_instances.size} running instances of between #{minimum_instances} and #{maximum_instances}"
|
@@ -17,7 +17,7 @@ include Remote
|
|
17
17
|
@clouds.each do |name, cloud|
|
18
18
|
|
19
19
|
with_cloud(cloud, {:testing => o.testing}) do
|
20
|
-
cmd = "
|
20
|
+
cmd = "puppetrun --host #{list_of_node_names.join(", --host ")}"
|
21
21
|
run_command_on(cmd, master)
|
22
22
|
end
|
23
23
|
|
data/bin/cloud-start
CHANGED
@@ -5,18 +5,22 @@ 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
|
+
with_options(:requires => 'Package["update-rubygems"]') do
|
9
|
+
has_gempackage(:name => "open4")
|
10
|
+
has_gempackage(:name => "activesupport")
|
11
|
+
has_gempackage(:name => "logging")
|
12
|
+
has_gempackage(:name => "hoe")
|
13
|
+
has_gempackage(:name => "xml-simple")
|
14
|
+
|
15
|
+
has_gempackage(:name => "grempe-amazon-ec2", :source => "http://gems.github.com", :requires => 'Package["xml-simple"]')
|
16
|
+
has_gempackage(:name => "auser-poolparty", :source => "http://gems.github.com", :requires => 'Package["activesupport", "logging", "hoe", "open4"]')
|
17
|
+
end
|
15
18
|
# Build hostsfile
|
16
19
|
# TODO: COME BACK AND CLEAN THIS UP
|
17
20
|
(self.respond_to?(:list_of_running_instances) ? self : parent).list_of_running_instances.each do |ri|
|
18
21
|
has_host({:name => "#{ri.name}", :ip => ri.ip })
|
19
22
|
end
|
23
|
+
# has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
|
20
24
|
end
|
21
25
|
|
22
26
|
end
|
@@ -3,6 +3,10 @@ module PoolParty
|
|
3
3
|
plugin :ruby do
|
4
4
|
|
5
5
|
def enable
|
6
|
+
install_base_packages
|
7
|
+
end
|
8
|
+
|
9
|
+
def install_base_packages
|
6
10
|
has_package(:name => "libreadline-ruby1.8")
|
7
11
|
has_package(:name => "libruby1.8")
|
8
12
|
has_package(:name => "ruby1.8-dev")
|
@@ -11,12 +15,12 @@ module PoolParty
|
|
11
15
|
|
12
16
|
# exec(:name => "update-rubygems") do
|
13
17
|
# command "gem update --system"
|
14
|
-
#
|
15
|
-
# notify
|
18
|
+
# onlyif "gem -v | grep 1."
|
19
|
+
# notify 'Exec["fix-updated-rubygems"]'
|
16
20
|
# end
|
17
21
|
# exec(:name => "fix-updated-rubygems") do
|
18
22
|
# command "awk \'{print} NR == 9 {print \"require \"rubygems/gem_runner\"\"}\' /usr/bin/gem"
|
19
|
-
# ifnot "awk \
|
23
|
+
# ifnot "awk \"/gem_runner/\" /usr/bin/gem"
|
20
24
|
# end
|
21
25
|
end
|
22
26
|
|
@@ -90,8 +90,8 @@ module PoolParty
|
|
90
90
|
end
|
91
91
|
def process_configure!(testing=false)
|
92
92
|
error unless valid?
|
93
|
-
setup_runner(@cloud)
|
94
93
|
write_configure_file
|
94
|
+
setup_runner(@cloud)
|
95
95
|
|
96
96
|
unless testing
|
97
97
|
@cloud.rsync_storage_files_to(@instance)
|
@@ -112,7 +112,7 @@ module PoolParty
|
|
112
112
|
end
|
113
113
|
# Gather all the tasks into one string
|
114
114
|
def install_string
|
115
|
-
(default_install_tasks
|
115
|
+
(default_install_tasks).each do |task|
|
116
116
|
case task.class
|
117
117
|
when String
|
118
118
|
task
|
@@ -122,7 +122,7 @@ module PoolParty
|
|
122
122
|
end.nice_runnable
|
123
123
|
end
|
124
124
|
def configure_string
|
125
|
-
(default_configure_tasks
|
125
|
+
(default_configure_tasks).each do |task|
|
126
126
|
case task.class
|
127
127
|
when String
|
128
128
|
task
|
@@ -135,13 +135,16 @@ module PoolParty
|
|
135
135
|
# These are run on all the provisioners, master or slave
|
136
136
|
def default_install_tasks
|
137
137
|
[
|
138
|
-
|
138
|
+
upgrade_system,
|
139
|
+
install_puppet_master,
|
140
|
+
custom_install_tasks
|
139
141
|
] << install_tasks
|
140
142
|
end
|
141
143
|
# Tasks with default configuration tasks
|
142
144
|
# This is run on the provisioner, regardless
|
143
145
|
def default_configure_tasks
|
144
146
|
[
|
147
|
+
custom_configure_tasks
|
145
148
|
] << configure_tasks
|
146
149
|
end
|
147
150
|
# Build a list of the tasks to run on the instance
|
@@ -195,7 +198,8 @@ module PoolParty
|
|
195
198
|
def self.configure(instance, cl=self)
|
196
199
|
new(instance, cl).configure
|
197
200
|
end
|
198
|
-
|
201
|
+
|
202
|
+
# Template directory from the provisioner base
|
199
203
|
def template_directory
|
200
204
|
File.join(File.dirname(__FILE__), "..", "templates")
|
201
205
|
end
|
@@ -213,6 +217,24 @@ module PoolParty
|
|
213
217
|
end
|
214
218
|
"echo '#{str}' > /etc/puppet/manifests/nodes/nodes.pp"
|
215
219
|
end
|
220
|
+
|
221
|
+
def upgrade_system
|
222
|
+
case @os
|
223
|
+
when :ubuntu
|
224
|
+
"
|
225
|
+
touch /etc/apt/sources.list
|
226
|
+
echo 'deb http://mirrors.kernel.org/ubuntu hardy main universe' >> /etc/apt/sources.list
|
227
|
+
apt-get update --fix-missing -y
|
228
|
+
apt-get upgrade -y
|
229
|
+
"
|
230
|
+
else
|
231
|
+
"# No system upgrade needed"
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
def install_puppet_master
|
236
|
+
"#{installer_for( puppet_packages )}"
|
237
|
+
end
|
216
238
|
|
217
239
|
def create_poolparty_manifest
|
218
240
|
<<-EOS
|
@@ -3,7 +3,8 @@ module PoolParty
|
|
3
3
|
class Master < ProvisionerBase
|
4
4
|
|
5
5
|
def initialize(cloud=self, os=:ubuntu)
|
6
|
-
super(cloud.master, cloud)
|
6
|
+
super(cloud.master, cloud, os)
|
7
|
+
@master_ip = cloud.master.ip
|
7
8
|
end
|
8
9
|
|
9
10
|
def valid?
|
@@ -16,8 +17,6 @@ module PoolParty
|
|
16
17
|
|
17
18
|
def install_tasks
|
18
19
|
[
|
19
|
-
upgrade_system,
|
20
|
-
install_puppet_master,
|
21
20
|
install_haproxy,
|
22
21
|
install_heartbeat,
|
23
22
|
create_local_hosts_entry,
|
@@ -38,34 +37,17 @@ module PoolParty
|
|
38
37
|
]
|
39
38
|
end
|
40
39
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
apt-get upgrade -y"
|
49
|
-
else
|
50
|
-
"# No system upgrade needed"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def install_puppet_master
|
55
|
-
"#{installer_for( puppet_packages )}"
|
56
|
-
end
|
57
|
-
|
58
|
-
def install_haproxy
|
59
|
-
"#{installer_for( "haproxy" )}"
|
60
|
-
end
|
61
|
-
|
62
|
-
def install_heartbeat
|
63
|
-
"#{installer_for( "heartbeat-2" )}"
|
64
|
-
end
|
40
|
+
# def install_haproxy
|
41
|
+
# "#{installer_for( "haproxy" )}"
|
42
|
+
# end
|
43
|
+
#
|
44
|
+
# def install_heartbeat
|
45
|
+
# "#{installer_for( "heartbeat-2" )}"
|
46
|
+
# end
|
65
47
|
|
66
48
|
def create_local_hosts_entry
|
67
49
|
<<-EOS
|
68
|
-
if [ -z "grep -v '#' /etc/hosts | grep '
|
50
|
+
if [ -z \"$(grep -v '#' /etc/hosts | grep 'master')" ]; then echo '#{@master_ip} puppet master' >> /etc/hosts; fi
|
69
51
|
EOS
|
70
52
|
end
|
71
53
|
|
@@ -135,18 +117,17 @@ mv #{Base.remote_storage_path}/#{Base.tmp_path}/#{@cloud.full_keypair_name} #{@c
|
|
135
117
|
EOS
|
136
118
|
end
|
137
119
|
|
120
|
+
# ps aux | grep puppetmasterd | awk '{print $2}' | xargs kill
|
121
|
+
# rm -rf /etc/puppet/ssl
|
138
122
|
def start_puppetmaster
|
139
123
|
<<-EOS
|
140
|
-
ps aux | grep puppetmasterd | awk '{print $2}' | xargs kill
|
141
|
-
rm -rf /etc/puppet/ssl
|
142
124
|
puppetmasterd
|
143
125
|
EOS
|
144
|
-
end
|
126
|
+
end
|
145
127
|
|
146
128
|
def restart_puppetd
|
147
129
|
<<-EOS
|
148
|
-
puppetd --
|
149
|
-
puppetd --listen
|
130
|
+
puppetd --listen --fqdn=#{@cloud.master.name}
|
150
131
|
EOS
|
151
132
|
end
|
152
133
|
end
|
@@ -3,8 +3,7 @@ module PoolParty
|
|
3
3
|
class Slave < ProvisionerBase
|
4
4
|
|
5
5
|
def install_tasks
|
6
|
-
[
|
7
|
-
install_puppet,
|
6
|
+
[
|
8
7
|
setup_puppet
|
9
8
|
] << configure_tasks
|
10
9
|
end
|
@@ -16,13 +15,6 @@ module PoolParty
|
|
16
15
|
]
|
17
16
|
end
|
18
17
|
|
19
|
-
def install_puppet
|
20
|
-
<<-EOE
|
21
|
-
#{installer_for( puppet_packages )}
|
22
|
-
echo 'DAEMON_OPTS="-w 120 --server puppet"' > /etc/default/puppet
|
23
|
-
EOE
|
24
|
-
end
|
25
|
-
|
26
18
|
def setup_puppet
|
27
19
|
<<-EOE
|
28
20
|
puppetd --mkusers
|
@@ -39,7 +31,7 @@ module PoolParty
|
|
39
31
|
|
40
32
|
def start_puppet
|
41
33
|
<<-EOS
|
42
|
-
puppetd --listen
|
34
|
+
puppetd --listen --fqdn=#{@instance.name}
|
43
35
|
EOS
|
44
36
|
end
|
45
37
|
|
@@ -1,6 +1,19 @@
|
|
1
|
+
=begin rdoc
|
2
|
+
Using method missing gives us the ability to set any attribute on the object into the options
|
3
|
+
such that it can be retrieved later
|
4
|
+
=end
|
1
5
|
module PoolParty
|
2
6
|
module MethodMissingSugar
|
3
|
-
|
7
|
+
# Method_Missing
|
8
|
+
# When a method cannot be found on the current object
|
9
|
+
# it is sent to method_missing
|
10
|
+
# First, we check if there is a block given and if the block
|
11
|
+
# is given with a class of the same type, then it is a block to be evaluated on
|
12
|
+
# itself, so we instantiate it here, otherwise, don't handle it here and let
|
13
|
+
# the super class worry about it.
|
14
|
+
# If the block is not given, then we are going to look for it on the
|
15
|
+
# options of itself or its parent.
|
16
|
+
# See get_from_options for more information
|
4
17
|
def method_missing(m, *args, &block)
|
5
18
|
if block_given?
|
6
19
|
(args[0].class == self.class) ? args[0].instance_eval(&block) : super
|
@@ -9,12 +22,27 @@ module PoolParty
|
|
9
22
|
end
|
10
23
|
end
|
11
24
|
|
25
|
+
# Get the method from the options
|
26
|
+
# First, we check to see if any options are being sent to the method
|
27
|
+
# of the form:
|
28
|
+
# name "Fred"
|
29
|
+
# If there are args sent to it, check to see if it is an array
|
30
|
+
# If it is, we want to send it an array only if the array is contains more than one element.
|
31
|
+
# This becomes important when we are building the manifest
|
32
|
+
# If it is not an array of more than one element, then we just send it the first of the args
|
33
|
+
# If there are no args sent to it, then we check to see if the method is already in the options
|
34
|
+
# which means we are retrieving the property
|
35
|
+
# of the form
|
36
|
+
# @cloud.name => @cloud.options[:name]
|
37
|
+
# Finally, if the method name is not in the options, then we check to make sure it's not set on the
|
38
|
+
# parent, we don't want the parent's set option and that the parent isnot itself and send it
|
39
|
+
# to the parent to handle. Otherwise, we'll say it's nil instead
|
12
40
|
def get_from_options(m, *args, &block)
|
13
41
|
if args.empty?
|
14
42
|
if options.has_key?(m)
|
15
43
|
options[m]
|
16
44
|
else
|
17
|
-
(parent.nil? || parent.class == self.class || !parent.respond_to?(:options)
|
45
|
+
(parent.nil? || parent.class == self.class || !parent.respond_to?(:options)) ? nil : parent.send(m, *args, &block)
|
18
46
|
end
|
19
47
|
else
|
20
48
|
options[m] = (args.is_a?(Array) && args.size > 1) ? args : args[0]
|
@@ -152,8 +152,8 @@ module PoolParty
|
|
152
152
|
request_launch_new_instances(1) if list_of_pending_instances.size.zero? && can_start_a_new_instance? && !is_master_running?
|
153
153
|
|
154
154
|
when_no_pending_instances do
|
155
|
-
wait "
|
156
|
-
Provisioner.provision_master(self, testing)
|
155
|
+
wait "10.seconds"
|
156
|
+
hide_output { Provisioner.provision_master(self, testing) }
|
157
157
|
end
|
158
158
|
|
159
159
|
end
|
@@ -3,10 +3,10 @@ module PoolParty
|
|
3
3
|
|
4
4
|
virtual_resource(:gempackage) do
|
5
5
|
|
6
|
-
def loaded
|
6
|
+
def loaded(opts={})
|
7
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 --no-ri --no-rdoc #{"--version \"#{version}\"" if
|
9
|
-
ifnot "gem list --local #{@parent.name} | grep #{@parent.name} #{"| grep #{version}" if
|
8
|
+
command "gem install -y --no-ri --no-rdoc #{"--version \"#{version}\"" if @parent.version} #{"--source #{@parent.source}" if @parent.source} #{@parent.name}"
|
9
|
+
ifnot "gem list --local #{@parent.name} | grep #{@parent.name} #{"| grep #{@parent.version}" if @parent.version}"
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -3,19 +3,36 @@ module PoolParty
|
|
3
3
|
|
4
4
|
virtual_resource(:git) do
|
5
5
|
|
6
|
-
def loaded
|
7
|
-
|
8
|
-
|
6
|
+
def loaded(opts={})
|
7
|
+
install_git
|
8
|
+
has_git_repos
|
9
|
+
end
|
10
|
+
|
11
|
+
def install_git
|
12
|
+
has_package(:name => "git-core")
|
13
|
+
end
|
14
|
+
|
15
|
+
def has_git_repos
|
16
|
+
has_directory(:name => "#{path}")
|
9
17
|
|
10
|
-
exec({:name => "git-#{name}"
|
11
|
-
|
12
|
-
|
18
|
+
exec({:name => "git-#{name}"}) do
|
19
|
+
command @parent.user ? "git clone #{@parent.user}@#{@parent.source} #{@parent.path}" : "git clone #{@parent.source} #{@parent.path}"
|
20
|
+
cwd "#{::File.dirname(@parent.path) if @parent.path}"
|
21
|
+
creates "#{@parent.path}/.git"
|
13
22
|
end
|
14
23
|
|
15
24
|
exec(:name => "git-update-#{name}", :cwd => "#{path}") do
|
16
|
-
|
17
|
-
|
25
|
+
command "git pull"
|
26
|
+
requires "Exec['git-#{@parent.name}']"
|
27
|
+
end
|
28
|
+
|
29
|
+
if symlink
|
30
|
+
has_file(:name => "#{symlink}") do
|
31
|
+
ensures @parent.path
|
32
|
+
end
|
33
|
+
end
|
18
34
|
end
|
35
|
+
|
19
36
|
end
|
20
37
|
|
21
38
|
end
|
@@ -88,11 +88,11 @@ module PoolParty
|
|
88
88
|
@parent = parent
|
89
89
|
set_vars_from_options(opts) unless opts.empty?
|
90
90
|
self.instance_eval &block if block
|
91
|
-
loaded
|
91
|
+
loaded(opts)
|
92
92
|
end
|
93
93
|
|
94
94
|
# Stub, so you can create virtual resources
|
95
|
-
def loaded
|
95
|
+
def loaded(opts={})
|
96
96
|
end
|
97
97
|
|
98
98
|
# DSL Overriders
|
@@ -105,7 +105,11 @@ module PoolParty
|
|
105
105
|
options.merge!(:require => str)
|
106
106
|
end
|
107
107
|
def ensures(str="running")
|
108
|
-
|
108
|
+
if %w(absent running).map {|a| self.send a.to_sym}.include?(str)
|
109
|
+
str == "absent" ? is_absent : is_present
|
110
|
+
else
|
111
|
+
options.merge!(:ensure => str)
|
112
|
+
end
|
109
113
|
end
|
110
114
|
# Allows us to send an ensure to ensure the presence of a resource
|
111
115
|
def is_present(*args)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#! /usr/bin/ruby1.8
|
2
|
+
#--
|
3
|
+
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
4
|
+
# All rights reserved.
|
5
|
+
# See LICENSE.txt for permissions.
|
6
|
+
# /usr/bin/gem is broken, so... have to use this until it is fixed
|
7
|
+
#++
|
8
|
+
|
9
|
+
|
10
|
+
require "rubygems"
|
11
|
+
require "rubygems/gem_runner"
|
12
|
+
Gem.manage_gems
|
13
|
+
|
14
|
+
required_version = Gem::Version::Requirement.new(">= 1.8.0")
|
15
|
+
unless required_version.satisfied_by?(Gem::Version.new(RUBY_VERSION))
|
16
|
+
puts "Expected Ruby Version #{required_version}, was #{RUBY_VERSION}"
|
17
|
+
exit(1)
|
18
|
+
end
|
19
|
+
|
20
|
+
# We need to preserve the original ARGV to use for passing gem options
|
21
|
+
# to source gems. If there is a -- in the line, strip all options after
|
22
|
+
# it...its for the source building process.
|
23
|
+
args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]
|
24
|
+
|
25
|
+
Gem::GemRunner.new.run(args)
|
@@ -2,14 +2,16 @@
|
|
2
2
|
vardir = /var/lib/puppet
|
3
3
|
logdir = /var/log/puppet
|
4
4
|
templatepath = /var/lib/puppet/templates
|
5
|
-
server = master
|
6
5
|
|
7
6
|
[puppetd]
|
8
7
|
localconfig = $vardir/localconfig
|
9
|
-
pluginsync=
|
8
|
+
pluginsync=true
|
10
9
|
factsync=false
|
11
10
|
report=true
|
12
|
-
server
|
11
|
+
server=master
|
13
12
|
|
13
|
+
[puppetrun]
|
14
|
+
certname = master
|
15
|
+
|
14
16
|
[puppetmasterd]
|
15
17
|
certname = master
|
data/lib/poolparty/version.rb
CHANGED
data/poolparty.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{poolparty}
|
3
|
-
s.version = "0.2.
|
3
|
+
s.version = "0.2.4"
|
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"]
|
7
|
-
s.date = %q{2008-10-
|
7
|
+
s.date = %q{2008-10-14}
|
8
8
|
s.description = %q{Self-healing, auto-scaling cloud computing tool}
|
9
9
|
s.email = ["ari.lerner@citrusbyte.com"]
|
10
|
-
s.executables = ["cloud", "cloud-add-keypair", "cloud-configure", "cloud-contract", "cloud-expand", "cloud-list", "cloud-maintain", "cloud-osxcopy", "cloud-provision", "cloud-
|
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-
|
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"]
|
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 PoolParty!
|
@@ -16,13 +16,13 @@ describe "Slave provisioner" do
|
|
16
16
|
end
|
17
17
|
describe "install_tasks" do
|
18
18
|
it "should call install_puppet_slave" do
|
19
|
-
@slave.should_receive(:
|
19
|
+
@slave.should_receive(:install_puppet_master)
|
20
20
|
end
|
21
21
|
after do
|
22
22
|
@slave.install
|
23
23
|
end
|
24
24
|
end
|
25
25
|
it "should return install_puppet as apt-get install puppet factor" do
|
26
|
-
@slave.
|
26
|
+
@slave.setup_puppet.should =~ /puppetd/
|
27
27
|
end
|
28
28
|
end
|
@@ -8,7 +8,7 @@ describe "Remote Instance" do
|
|
8
8
|
@tc = TestClass.new
|
9
9
|
end
|
10
10
|
it "should be a string" do
|
11
|
-
@tc.has_git(
|
11
|
+
@tc.has_git(:name => "gitrepos.git", :source => "git://source.git").to_string.should =~ /file \{/
|
12
12
|
end
|
13
13
|
it "should included the flushed out options" do
|
14
14
|
@tc.has_git({:name => "git.git", :source => "git://source.git", :user => "finger"}).to_string.should =~ /finger@git:/
|
@@ -16,4 +16,18 @@ describe "Remote Instance" do
|
|
16
16
|
it "should not include the user if none is given" do
|
17
17
|
@tc.has_git({:name => "git.git", :source => "git://source.git"}).to_string.should =~ /git clone git:/
|
18
18
|
end
|
19
|
+
describe "in resource" do
|
20
|
+
before(:each) do
|
21
|
+
@tc.instance_eval do
|
22
|
+
git(:name => "gittr") do
|
23
|
+
source "git://source.git"
|
24
|
+
path "/var/www/xnot.org"
|
25
|
+
symlink "/var/www/xnot.org/public"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
it "should have the path set within the resource" do
|
30
|
+
@tc.resource(:git).first.to_string.should =~ /file \{/
|
31
|
+
end
|
32
|
+
end
|
19
33
|
end
|
data/tasks/ec2.rake
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>PoolParty</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/PoolParty"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/PoolParty" class="numbers">0.2.
|
36
|
+
<a href="http://rubyforge.org/projects/PoolParty" class="numbers">0.2.4</a>
|
37
37
|
</div>
|
38
38
|
<h1>&#x2192; ‘Easy cloud computing’</h1>
|
39
39
|
<h2>What</h2>
|
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.4
|
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: 2008-10-
|
12
|
+
date: 2008-10-14 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -61,7 +61,7 @@ executables:
|
|
61
61
|
- cloud-maintain
|
62
62
|
- cloud-osxcopy
|
63
63
|
- cloud-provision
|
64
|
-
- cloud-
|
64
|
+
- cloud-refresh
|
65
65
|
- cloud-ssh
|
66
66
|
- cloud-start
|
67
67
|
- cloud-terminate
|
@@ -98,7 +98,7 @@ files:
|
|
98
98
|
- bin/cloud-maintain
|
99
99
|
- bin/cloud-osxcopy
|
100
100
|
- bin/cloud-provision
|
101
|
-
- bin/cloud-
|
101
|
+
- bin/cloud-refresh
|
102
102
|
- bin/cloud-ssh
|
103
103
|
- bin/cloud-start
|
104
104
|
- bin/cloud-terminate
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- lib/poolparty/templates/authkeys
|
194
194
|
- lib/poolparty/templates/cib.xml
|
195
195
|
- lib/poolparty/templates/fileserver.conf
|
196
|
+
- lib/poolparty/templates/gem
|
196
197
|
- lib/poolparty/templates/ha.cf
|
197
198
|
- lib/poolparty/templates/haproxy.conf
|
198
199
|
- lib/poolparty/templates/namespaceauth.conf
|