lib/poolparty/base_packages/poolparty.rb in auser-poolparty-0.2.9 vs lib/poolparty/base_packages/poolparty.rb in auser-poolparty-0.2.15
- old
+ new
@@ -2,34 +2,47 @@
class Base
plugin :poolparty do
def enable
has_package(:name => "erlang")
- # These should be installed automagically by poolparty, but just in case
- has_gempackage(:name => "activesupport", :requires => package(:name => "rubygems"))
- has_gempackage(:name => "logging", :requires => package(:name => "rubygems"))
- has_gempackage(:name => "hoe", :requires => package(:name => "rubygems"))
- has_gempackage(:name => "xml-simple", :requires => package(:name => "rubygems"))
- has_gempackage(:name => "ParseTree", :version => "2.2.0", :requires => gempackage(:name => "hoe"))
- has_gempackage(:name => "RubyInline", :requires => gempackage(:name => "ParseTree"))
- has_gempackage(:name => "open4", :requires => gempackage(:name => "hoe"))
- has_gempackage(:name => "ruby2ruby", :requires => gempackage(:name => "ParseTree"))
-
- has_gempackage(:name => "grempe-amazon-ec2", :source => "http://gems.github.com", :requires => gempackage(:name => "xml-simple"))
- has_gempackage(:name => "auser-poolparty", :source => "http://gems.github.com", :requires => [gempackage(:name => "activesupport"), gempackage(:name => "ParseTree")])
-
+ has_package(:name => "rubygems") do
+ # These should be installed automagically by poolparty, but just in case
+ # TODO: Fix the requires method with a helper
+ has_gempackage(:name => "logging")
+ has_gempackage(:name => "xml-simple") do
+ has_gempackage(:name => "grempe-amazon-ec2", :source => "http://gems.github.com")
+ end
+
+ has_gempackage(:name => "hoe") do
+ has_gempackage(:name => "open4")
+
+ has_gempackage(:name => "ParseTree", :version => "2.2.0") do
+ has_gempackage(:name => "ruby2ruby")
+ has_gempackage(:name => "activesupport") do
+ has_gempackage(:name => "auser-poolparty", :source => "http://gems.github.com")
+ end
+ has_gempackage(:name => "RubyInline")
+ end
+ end
+
+ end
+
# Build hostsfile
# TODO: COME BACK AND CLEAN THIS UP
(self.respond_to?(:list_of_running_instances) ? self : parent).list_of_running_instances.each do |ri|
has_host({:name => "#{ri.name}", :ip => ri.ip })
end
- # -n #{parent.name}
+ # Custom run puppet to minimize footprint
+ # TODO: Update the offsetted times
+ has_cron(:name => "puppetd runner", :user => Base.user, :minute => [0,15,30,45]) do
+ command((self.respond_to?(:master) ? self : parent).master.puppet_runner_command)
+ end
+
+ # These are all requirements on the master
execute_if("$hostname", "master") do
- has_cron({:command => ". /etc/profile && which cloud-maintain | /bin/sh"}) do
- minute "*/5"
- end
+ has_cron({:command => ". /etc/profile && which cloud-maintain | /bin/sh", :minute => "*/3"})
end
# has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
end
end
\ No newline at end of file