1 package Oyster::Provision;
5 has 'api_username' => ( is => 'ro', isa => 'Str');
6 has 'api_password' => ( is => 'ro', isa => 'Str');
7 has 'name' => ( is => 'ro', isa => 'Str');
8 has 'size' => ( is => 'ro', isa => 'Str');
9 has 'image' => ( is => 'ro', isa => 'Str');
10 has 'pub_ssh' => ( is => 'ro', isa => 'Str');
11 has 'provision_backend' => (is => 'rw', isa => 'Str', required => 1, default => 'Oyster::Provision::Rackspace' );
17 my $role = $self->provision_backend;
20 "$role"->meta->apply($self);
29 Oyster::Provision - Provision an Oyster
33 my $server = Oyster::Provision->new(
37 pub_ssh => "$ENV{HOME}/.ssh/id_rsa.pub",
43 By default, the L<Oyster::Provision::Rackspace> backend
46 Each backend needs to accept at least the C<name>,
47 C<size>, C<image> and C<pub_ssh> parameters. The meaning
48 of these parameters may differ from one backend to another.
52 Each backend usually implements the following C<required>
59 Creates a new server by given name, if such server does
62 Installs the required packages for the distribution
66 Gets rid of the server instance
70 Hopefully scales the server