-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Amazon EC2
The AWS Management Console is a Web interface with the following important options:
-
Instances
- Windows and Linux instances in use
-
Images
- AMIs: images of the machines.
- Linux
- Windows
- AMIs: images of the machines.
-
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.
- The Windows machine also has its own security configuration in addition to the above setting. In particular, there are some addresses in the list Internet Explorer trusted/local sites and the Windows Firewall has specific rules to accept connection from the task handler.
-
Key Pairs
-
mathjaxtest: key to use for remote access (SSH and RDP)
-
-
Create Amazon EC2 instances. See "Initializing the Testing Framework".
-
Control the Amazon EC2 instances. See "Remote Access".
-
Start the Selenium servers
- Linux: In a separate terminal (e.g. a "screen" window or a terminal from the GUI), execute "~/seleniumServer.sh".
- Windows: Open "Windows PowerShell" and execute ".\seleniumServer.bat"
- If you have any problem to interrupt Selenium instances you may stop the server and run it again.
-
Use the QA Web Interface to create and run tasks. See http://devel.mathjax.org/testing/web/docs/html/qa-web-interface.html for details. See "Organization of test execution" for a discussion about how to organize test. If you use the suggested configuration "Running Linux Standard On-Demand Instances and 2 Windows High-CPU On-Demand Instances", you can easily create the tasks using the fillTaskList.sh script. To avoid the task handler overload, the configuration sets one task per machine.
-
Save the test results. Terminate the Amazon EC2 instances and release elastic IPs so that we won't be charged anymore. See "Stopping 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.
- 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 two next screens (Storage Device Configuration, Custom Tags).
- Choose the mathjaxtest Key Pairs and Continue.
- Choose the mathjaxtest Security Groups and Continue.
- Launch the instance.
-
Associating Elastic IP to an instance
- Click on Network & Security => Elastic IPs
- Allocate New Adress, choose VPC, Yes Allocate
- Right Click on the Elastic IP => Associate
- Associate IP to an instance, Yes Associate
-
Some SSH/VNC/RDP clients
- Linux: vinagre (SSH, VNC), rdeskop (RDP)
- Windows, Mac: ?
-
Linux Instance
- Use a SSH client to connect to the instance.
- Use the "screen" command to handle several windows.
- In one screen window, use "~/init.sh" to start the VNC server. On the machine 10.0.0.30, this will also mount the mathjaxtest bucket on ~/MathJax-results/ and start the task handler.
- Use a VNC client to connect to the GUI.
-
Windows Instance
- Use a RDP client to connect to the instance.
- Open a Windows Session.
-
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.
-
Directory Structure
- Linux
- ~/AmazonS3/: mount points for Amazon S3 buckets
- ~/bin/: some programs used by the testing framework
- ~/Desktop/Webdrivers/: Drivers for Chrome. Added to $PATH by ~/.bashrc.
- ~/fillTaskList.sh: Bash script to easily create tasks instead of using the QA Web Interface.
- ~/init.sh: Bash script to mount Amazon S3 buckets, start the GUI, the VNC server and (if the host is 10.0.0.30) start the task handler.
- mathjax: symbolic link to ~/MathJax-test/mathjax. Available at http://devel.mathjax.org/mathjax/
- ~/MathJax-test/: the MathJax testing framework.
- ~/mount-AmazonS3.sh: Bash script to mount Amazon S3 buckets
- results: symbolic link to ~/MathJax-test/results.
- ~/seleniumServer.sh: Bash script to start the selenium server
- ~/start-gui.sh: Bash script to start the GUI and the VNC server.
- ~/start-task-handler.sh: Bash script to start the task handler
- ~/umount-AmazonS3.sh: Bash script to unmount Amazon S3 buckets
- Windows
- ~\selenium-server.bat: Bat script to start the Selenium server.
- ~\selenium-server.jar: Selenium server.
- ~\Desktop\Webdrivers: Drivers for Chrome and Internet Explorer. Added to $PATH.
- Linux
-
Installation (see Platforms Supported)
- Browsers: Firefox, Chrome, Internet Explorer, Safari, Opera, Konqueror.
- Fonts: STIX and Mathjax fonts.
- Plugin: MathPlayer
- Selenium Servers (see directory structure)
- Webdrivers (see directory structure)
-
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 save a copy to Amazon S3, just copy the relevant files in ~/MathJax-test/web/results/public/. You need to use the Amazon S3 interface to make the new files public.
-
Terminating an Instance Warning: this will totally clear the instance and its associated volume. Be sure to save unfinished task before doing so. In particular save a copy of the test results to Amazon S3. See also "Maintenance of the Testing Machine" if you need to update the AMIs.
- Right Click on an instance and select terminate.
- Check "Release Elastic IPs", Yes Terminate