Here are detailed, step by step instructions, on how to install and setup your EC2 environment for testing with Selenium Grid
The current EC2 automation assumes a UNIX plaform (Mac OS X, Linux Solaris, BSD). Windows users can still use the Official EC2 Image for Selenium Grid 1.0 but the built-in automation is not likely to work.
Go to http://www.amazon.com/aws and click on the
Sign up for AWS
link in the upper right.
Complete all the information required for Amazon AWS registration.
If you are not already logged into your AWS account, click on the following link and logging into your account. http://www.amazon.com/aws
Explore Our WebServices
Amazon Elastic Compute Cloud (Amazon EC2)
Sign up for this Web Service. You will need a credit card for this service as it is a pay-for-use service.
Once your AWS account has been created and you have added the EC2 web service to your account navigate back to your AWS Home account.
If you are not already logged into your AWS account, click on the following link and logging into your account. http://www.amazon.com/aws
The Amazon EC2 command line tools require either a JDK/JRE 1.5 or higher.
You can double-check what version you have installed on your computer
by openning a terminal window and
running java -version
The command output should indicate that a 1.5 version of the JDK is available. If not, update your JDK to 1.5
Once your accounts have been created and your certificates have been download the link to EC2 Command Line Tools.
Extract the downloaded file on your computer. Please take note of the directory where the tools have been extracted, you are going to need this information in a second.
Your must set the following environment variables:
EC2_HOMEEC2_PRIVATE_KEYexport EC2_PRIVATE_KEY=/somewhere/pk-5CCEI7ODBPYGRXYOAZWGPVCG5LJ6HLGE.pem
EC2_CERTexport EC2_CERT=/somewhere/cert-5CCEI7ODBPYGRXYOAZWGPVCG5LJ6HLGE.pem
EC2_KEYPAIRexport EC2_KEYPAIR=/somewhere/id_rsa-gsg-keypair.pem
EC2_KEYPAIR_NAMEexport EC2_KEYPAIR_NAME=gsg-keypair
You must also add ${EC2_HOME}/bin to your PATH
At this point you should be able to successfully run the following commands:
$ ec2-version 1.2-13740 2007-08-29 $ ec2-describe-images -a | grep selenium-grid IMAGE ami-780fea11 selenium-grid-1.0/image.manifest.xml 069216575636 available public
Pay special attention to your EC2 private key, certificate, and the name of the keypair you generate.
For more detail instructions or for trouble shooting, consult the EC2 Getting Started Guide for more information Once your AWS account has been created and you have added the 2 web services (S3 and EC2) to your account Amazon Elastic Compute Cloud Getting Started Guide
You will need to install Capistrano to take advance of Selenium Grid EC2 automation.
On Ubuntu:
sudo apt-get install ruby rubygems
sudo gem install capistrano -y
On OS X 10.5 (Leopard):
sudo gem install capistrano -y
Installation for other platforms is documented on Capistrano website.
Install the latest Selenium Grid distribution if you haven't done it already.
You are now ready to run Selenium Grid Demo on EC2