public
Description: Run a self-healing, auto-scaled and monitored cloud simply, in the clouds, on nearly any hardware, such as EC2, eucalyptus and vmware
Home | Edit | New

Plugin development

  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.

Last edited by jcn, Wed Aug 26 20:31:52 -0700 2009
Home | Edit | New
Versions: