Skip to content
jcn edited this page Sep 13, 2010 · 11 revisions
  1. TODO: FLUSH OUT

Plugins are a cornerstone of PoolParty. When you call


apache do
end

You are using the apache2 plugin. I’m going to show you quickly how to get your plugin off the ground. Plugins are essentially resources, but are used as the term for a resource that contains other resources. You’ll see what we mean shortly.

The basic template of a plugin looks like:

module PoolParty
    module Resources

      class Plugin < Resource
      end

    end
  end

The plugin has access to all the same callbacks including before_load, after_loaded, before_compile, and after_compile.

As long as this is required in the clouds.rb, you are free to call it from within the clouds.rb, like so:


	cloud "app" do
		plugin # or plugin :var => "value" or plugin do, etc.
		...

Plugins use the same resources architecture as resources do, so has_ and does_not_have_ methods are all available on the plugin.

Clone this wiki locally