auser-poolparty 0.2.6 → 0.2.8
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/Manifest.txt +2 -0
- data/bin/cloud +13 -4
- data/bin/cloud-ssh +2 -7
- data/bin/cloud-start +0 -1
- data/lib/poolparty/base_packages/heartbeat.rb +2 -1
- data/lib/poolparty/base_packages/poolparty.rb +7 -6
- data/lib/poolparty/base_packages/ruby.rb +1 -1
- data/lib/poolparty/core/string.rb +2 -0
- data/lib/poolparty/helpers/provisioner_base.rb +8 -3
- data/lib/poolparty/helpers/provisioners/master.rb +7 -8
- data/lib/poolparty/helpers/provisioners/slave.rb +2 -2
- data/lib/poolparty/plugins/git.rb +3 -8
- data/lib/poolparty/pool/base.rb +5 -2
- data/lib/poolparty/pool/cloud.rb +10 -1
- data/lib/poolparty/pool/resource.rb +20 -14
- data/lib/poolparty/pool/resources/remote_file.rb +5 -1
- data/lib/poolparty/pool/resources/symlink.rb +21 -0
- data/lib/poolparty/templates/cib.xml +54 -0
- data/lib/poolparty/templates/ha.cf +4 -2
- data/lib/poolparty/version.rb +1 -1
- data/poolparty.gemspec +3 -3
- data/spec/poolparty/helpers/provisioners/slave_spec.rb +2 -2
- data/spec/poolparty/plugins/git_spec.rb +2 -2
- data/spec/poolparty/pool/cloud_spec.rb +15 -0
- data/spec/poolparty/pool/resource_spec.rb +9 -0
- data/spec/poolparty/pool/resources/symlink_spec.rb +19 -0
- data/website/index.html +1 -1
- metadata +4 -2
data/Manifest.txt
CHANGED
@@ -103,6 +103,7 @@ lib/poolparty/pool/resources/package.rb
|
|
103
103
|
lib/poolparty/pool/resources/remote_file.rb
|
104
104
|
lib/poolparty/pool/resources/service.rb
|
105
105
|
lib/poolparty/pool/resources/sshkey.rb
|
106
|
+
lib/poolparty/pool/resources/symlink.rb
|
106
107
|
lib/poolparty/pool/resources/variable.rb
|
107
108
|
lib/poolparty/pool/script.rb
|
108
109
|
lib/poolparty/templates/authkeys
|
@@ -174,6 +175,7 @@ spec/poolparty/pool/resources/package_spec.rb
|
|
174
175
|
spec/poolparty/pool/resources/remote_file_spec.rb
|
175
176
|
spec/poolparty/pool/resources/service_spec.rb
|
176
177
|
spec/poolparty/pool/resources/sshkey_spec.rb
|
178
|
+
spec/poolparty/pool/resources/symlink_spec.rb
|
177
179
|
spec/poolparty/pool/resources/variable_spec.rb
|
178
180
|
spec/poolparty/pool/script_spec.rb
|
179
181
|
spec/poolparty/pool/test_plugins/sshkey_test
|
data/bin/cloud
CHANGED
@@ -3,18 +3,27 @@ $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
|
3
3
|
require "poolparty"
|
4
4
|
require "poolpartycl"
|
5
5
|
|
6
|
-
# Get the git-style program action
|
6
|
+
# # Get the git-style program action
|
7
7
|
# o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
|
8
8
|
# opts.on('-n [name]','--name [name]', 'Binary to run') { |o| optioner.name o }
|
9
|
+
#
|
10
|
+
# opts.banner = <<-EOB
|
11
|
+
# Usage: cloud <specfile> <action> <options>
|
12
|
+
# Cloud actions:
|
13
|
+
# #{Binary.list_binaries_for("cloud")}
|
14
|
+
# EOB
|
9
15
|
# end
|
10
16
|
|
11
17
|
name = ARGV.shift
|
12
18
|
|
13
19
|
# If there was no program action given
|
14
20
|
if !name || name == "-h" || name == "--help"
|
15
|
-
puts "
|
16
|
-
puts
|
17
|
-
|
21
|
+
puts "Binary required"
|
22
|
+
puts <<-EOB
|
23
|
+
Usage: cloud <specfile> <action> <options>
|
24
|
+
Cloud actions:
|
25
|
+
#{Binary.list_binaries_for("cloud")}
|
26
|
+
EOB
|
18
27
|
exit
|
19
28
|
end
|
20
29
|
|
data/bin/cloud-ssh
CHANGED
@@ -8,11 +8,6 @@ o = PoolParty::Optioner.new(ARGV) do |opts, optioner|
|
|
8
8
|
end
|
9
9
|
load_pool(o.spec || Binary.get_existing_spec_location)
|
10
10
|
|
11
|
-
|
12
|
-
@cloud = cloud(o.cloudname.downcase.to_sym)
|
13
|
-
else
|
14
|
-
puts "Error: You must indicate a cloud from which your instance is from"
|
15
|
-
exit(0)
|
16
|
-
end
|
11
|
+
@cloud = o.cloudname ? cloud(o.cloudname.downcase.to_sym) : cloud(clouds.keys.first)
|
17
12
|
|
18
|
-
instance = @cloud.ssh_into_instance_number( o.num.to_i || 0 )
|
13
|
+
instance = @cloud.ssh_into_instance_number( o.num.to_i || 0 ) if @cloud
|
data/bin/cloud-start
CHANGED
@@ -14,8 +14,9 @@ module PoolParty
|
|
14
14
|
# variables for the templates
|
15
15
|
has_variable({:name => "ha_nodenames", :value => list_of_node_names})
|
16
16
|
has_variable({:name => "ha_node_ips", :value => list_of_node_ips})
|
17
|
+
has_variable({:name => "ha_timeout", :value => (self.respond_to?(:timeout) ? timeout : "5s")})
|
17
18
|
has_variable({:name => "ha_port", :value => (self.respond_to?(:port) ? port : Base.port)})
|
18
|
-
|
19
|
+
|
19
20
|
# These can also be passed in via hash
|
20
21
|
has_remotefile(:name => "/etc/ha.d/ha.cf") do
|
21
22
|
mode 444
|
@@ -5,10 +5,10 @@ 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
|
-
has_gempackage(:name => "activesupport")
|
9
|
-
has_gempackage(:name => "logging")
|
10
|
-
has_gempackage(:name => "hoe")
|
11
|
-
has_gempackage(:name => "xml-simple")
|
8
|
+
has_gempackage(:name => "activesupport", :requires => package(:name => "rubygems"))
|
9
|
+
has_gempackage(:name => "logging", :requires => package(:name => "rubygems"))
|
10
|
+
has_gempackage(:name => "hoe", :requires => package(:name => "rubygems"))
|
11
|
+
has_gempackage(:name => "xml-simple", :requires => package(:name => "rubygems"))
|
12
12
|
has_gempackage(:name => "ParseTree", :version => "2.2.0", :requires => gempackage(:name => "hoe"))
|
13
13
|
|
14
14
|
has_gempackage(:name => "RubyInline", :requires => gempackage(:name => "ParseTree"))
|
@@ -24,8 +24,9 @@ module PoolParty
|
|
24
24
|
has_host({:name => "#{ri.name}", :ip => ri.ip })
|
25
25
|
end
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
# -n #{parent.name}
|
28
|
+
has_cron({:command => ". /etc/profile && which cloud-maintain | /bin/sh"}) do
|
29
|
+
minute "*/2"
|
29
30
|
end
|
30
31
|
# has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
|
31
32
|
end
|
@@ -11,7 +11,7 @@ module PoolParty
|
|
11
11
|
has_package(:name => "libruby1.8")
|
12
12
|
has_package(:name => "ruby1.8-dev")
|
13
13
|
has_package(:name => "ruby1.8")
|
14
|
-
has_package(:name => "rubygems")
|
14
|
+
# has_package(:name => "rubygems")
|
15
15
|
|
16
16
|
has_line_in_file("export PATH=$PATH:/var/lib/gems/1.8/bin/", "/etc/profile")
|
17
17
|
|
@@ -30,6 +30,8 @@ class String
|
|
30
30
|
def nice_runnable(quite=true)
|
31
31
|
self.split(/ && /).join("\n")
|
32
32
|
end
|
33
|
+
# This is the method we use to turn the options into a string to build the main
|
34
|
+
# manifests
|
33
35
|
def to_option_string(ns=[])
|
34
36
|
a_template = (self =~ /template/) == 0
|
35
37
|
a_service = self =~ /^[A-Z][a-zA-Z]*\[[a-zA-Z0-9\-\.\"\'_\$\{\}\/]*\]/
|
@@ -74,7 +74,7 @@ module PoolParty
|
|
74
74
|
puts "Logging on to #{@instance.ip}"
|
75
75
|
@cloud.rsync_storage_files_to(@instance)
|
76
76
|
|
77
|
-
cmd = "cd #{Base.remote_storage_path}/#{Base.tmp_path} && chmod +x install_#{name}.sh && /bin/sh install_#{name}.sh && rm
|
77
|
+
cmd = "cd #{Base.remote_storage_path}/#{Base.tmp_path} && chmod +x install_#{name}.sh && /bin/sh install_#{name}.sh && rm install_#{name}.sh"
|
78
78
|
hide_output do
|
79
79
|
@cloud.run_command_on(cmd, @instance)
|
80
80
|
end
|
@@ -96,7 +96,7 @@ module PoolParty
|
|
96
96
|
unless testing
|
97
97
|
@cloud.rsync_storage_files_to(@instance)
|
98
98
|
|
99
|
-
cmd = "cd #{Base.remote_storage_path}/#{Base.tmp_path} && chmod +x configure_#{name}.sh && /bin/sh configure_#{name}.sh && rm
|
99
|
+
cmd = "cd #{Base.remote_storage_path}/#{Base.tmp_path} && chmod +x configure_#{name}.sh && /bin/sh configure_#{name}.sh && rm configure_#{name}.sh"
|
100
100
|
@cloud.run_command_on(cmd, @instance)
|
101
101
|
end
|
102
102
|
end
|
@@ -136,6 +136,7 @@ module PoolParty
|
|
136
136
|
def default_install_tasks
|
137
137
|
[
|
138
138
|
upgrade_system,
|
139
|
+
fix_rubygems,
|
139
140
|
install_puppet_master,
|
140
141
|
custom_install_tasks
|
141
142
|
] << install_tasks
|
@@ -203,6 +204,10 @@ module PoolParty
|
|
203
204
|
def template_directory
|
204
205
|
File.join(File.dirname(__FILE__), "..", "templates")
|
205
206
|
end
|
207
|
+
|
208
|
+
def fix_rubygems
|
209
|
+
"echo '#{open(::File.join(template_directory, "gem")).read}' > /usr/bin/gem"
|
210
|
+
end
|
206
211
|
|
207
212
|
def create_local_node
|
208
213
|
str = <<-EOS
|
@@ -238,7 +243,7 @@ module PoolParty
|
|
238
243
|
|
239
244
|
def create_poolparty_manifest
|
240
245
|
<<-EOS
|
241
|
-
|
246
|
+
cp #{Base.remote_storage_path}/poolparty.pp /etc/puppet/manifests/classes
|
242
247
|
EOS
|
243
248
|
end
|
244
249
|
end
|
@@ -59,7 +59,7 @@ echo "import 'nodes/*.pp'" > /etc/puppet/manifests/site.pp
|
|
59
59
|
echo "import 'classes/*.pp'" >> /etc/puppet/manifests/site.pp
|
60
60
|
mkdir -p /etc/puppet/manifests/nodes
|
61
61
|
mkdir -p /etc/puppet/manifests/classes
|
62
|
-
|
62
|
+
cp #{Base.remote_storage_path}/#{Base.tmp_path}/namespaceauth.conf /etc/puppet/namespaceauth.conf
|
63
63
|
EOS
|
64
64
|
end
|
65
65
|
|
@@ -104,16 +104,16 @@ node "#{ri.name}" inherits default {}
|
|
104
104
|
def move_templates
|
105
105
|
<<-EOS
|
106
106
|
mkdir -p #{Base.template_path}
|
107
|
-
|
107
|
+
cp #{Base.remote_storage_path}/#{Base.template_directory}/* #{Base.template_path}
|
108
108
|
EOS
|
109
109
|
end
|
110
110
|
|
111
111
|
def create_poolparty_manifest
|
112
112
|
<<-EOS
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
113
|
+
cp #{Base.remote_storage_path}/#{Base.tmp_path}/poolparty.pp /etc/puppet/manifests/classes/poolparty.pp
|
114
|
+
cp #{Base.remote_storage_path}/#{Base.tmp_path}/#{Base.key_file_locations.first} "#{Base.base_config_directory}/.ppkeys"
|
115
|
+
cp #{Base.remote_storage_path}/#{Base.tmp_path}/#{Base.default_specfile_name} #{Base.base_config_directory}/#{Base.default_specfile_name}
|
116
|
+
cp #{Base.remote_storage_path}/#{Base.tmp_path}/#{@cloud.full_keypair_name} #{@cloud.remote_keypair_path}
|
117
117
|
EOS
|
118
118
|
end
|
119
119
|
|
@@ -127,8 +127,7 @@ puppetmasterd --verbose
|
|
127
127
|
|
128
128
|
def restart_puppetd
|
129
129
|
<<-EOS
|
130
|
-
puppetd --
|
131
|
-
puppetd --listen --fqdn=#{@instance.name}
|
130
|
+
puppetd --listen --fqdn #{@instance.name}
|
132
131
|
EOS
|
133
132
|
end
|
134
133
|
end
|
@@ -17,7 +17,6 @@ module PoolParty
|
|
17
17
|
|
18
18
|
def setup_puppet
|
19
19
|
<<-EOE
|
20
|
-
puppetd --mkusers
|
21
20
|
if [ -z "$(grep -v '#' /etc/hosts | grep 'master')" ]; then echo "#{master_ip} puppet master" >> /etc/hosts; else echo "host already set"; fi
|
22
21
|
mv #{Base.remote_storage_path}/#{Base.tmp_path}/namespaceauth.conf /etc/puppet/namespaceauth.conf
|
23
22
|
EOE
|
@@ -25,13 +24,14 @@ module PoolParty
|
|
25
24
|
|
26
25
|
def setup_configs
|
27
26
|
<<-EOS
|
27
|
+
/etc/init.d/puppetmasterd stop
|
28
28
|
echo "#{open(File.join(template_directory, "puppet.conf")).read}" > /etc/puppet/puppet.conf
|
29
29
|
EOS
|
30
30
|
end
|
31
31
|
|
32
32
|
def start_puppet
|
33
33
|
<<-EOS
|
34
|
-
puppetd --listen --fqdn
|
34
|
+
puppetd --listen --fqdn #{@instance.name}
|
35
35
|
EOS
|
36
36
|
end
|
37
37
|
|
@@ -14,12 +14,12 @@ module PoolParty
|
|
14
14
|
|
15
15
|
def has_git_repos
|
16
16
|
with_options(:requires => 'Package["git-core"]') do
|
17
|
-
has_directory(:name => "#{path}")
|
18
|
-
|
17
|
+
# has_directory(:name => "#{path}")
|
18
|
+
|
19
19
|
exec({:name => "git-#{name}"}) do
|
20
20
|
command @parent.user ? "git clone #{@parent.user}@#{@parent.source} #{@parent.path}" : "git clone #{@parent.source} #{@parent.path}"
|
21
21
|
cwd "#{::File.dirname(@parent.path) if @parent.path}"
|
22
|
-
creates "#{@parent.path}"
|
22
|
+
creates "#{@parent.path}/.git"
|
23
23
|
end
|
24
24
|
|
25
25
|
exec(:name => "git-update-#{name}", :cwd => "#{path}") do
|
@@ -27,11 +27,6 @@ module PoolParty
|
|
27
27
|
requires "Exec['git-#{@parent.name}']"
|
28
28
|
end
|
29
29
|
|
30
|
-
if symlink
|
31
|
-
has_file(:name => "#{symlink}") do
|
32
|
-
ensures @parent.path
|
33
|
-
end
|
34
|
-
end
|
35
30
|
end
|
36
31
|
end
|
37
32
|
|
data/lib/poolparty/pool/base.rb
CHANGED
@@ -23,8 +23,7 @@ module PoolParty
|
|
23
23
|
:default_specfile_name => "pool.spec",
|
24
24
|
:port => "80",
|
25
25
|
:forwarding_port => "8080",
|
26
|
-
:proxy_mode => "http",
|
27
|
-
:pool_logger_location => File.join(Dir.pwd, "logs"),
|
26
|
+
:proxy_mode => "http",
|
28
27
|
# EC2 Options
|
29
28
|
:ami => "ami-1cd73375"
|
30
29
|
})
|
@@ -70,6 +69,10 @@ module PoolParty
|
|
70
69
|
]
|
71
70
|
end
|
72
71
|
|
72
|
+
def pool_logger_location
|
73
|
+
File.join(Dir.pwd, "logs")
|
74
|
+
end
|
75
|
+
|
73
76
|
end
|
74
77
|
end
|
75
78
|
end
|
data/lib/poolparty/pool/cloud.rb
CHANGED
@@ -107,10 +107,11 @@ module PoolParty
|
|
107
107
|
|
108
108
|
# Configuration files
|
109
109
|
def build_manifest
|
110
|
+
@build_manifest ||= build_from_existing_file
|
110
111
|
unless @build_manifest
|
111
112
|
reset_resources!
|
112
113
|
add_poolparty_base_requirements
|
113
|
-
|
114
|
+
|
114
115
|
@build_manifest = returning Array.new do |str|
|
115
116
|
|
116
117
|
str << resources_string_from_resources(resources)
|
@@ -130,6 +131,14 @@ module PoolParty
|
|
130
131
|
@build_manifest
|
131
132
|
end
|
132
133
|
|
134
|
+
def build_from_existing_file
|
135
|
+
if ::FileTest.file?("/etc/puppet/manifests/classes/poolparty.pp")
|
136
|
+
open("/etc/puppet/manifests/classes/poolparty.pp").read
|
137
|
+
else
|
138
|
+
nil
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
133
142
|
# To allow the remote instances to do their job,
|
134
143
|
# they need a few options to run, these are the required options
|
135
144
|
# to be saved on the remote "master" machine
|
@@ -134,6 +134,12 @@ module PoolParty
|
|
134
134
|
def absent
|
135
135
|
"absent"
|
136
136
|
end
|
137
|
+
def cancel(*args)
|
138
|
+
options[:cancelled] = args.empty? ? true : args[0]
|
139
|
+
end
|
140
|
+
def cancelled?
|
141
|
+
options[:cancelled] || false
|
142
|
+
end
|
137
143
|
|
138
144
|
# Give us a template to work with on the resource
|
139
145
|
# Make sure this template is moved to the tmp directory as well
|
@@ -206,24 +212,24 @@ module PoolParty
|
|
206
212
|
def to_string(prev="")
|
207
213
|
opts = get_modified_options
|
208
214
|
returning Array.new do |output|
|
215
|
+
unless cancelled?
|
216
|
+
output << @prestring || ""
|
209
217
|
|
210
|
-
|
218
|
+
if resources && !resources.empty?
|
219
|
+
@cp = classpackage_with_self(self)
|
220
|
+
output << @cp.to_string
|
221
|
+
output << "include #{@cp.name.sanitize}"
|
222
|
+
end
|
211
223
|
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
224
|
+
unless virtual_resource?
|
225
|
+
output << "#{prev}#{class_type_name} {"
|
226
|
+
output << "#{prev}\"#{self.key}\":"
|
227
|
+
output << opts.flush_out("#{prev*2}").join(",\n")
|
228
|
+
output << "#{prev}}"
|
229
|
+
end
|
217
230
|
|
218
|
-
|
219
|
-
output << "#{prev}#{class_type_name} {"
|
220
|
-
output << "#{prev}\"#{self.key}\":"
|
221
|
-
output << opts.flush_out("#{prev*2}").join(",\n")
|
222
|
-
output << "#{prev}}"
|
231
|
+
output << @poststring || ""
|
223
232
|
end
|
224
|
-
|
225
|
-
output << @poststring || ""
|
226
|
-
|
227
233
|
end.join("\n")
|
228
234
|
end
|
229
235
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PoolParty
|
2
2
|
module Resources
|
3
3
|
|
4
|
-
class Remotefile <
|
4
|
+
class Remotefile < Resource
|
5
5
|
# Not really my favorite of lines
|
6
6
|
include PoolParty::Configurable
|
7
7
|
|
@@ -16,6 +16,10 @@ module PoolParty
|
|
16
16
|
"file"
|
17
17
|
end
|
18
18
|
|
19
|
+
def source(arg=nil)
|
20
|
+
arg ? options[:source] = arg : "#{Base.fileserver_base}/#{::File.basename(name)}"
|
21
|
+
end
|
22
|
+
|
19
23
|
end
|
20
24
|
|
21
25
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module PoolParty
|
2
|
+
module Resources
|
3
|
+
|
4
|
+
class Symlink < Resource
|
5
|
+
|
6
|
+
def from(*args)
|
7
|
+
options.merge!(:ensure => args[0])
|
8
|
+
end
|
9
|
+
|
10
|
+
def class_type_name
|
11
|
+
"file"
|
12
|
+
end
|
13
|
+
|
14
|
+
def disallowed_options
|
15
|
+
[:name]
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<?xml version="1.0" ?>
|
2
|
+
<cib admin_epoch="0" epoch="0" num_updates="0">
|
3
|
+
<configuration>
|
4
|
+
<crm_config>
|
5
|
+
<cluster_property_set id="cib-bootstrap-options">
|
6
|
+
<attributes>
|
7
|
+
<nvpair id="cib-bootstrap-options-symmetric-cluster" name="symmetric-cluster" value="true"/>
|
8
|
+
<nvpair id="cib-bootstrap-options-no-quorum-policy" name="no-quorum-policy" value="stop"/>
|
9
|
+
<nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="0"/>
|
10
|
+
<nvpair id="cib-bootstrap-options-default-resource-failure-stickiness" name="default-resource-failure-stickiness" value="0"/>
|
11
|
+
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
|
12
|
+
<nvpair id="cib-bootstrap-options-stonith-action" name="stonith-action" value="reboot"/>
|
13
|
+
<nvpair id="cib-bootstrap-options-startup-fencing" name="startup-fencing" value="true"/>
|
14
|
+
<nvpair id="cib-bootstrap-options-stop-orphan-resources" name="stop-orphan-resources" value="true"/>
|
15
|
+
<nvpair id="cib-bootstrap-options-stop-orphan-actions" name="stop-orphan-actions" value="true"/>
|
16
|
+
<nvpair id="cib-bootstrap-options-remove-after-stop" name="remove-after-stop" value="false"/>
|
17
|
+
<nvpair id="cib-bootstrap-options-short-resource-names" name="short-resource-names" value="true"/>
|
18
|
+
<nvpair id="cib-bootstrap-options-transition-idle-timeout" name="transition-idle-timeout" value="5min"/>
|
19
|
+
<nvpair id="cib-bootstrap-options-default-action-timeout" name="default-action-timeout" value="20s"/>
|
20
|
+
<nvpair id="cib-bootstrap-options-is-managed-default" name="is-managed-default" value="true"/>
|
21
|
+
<nvpair id="cib-bootstrap-options-cluster-delay" name="cluster-delay" value="60s"/>
|
22
|
+
<nvpair id="cib-bootstrap-options-pe-error-series-max" name="pe-error-series-max" value="-1"/>
|
23
|
+
<nvpair id="cib-bootstrap-options-pe-warn-series-max" name="pe-warn-series-max" value="-1"/>
|
24
|
+
<nvpair id="cib-bootstrap-options-pe-input-series-max" name="pe-input-series-max" value="-1"/>
|
25
|
+
</attributes>
|
26
|
+
</cluster_property_set>
|
27
|
+
</crm_config>
|
28
|
+
<nodes/>
|
29
|
+
<resources>
|
30
|
+
<% ha_nodenames.each_with_index do |name, index| %>
|
31
|
+
<primitive class="ocf" id="IPaddr_<%= name %>" provider="heartbeat" type="IPaddr">
|
32
|
+
<operations>
|
33
|
+
<op id="IPaddr_<%= name %>_mon" interval="5s" name="monitor" timeout="<%= ha_timeout %>"/>
|
34
|
+
</operations>
|
35
|
+
<instance_attributes id="IPaddr_<%= name %>_inst_attr">
|
36
|
+
<attributes>
|
37
|
+
<nvpair id="IPaddr_<%= name %>_attr_0" name="ip" value="<%= ha_node_ips[index] %>"/>
|
38
|
+
</attributes>
|
39
|
+
</instance_attributes>
|
40
|
+
</primitive>
|
41
|
+
<% end %>
|
42
|
+
</resources>
|
43
|
+
<constraints>
|
44
|
+
<% ha_nodenames.each_with_index do |name, index| %>
|
45
|
+
<rsc_location id="rsc_location_IPaddr_<%= name %>" rsc="IPaddr_<%= name %>">
|
46
|
+
<rule id="prefered_location_IPaddr_<%= name %>" score="100">
|
47
|
+
<expression attribute="#uname" id="prefered_location_IPaddr_<%= name %>_expr" operation="eq" value="<%= name %>"/>
|
48
|
+
</rule>
|
49
|
+
</rsc_location>
|
50
|
+
<% end %>
|
51
|
+
</constraints>
|
52
|
+
</configuration>
|
53
|
+
<status/>
|
54
|
+
</cib>
|
@@ -3,8 +3,10 @@ keepalive 2 # Time inbetween heartbeats
|
|
3
3
|
deadtime 32 # wait 32 seconds before declaring dead
|
4
4
|
warntime 16 # issue a warning halfway through
|
5
5
|
initdead 60 # Don't boot instances between 60 seconds of each other
|
6
|
-
|
6
|
+
logfacility daemon # Log to syslog as facility "daemon"
|
7
|
+
auto_failback off
|
7
8
|
use_logd yes
|
8
|
-
|
9
|
+
bcast eth0
|
10
|
+
crm respawn
|
9
11
|
|
10
12
|
node <%= ha_nodenames.join(" ") %>
|
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.8"
|
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-15}
|
8
8
|
s.description = %q{Self-healing, auto-scaling cloud computing tool}
|
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/code.css", "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/symlink.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/symlink_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!
|
@@ -22,7 +22,7 @@ describe "Slave provisioner" do
|
|
22
22
|
@slave.install
|
23
23
|
end
|
24
24
|
end
|
25
|
-
it "should return
|
26
|
-
@slave.setup_puppet.should =~ /
|
25
|
+
it "should return setup_puppet with the master" do
|
26
|
+
@slave.setup_puppet.should =~ /master/
|
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(:name => "gitrepos.git", :source => "git://source.git").to_string.should =~ /
|
11
|
+
@tc.has_git(:name => "gitrepos.git", :source => "git://source.git").to_string.should =~ /exec \{/
|
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:/
|
@@ -27,7 +27,7 @@ describe "Remote Instance" do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
it "should have the path set within the resource" do
|
30
|
-
@tc.resource(:git).first.to_string.should =~ /
|
30
|
+
@tc.resource(:git).first.to_string.should =~ /exec \{/
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -279,6 +279,21 @@ describe "Cloud" do
|
|
279
279
|
@manifest.should =~ /host \{\n\t\t"master":/
|
280
280
|
end
|
281
281
|
end
|
282
|
+
describe "building with an existing manifest" do
|
283
|
+
before(:each) do
|
284
|
+
@file = "/etc/puppet/manifests/nodes/nodes.pp"
|
285
|
+
@file.stub!(:read).and_return "nodes"
|
286
|
+
::FileTest.stub!(:file?).with("/etc/puppet/manifests/classes/poolparty.pp").and_return true
|
287
|
+
@cloud.stub!(:open).with("/etc/puppet/manifests/classes/poolparty.pp").and_return @file
|
288
|
+
end
|
289
|
+
it "should not call resources_string_from_resources if the file /etc/puppet/manifests/nodes/nodes.pp exists" do
|
290
|
+
@cloud.should_not_receive(:add_poolparty_base_requirements)
|
291
|
+
@cloud.build_manifest
|
292
|
+
end
|
293
|
+
it "should build from the existing file" do
|
294
|
+
@cloud.build_manifest.should == "nodes"
|
295
|
+
end
|
296
|
+
end
|
282
297
|
end
|
283
298
|
end
|
284
299
|
|
@@ -238,6 +238,15 @@ describe "Resource" do
|
|
238
238
|
it "should turn the resource into a string" do
|
239
239
|
@file.to_s.should == "File['pancakes']"
|
240
240
|
end
|
241
|
+
describe "cancelled" do
|
242
|
+
it "should make a resource not cancelled by default" do
|
243
|
+
@file.cancelled?.should == false
|
244
|
+
end
|
245
|
+
it "should say cancelled? is true if it has been cancelled" do
|
246
|
+
@file.cancel
|
247
|
+
@file.cancelled?.should == true
|
248
|
+
end
|
249
|
+
end
|
241
250
|
end
|
242
251
|
end
|
243
252
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
include PoolParty::Resources
|
4
|
+
|
5
|
+
describe "Symlink" do
|
6
|
+
before(:each) do
|
7
|
+
reset_resources!
|
8
|
+
@cloud = cloud :symlink_test do
|
9
|
+
has_symlink(:name => "/etc/apache2/puppetmaster.conf", :from => "/etc/http/puppetmaster.conf")
|
10
|
+
end
|
11
|
+
@symlink = @cloud.resource(:symlink).first
|
12
|
+
end
|
13
|
+
it "should create a file" do
|
14
|
+
@cloud.resource(:symlink).empty?.should == false
|
15
|
+
end
|
16
|
+
it "should create a file { resource" do
|
17
|
+
@symlink.to_string.should =~ /file \{/
|
18
|
+
end
|
19
|
+
end
|
data/website/index.html
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
<h1>PoolParty</h1>
|
35
35
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/poolparty"; return false'>
|
36
36
|
<p>Get Version</p>
|
37
|
-
<a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.
|
37
|
+
<a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.8</a>
|
38
38
|
</div>
|
39
39
|
<h1>‘Easy cloud computing’</h1>
|
40
40
|
<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.8
|
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-15 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- lib/poolparty/pool/resources/remote_file.rb
|
198
198
|
- lib/poolparty/pool/resources/service.rb
|
199
199
|
- lib/poolparty/pool/resources/sshkey.rb
|
200
|
+
- lib/poolparty/pool/resources/symlink.rb
|
200
201
|
- lib/poolparty/pool/resources/variable.rb
|
201
202
|
- lib/poolparty/pool/script.rb
|
202
203
|
- lib/poolparty/templates/authkeys
|
@@ -268,6 +269,7 @@ files:
|
|
268
269
|
- spec/poolparty/pool/resources/remote_file_spec.rb
|
269
270
|
- spec/poolparty/pool/resources/service_spec.rb
|
270
271
|
- spec/poolparty/pool/resources/sshkey_spec.rb
|
272
|
+
- spec/poolparty/pool/resources/symlink_spec.rb
|
271
273
|
- spec/poolparty/pool/resources/variable_spec.rb
|
272
274
|
- spec/poolparty/pool/script_spec.rb
|
273
275
|
- spec/poolparty/pool/test_plugins/sshkey_test
|