JMeter in the Cloud

Get Loaded!

Content
Content ............................................................................................................... 2 Changes ............................................................................................................. 3 This Document.................................................................................................... 3 Intended Audience .............................................................................................. 3 Prerequisites ....................................................................................................... 3 The Solution........................................................................................................ 4 Architectural Overview ........................................................................................ 5 Benefits ............................................................................................................... 6 Costs .................................................................................................................. 7 Tutorial: Putting your test in the cloud................................................................. 7 Support ............................................................................................................. 14 Conclusion ........................................................................................................ 15

2

Changes
15/06/2010 Disclaimer 11/27/2009 Added link to current AMI 11/18/2009 Added ssh hint 10/23/2009 Initial version

This Document
This document describes an Open Source based load test approach that uses cloud computing facilities offered by amazon web services (see http://aws.amazon.com/ ) and Apache JMeter (see http://jakarta.apache.org/jmeter/ ).

Disclaimer
The test approach described in this document uses Apache JMeter. It is not related in any way to JMeter. Please do _not_ address questions concerning this approach to the jmeter users list. Please address any questions directly to j.kalsbach@jk-itberatung.de.

Intended Audience
The intended audience for this document consists of Test Managers, people responsible for test infrastructure and tool selection, System Administrators and people responsible for the development and execution of load tests.

Prerequisites
To understand the concepts and benefits of JMeter In The Cloud load test

3

approach you will need the following: • Common sense To use JMeter In The Cloud load test approach you will need the following: • Amazon Web Services account • Basic knowledge of Amazon Web Services, especially ec2 • Basic knowledge of JMeter

The Solution
The solution is built upon the open source load test framework Apache JMeter (see http://jakarta.apache.org/jmeter/ ). The JMeter is – next to The Grinder – one of the most popular open source load tools. As most serious load tools JMeter implements an Agent/Controller Architecture. Within the JMeter framework the Controller is called “Master”. The master coordinates several agent (aka “slave”) machines. Each slave machine controls several worker threads. In order to generate load master and slave processes run on different machines in the network. The number of slave machines – and thereby the number of machines necessary to run the tests – increases with the amount of load specified for the tests. Master and slave machines are implemented as Amazon Machine Images (cf. http://aws.amazon.com/ec2/#os ). A Starter Kit has been added that implements the transparent start up of as many slaves as necessary. According to JMeter logic the Starter Kit first starts up the slave machines. Once they are operational it writes a proper jmeter.config by adding them as remote hosts. Then it starts up the master (i.e. JMeter proper). From here on you can work as described in http://jakarta.apache.org/jmeter/usermanual/jmeter_distributed_testing_step_by

4

_step.pdf . Please note: the Starter Kit only manages the start up of the slave machines and the jmeter properties file. The jmeter distribution is not affected by the Starter Kit.

Architectural Overview
The overall Architecture of the JMeter In The Cloud solution is shown below.

The tester talks from his machine to an instance of the Starter Kit amazon machine image (AMI) containing all the necessary software (Starter Kit, JMeter). The Starter Kit machine is accessed using a linux based remote desktop application (NX client, available for unix and windows). For more

5

information on the NX remote desktop application, please see: http://www.nomachine.com/download.php . The Starter Kit instance starts up as many slaves as requested. The slaves are implemented as AMIs and live in the cloud. Once the slaves are operational the Starter Kit starts the jmeter master. From here on the tests can be executed as described in the standard jmeter documentation. If required the slaves can be accessed using commonly available secure shell (ssh) tools. The slaves inject the load into the system under test (SuT). In case you need to access your slaves, connect to the instance with something like “ssh –i itbjk.ppk root@yourslave”. You’ll find itbjk.ppk in ~/ on the master machine. Important: the instances run on real hardware. Each instance consists of a real machine!

Benefits
This test approach has several benefits for you. To name but a few:

• Endless firepower at your fingertips • Endless firepower at will • Virtually no hardware required on your side • No license fees • Up and running in minutes • Pay for real usage and not for future use

6

Costs
The architecture comes at a very competitive price: Master: 0,085 USD/h Each slave: 0,085 USD/h That’s it!

Tutorial: Putting your test in the cloud
Seeing is believing! To give you a better idea a few screenshots demonstrate the ease of use. Putting a load test in the cloud requires the following steps: Sign in at amazon.

7

Create a security group named “All Incoming”. The security group needs to open tcp ports 22, 80, 1099 and udp port 161. Use your favourite EC2 Client (e.g. Elasticfox http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609 ) to launch an instance of the jmeter-master AMI. You can always find the current AMI at http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2924 or by filtering the available AMIs by itbjk.

8

Note: your security group needs to open ports 22, 80, 1099 for tcp and 161 for

9

udp. Note: this linux AMI takes approx. 2’ to boot. Work is ongoing to cut boot time. Once your master instance is up and running copy the public DNS name and connect to the instance. Connect to instance using the free NX Client (http://www.nomachine.com/download.php ). Configure a session with your master’s public DNS name as host, a desktop of your choice.

10

Connect with the user jmeter and the password jmeter.

The first time you connect the usual ssh message appears. Make up your mind and say yes.

Start the “JMeter In The Cloud” application you find on the desktop.

11

The application runs the Starter Kit. Enter the number of slaves you want to use and your AWS credentials.

12

The Starter Kit starts up the slaves. After they are up and running it inserts the remote hosts in jmeter properties. It then starts the original apache jmeter using the original jmeter start scripts. You are running an original jmeter installation that has not been tampered with. Operate your distributed tests as usual and as described by Apache (see http://jakarta.apache.org/jmeter/usermanual/jmeter_distributed_testing_step_by _step.pdf for details).

13

After closing the jmeter application the starter kit shuts down the slaves. Important: if the Starter Kit application that wraps jmeter terminates abnormally and you do not see the shut down message you’ll have to manually shut down the slaves. Otherwise they will not be terminated.

Enjoy! Destroy!

Support
In case you need further support, have questions, have comments, have feature requests (reporting, monitoring, custom samplers, security), want to donate lots of money, want to submit bug reports, etc. contact j.kalsbach@jk-itberatung.de

14

In case you are interested in load test related consulting, consulting on test processes, test specification, scripting, outsourcing of parts of the test process or of the whole process please contact IT Beratung Jörg Kalsbach: j.kalsbach@jk-itberatung.de.

Conclusion
JMeter in the Cloud leverages the well known JMeter load test framework by putting it in the cloud. It offers an easy to use load test framework with virtually unlimited firepower at a competitive price. Get loaded!

15

Sign up to vote on this title
UsefulNot useful