1 package Oyster::Provision;
5 has 'name' => ( is => 'ro', isa => 'Str', required => 1 );
6 has 'size' => ( is => 'ro', isa => 'Str', required => 1 );
7 has 'image' => ( is => 'ro', isa => 'Str', required => 1 );
8 has 'pub_ssh' => ( is => 'ro', isa => 'Str', required => 1 );
12 return {provision_backend => 'Oyster::Provision::Rackspace'};
19 my $role = $self->config()->{provision_backend};
22 "$role"->meta->apply($self);
31 Oyster::Provision - Provision an Oyster
35 my $server = Oyster::Provision->new(
39 pub_ssh => "$ENV{HOME}/.ssh/id_rsa.pub",
45 By default, the L<Oyster::Provision::Rackspace> backend
48 Each backend needs to accept at least the C<name>,
49 C<size>, C<image> and C<pub_ssh> parameters. The meaning
50 of these parameters may differ from one backend to another.
54 Each backend usually implements the following C<required>
61 Creates a new server by given name, if such server does
64 Installs the required packages for the distribution
68 Gets rid of the server instance
72 Hopefully scales the server