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 );
10 has 'config' => (is => 'rw', isa => 'HashRef', required => 1 );
16 if(!exists($self->config()->{provision_backend})) {
17 $self->config()->{provision_backend} = 'Oyster::Provision::Rackspace';
20 my $role = $self->config()->{provision_backend};
23 "$role"->meta->apply($self);
32 Oyster::Provision - Provision an Oyster
36 my $server = Oyster::Provision->new(
40 pub_ssh => "$ENV{HOME}/.ssh/id_rsa.pub",
46 By default, the L<Oyster::Provision::Rackspace> backend
49 Each backend needs to accept at least the C<name>,
50 C<size>, C<image> and C<pub_ssh> parameters. The meaning
51 of these parameters may differ from one backend to another.
55 Each backend usually implements the following C<required>
62 Creates a new server by given name, if such server does
65 Installs the required packages for the distribution
69 Gets rid of the server instance
73 Hopefully scales the server