Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Members » lwilson's Home » Using EC2 for Testing Connexions

Using EC2 for Testing Connexions

Document Actions
Brief description of tools that have been set up to allow testing of Connexions using the Amazon Elastic Computing Cloud (EC2).

Pre-requisites:

  1. Install the EC2 command line tools from here.
  2. You will need the cert files for the Connexions EC2 account.

Available Images:

  1. To list available images, use the ec2-describe-images command.
  2. testing images will have a path of connexions/ec2-images/cnxtesting-YYMMDD/image.manifest.xml. The current image is cnxtesting-080711.
  3. To run an image use the ec2-run-images command and pass in the identifier of one of the images.

Passing in arguments to an image:

  1. To pass in an argument to an image, use the -d flag to the ec2-run-images command.
  2. To select a particular devset or group of devsets to be installed on an image, use devset=name,name,name as the -d argument
  3. To select a particular data set to be loaded, use data=full_path_to_data as the -d argument
Example:
To load the assemble-on-demand devset.
ec2-run-images -d devset=assemble-on-demand ami-195abf70

To load the current production backup as the data
ec2-run-images -d data=s3://connexions/backups/production/repository ami-195abf70

To load both the assemble-on-demand devset and the data from the current backup
ec2-run-instances -d 'devset=assemble-on-demand data=s3://connexions/backups/production/repository' ami-195abf70

Accessing a Running Instance:

  1. Use the ec2-describe-instances to see when the status of your instance changes to running.
  2. ssh into the image using one of the accounts (tester1 or tester2).
  3. To load the latest Connexions backup image run sync-from-s3. This will prompt you for your sudo password. Note: This does not need to be done if the data argument was passed to the ec2-run-instances command.
  4. To load a particular devset once an instance is running, you can sudo sync-code -d devset,devset,... to load a set of devsets. Note: This does not need to be done if the devset argument was passed to the ec2-run-instances command.
  5. When this completes the web site can be accessed via http://instance-host-name:8080

Saving/restoring snapshots:

  1. A snapshot of the current Connexions system can be saved to S3 using the sync-to-s3 command.
  2. You can also save a local copy using the -b flag to sync-to-s3 and specifying a local directory. You should use a directory under /mnt as the root file system does not have enough space to store an image of a production Connexions.
  3. To restore a snapshot use the -b option on sync-from-s3 to specify the local directory where your snapshot is located.

Using Elasticfox:

Elasticfox is a plugin for the Firefox web browser that can be used to manipulate EC2 images. It can be installed from here by clicking on the link under "running the extension". After it is installed, select Tools->Elasticfox from the main menu to run it.

  1. To configure it click the credentials button and enter your access id and secret key, then click the add button. This will then fill out the AMI and Instances panels (it could take a few seconds)
  2. The AMI's and Instances tab lists the available AMI's.
  3. If you sort the AMI's list by Visibility, you will see the Connexions private AMI's listed at the top
  4. To run an AMI, select it, then click the green START button. This will display a panel to enter details about the instance. You can select your key-pair (if you have previously set that up). You can also enter values in the User Data text box (see section above on Passing in arguments to an image).
Created by lwilson
Last modified 2008-07-16 10:54