X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDist%2FZilla%2FApp%2FCommand%2Fprovision.pm;h=9ba0bc2bfe30abb80d9a4a11e8c0ce439e28e1d2;hb=6762f691c9affbd64839a418bc52b03a8f23290f;hp=001edad4e0252816861f0816fe8355dbac94825e;hpb=45bec3869f4bbacc7d522b8a683bbd52d837ff3d;p=p5sagit%2FOyster.git diff --git a/lib/Dist/Zilla/App/Command/provision.pm b/lib/Dist/Zilla/App/Command/provision.pm index 001edad..9ba0bc2 100644 --- a/lib/Dist/Zilla/App/Command/provision.pm +++ b/lib/Dist/Zilla/App/Command/provision.pm @@ -9,6 +9,7 @@ use Dist::Zilla::App -command; use Moose; use Config::Any; use Hash::Merge 'merge'; +use Oyster::Provision; sub abstract { 'provision a new Oyster VM' } @@ -35,14 +36,15 @@ sub execute { my %hash = @hashes > 1 ? %{ merge( @hashes ) } : $hashes[0]; - $hash{provision_backend} = delete $hash{type} || 'Rackspace'; + my $type = delete $hash{type} || 'Oyster::Provision::Rackspace'; + $hash{provision_backend} = $type =~/^Oyster::Provision::/ ? $type : "Oyster::Provision::$type"; $hash{pub_ssh} ||= "$ENV{HOME}/.ssh/id_rsa.pub"; - $hash{size} ||= 128; - $hash{image} ||= 'meerkat'; # TODO, should this be determined on backend? + $hash{size} ||= 1; # id 1 - ram 256 MiB - disk 10 GiB + $hash{image} ||= 69; # id 69 - Ubuntu 10.10 (meerkat) - use Oyster::Provision; my $server = Oyster::Provision->new( name => $name, + config => \%hash, %hash, ); $server->create;