|
|
> The testing framework is being experimented on Amazon EC2. A more complete documentation will be available when the installation is done.
|
|
|
|
|
|
# Amazon EC2
|
|
|
|
|
|
## Pricing
|
|
|
|
|
|
* Amazon EBS Snapshots to Amazon S3 (http://aws.amazon.com/en/pricing/ebs/).
|
|
|
* Used to store images of Linux and Windows machines. Amazon S3 storage cost.
|
|
|
|
|
|
* Amazon Virtual Private Cloud (https://aws.amazon.com/en/pricing/vpc/)
|
|
|
* Used to choose the private addresses assigned to instances. This is free.
|
|
|
|
|
|
* Amazon S3 (http://aws.amazon.com/en/s3/pricing/)
|
|
|
* mathjaxtest bucket is used to store MathJax results. Amazon S3 storage cost.
|
|
|
* There is no Data Transfer charge for data transferred between Amazon EC2 and Amazon S3 within the same Region or for data transferred between the Amazon EC2 Northern Virginia Region and the Amazon S3 US Standard Region.
|
|
|
* Do we pay if we download test results from the AWS Management Console?
|
|
|
|
|
|
* CloudFront (http://aws.amazon.com/en/pricing/cloudfront/)
|
|
|
* Do we need to provide a public Web access to the test results (mathjaxtest bucket)?
|
|
|
|
|
|
* Running Instances (during testing period only)
|
|
|
* Amazon EBS Volumes (http://aws.amazon.com/en/pricing/ebs/): disks used by running instances. Storage and IO requests cost.
|
|
|
* On-Demand Instances charge (http://aws.amazon.com/en/ec2/pricing/). Per instance-hour cost.
|
|
|
* Data Transfer (http://aws.amazon.com/en/ec2/pricing/).
|
|
|
* Data transferred between instances in the same Availability Zone using private IP addresses is free.
|
|
|
* Remote access to instances (SSH, RDP)
|
|
|
* Web Interface to control the framework (HTTP)
|
|
|
* Downloading/Updating MathJax-test github repository, browsers, programs etc
|
|
|
* IP Addresses (http://aws.amazon.com/en/ec2/pricing/). Used for external access to instances (Remote access, Web Interface). We don't use fixed addresses, this is less convenient but free.
|
|
|
|
|
|
## AWS Management Console
|
|
|
|
|
|
* Instances
|
|
|
- Windows and Linux instances in use
|
|
|
|
|
|
* Images
|
|
|
|
|
|
* AMIs: images of the machines.
|
|
|
- Linux
|
|
|
- Windows
|
|
|
|
|
|
* Elastic Block Store
|
|
|
|
|
|
* Volumes:
|
|
|
- Windows and Linux volumes of instances in use
|
|
|
|
|
|
* Snapshots:
|
|
|
- Windows (30GiB)
|
|
|
- Linux (8GiB)
|
|
|
|
|
|
* Network & Security
|
|
|
|
|
|
* Security Groups
|
|
|
- mathjaxtest
|
|
|
- ICMP, TCP, UDP from mathjax-test: allow total communication between member of the security groups.
|
|
|
- HTTP allow connection to the Web interface
|
|
|
- SSH: allow connection to the Linux machine
|
|
|
- RDP: allow connection to the Windows machine
|
|
|
- The VNC port is disallowed. Use VNC over a SSH session for better security.
|
|
|
|
|
|
* Key Pairs
|
|
|
- mathjaxtest: key to use for remote access (SSH and RDP)
|
|
|
|
|
|
## Starting the Testing Framework
|
|
|
|
|
|
* Running an Instance
|
|
|
- Click on Images => AMIs. Right click on an instance (Linux or Windows) and select "Launch Instance"
|
|
|
- Choose an Instance Type, select VPC and Continue. Suggestion: use "High-CPU On-Demand Instances" for intensive testing. "Standard On-Demand Instances" may be fine otherwise. "Micro On-Demand Instances" can also be used to do maintenance tasks (they can't be used within a VPC).
|
|
|
- Enter a private IP address for your instance, and Continue. The framework is configured to assume that IPs from 10.0.0.30 to 10.0.0.34 correspond to Linux machines while IPs from 10.0.0.40 to 10.0.0.44 correspond to Windows machines. Also the main machine (with the test suite, MathJax branches and Task Controller) is assumed to be 10.0.0.30.
|
|
|
- Skip the next screen.
|
|
|
- Choose the mathjaxtest Key Pairs and Continue.
|
|
|
- Choose the mathjaxtest Security Groups and Continue.
|
|
|
- Launch the instance.
|
|
|
|
|
|
* Attaching Elastic IP to an instance
|
|
|
- Click on Network & Security => Elastic IPs
|
|
|
- Allocate New Adress, choose VPC
|
|
|
- Attach the address created to your instance
|
|
|
|
|
|
* Some SSH/VNC/RDP clients
|
|
|
- Linux: vinagre (SSH, VNC), rdeskop (RDP)
|
|
|
- Windows, Mac: ?
|
|
|
|
|
|
* Linux Instance
|
|
|
- Use a SSH client to connect to the instance.
|
|
|
- Once you are logged to a terminal, use ~/start.sh to start Selenium and VNC servers. On the main machine, this will also mount the mathjaxtest bucket on ~/MathJax-results/ and start the task handler.
|
|
|
- If necessary, you may use a VNC client to connect to the instance.
|
|
|
|
|
|
* Windows Instance
|
|
|
- Use a RDP client to connect to the instance.
|
|
|
- Open a Windows Session.
|
|
|
- Open a command line and execute "java -jar selenium-server.jar" to run the Selenium Server.
|
|
|
|
|
|
* Web Interface
|
|
|
- Open the page http://{public address of the main machine}/testing/web/
|
|
|
- Read http://devel.mathjax.org/testing/web/docs/html/qa-web-interface.html for more details.
|
|
|
|
|
|
# Running the Tests
|
|
|
|
|
|
# Stopping the Testing Framework
|
|
|
|
|
|
* Saving the test results to Amazon S3
|
|
|
The test results are saved on the main machine in MathJax-test/web/results/. They will be cleared when the instance terminates. To keep them, just copy the
|
|
|
relevant files in ~/MathJax-results/.
|
|
|
|
|
|
* Terminating an Instance
|
|
|
Right Click on an instance and select terminate. This will totally clear the instance and its associated volume. Do not forget to release Elastic IPs addresses.
|
|
|
|
|
|
# Maintenance of the Testing Machine
|
|
|
|
|
|
* Preserving the state of the Linux or Windows machines
|
|
|
Instances Actions => Create an AMI file. After a moment, a new AMI image and Snapshot will be created. |