lib/poolparty/base_packages/poolparty.rb in auser-poolparty-0.2.60 vs lib/poolparty/base_packages/poolparty.rb in auser-poolparty-0.2.61
- old
+ new
@@ -1,17 +1,11 @@
module PoolParty
class Base
- plugin :poolparty do
+ plugin :poolparty_base_packages do
def enable
# 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
-
- # has_host({:name => "$hostname", :ip => "127.0.0.1", :alias => "localhost"})
has_package(:name => "erlang")
has_package(:name => "erlang-dev")
has_package(:name => "erlang-src")
# has_package(:name => "yaws")
@@ -41,20 +35,26 @@
has_gempackage(:name => "RubyInline", :download_url => "http://rubyforge.org/frs/download.php/45683/RubyInline-3.8.1.gem")
has_gempackage(:name => "poolparty", :download_url => "http://github.com/auser/poolparty/tree/master%2Fpkg%2Fpoolparty.gem?raw=true", :requires => [get_gempackage("ruby2ruby"), get_gempackage("RubyInline"), get_gempackage("ParseTree")])
# , :ifnot => "/bin/ps aux | /bin/grep -q pm_node"
- has_exec(:name => "build_messenger", :command => ". /etc/profile && server-build-messenger -v")
+ has_exec(:name => "build_messenger", :command => ". /etc/profile && server-build-messenger")
has_exec(:name => "start_node", :command => ". /etc/profile && server-start-node")
+ has_exec(:name => "update_hosts", :command => ". /etc/profile && server-update-hosts")
# has_runit_service("pm_node", "pm_node", File.join(File.dirname(__FILE__), "..", "templates/messenger/node/"))
end
# execute_on_node do
has_cron(:name => "puppetd runner", :user => Base.user, :minute => "*/5") do
requires get_gempackage("poolparty")
- command "/usr/bin/puppetrun"
+ command "/usr/bin/puppetrunner"
end
+ has_remotefile(:name => "/usr/bin/puppetrunner") do
+ mode 744
+ template File.join(File.dirname(__FILE__), "..", "templates/puppetrunner")
+ end
+
# end
# Cloud panel setup
# has_directory(:name => "/var/www/cloudpanel")
@@ -90,20 +90,15 @@
has_remotefile(:name => "/usr/bin/puppetcleaner") do
mode 744
template File.join(File.dirname(__FILE__), "..", "templates/puppetcleaner")
end
+
+ has_remotefile(:name => "/usr/bin/puppetrerun") do
+ mode 744
+ template File.join(File.dirname(__FILE__), "..", "templates/puppetrerun")
+ end
end
-
- has_remotefile(:name => "/usr/bin/puppetrerun") do
- mode 744
- template File.join(File.dirname(__FILE__), "..", "templates/puppetrerun")
- end
- has_remotefile(:name => "/usr/bin/puppetrunner") do
- mode 744
- template File.join(File.dirname(__FILE__), "..", "templates/puppetrunner")
- end
-
# has_host(:name => "puppet", :ip => (self.respond_to?(:master) ? self : parent).master.ip)
end
end
end
\ No newline at end of file