The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

TAP::Harness::Remote::EC2 - Run tests on EC2 servers

SYNOPSIS

    prove --harness TAP::Harness::Remote::EC2 t/*.t

DESCRIPTION

Based on TAP::Harness::Remote, this module uses your running Amazon EC2 instances (http://amazon.com/ec2) to run tests against, instead of a preconfigured list of hosts.

USAGE

Configuration is much the same as TAP::Harness::Remote, except the configuration file lives in /.remote_test_ec2 -- see "CONFIGURATION AND ENVIRONMENT".

METHODS

load_remote_config

Loads and canonicalizes the configuration. Writes and uses the default configuration ("default_config") if the file does not exist.

hosts EC2 [, STATUS]

Returns an array of Net::Amazon::EC2::RunningInstances objects which match the ami type specified in the config file, and whose status matches the given STATUS. STATUS may be either a string, or a regex; it defaults to "running".

EC2 should be a valid Net::Amazon::EC2 object.

wait_pending EC2.

Waits until all hosts in the "pending" state have started. EC2 should be a valid Net::Amazon::EC2 object.

CONFIGURATION AND ENVIRONMENT

The configuration is stored in ~/.remote_test_ec2, and is mostly identical to the configuration of TAP::Harness::Remote (see "CONFIGURATION AND ENVIRONMENT" in TAP::Harness::Remote), with the following differences:

  • The hosts parameter is ignored, and produces a warning if present.

  • The access_key amd secret_access_key parameters are required, to be able to query the Amazon EC2 interface and determine the running EC2 hosts. You can find your access keys at https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key

  • There is an optional ami parameter, which limits which AMIs will be used to run tests; it also lets the harness start the instances if there are not enough running.

  • There is an optional instances parameter, which specifies the number of AMI instances to run tests on. Defaults to one.

  • There is an optional instance_type parameter, which controls the type of instances to create; possible arguments are m1.small, m1.large, and m1.xlarge. The default is m1.xlarge.

DEPENDENCIES

Net::Amazon::EC2, TAP::Harness::Remote

BUGS AND LIMITATIONS

The default perl installed Amazon's provided EC2 images is extremely slow (about 4x slower than a clean, optimized build). We thus strongly suggest you compile your own.

AUTHOR

Alex Vandiver <alexmv@bestpractical.com>

LICENCE AND COPYRIGHT

Copyright (c) 2007-2008, Best Practical Solutions, LLC. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.