X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FOyster%2FProvision.pm;h=3db07ee2e257bfe485fba229607494c69fcb497e;hb=40056462c18e3f9fde327de7e8d7464e737127aa;hp=4da50bcebeb8343ea83fe304e88b800bb6c5219e;hpb=3ded63474d7f715bb3c6be48ad6c39cb63f726df;p=p5sagit%2FOyster.git diff --git a/lib/Oyster/Provision.pm b/lib/Oyster/Provision.pm index 4da50bc..3db07ee 100644 --- a/lib/Oyster/Provision.pm +++ b/lib/Oyster/Provision.pm @@ -12,7 +12,59 @@ sub BUILD { my $role = $self->config()->{provision_backend}; + eval "use $role"; "$role"->meta->apply($self); } 1; + +__END__ + +=head1 NAME + +Oyster::Provision - Provision an Oyster + +=head1 SYNOPSIS + + my $server = Oyster::Provision->new( + name => 'Ostrica', + size => '256', + image => 'Meerkat', + pub_ssh => "$ENV{HOME}/.ssh/id_rsa.pub", + ); + $server->create; + +=head1 BACKENDS + +By default, the L backend +will be used. + +Each backend needs to accept at least the C, +C, C and C parameters. The meaning +of these parameters may differ from one backend to another. + +=head1 METHOS + +Each backend usually implements the following C +methods: + +=over + +=item create + +Creates a new server by given name, if such server does +not exist. + +Installs the required packages for the distribution + +=item delete + +Gets rid of the server instance + +=item resize + +Hopefully scales the server + +=back + +=cut