Skip to content
Browse files

Adding Vagrant support for testing jmeter-ec2 locally

  • Loading branch information
erichelgeson authored and Eric.Helgeson committed Sep 21, 2013
1 parent 99dc7c4 commit a42837b984298d8175332c5379b2546dd413ba93
Showing with 75 additions and 0 deletions.
  1. +21 −0
  2. +25 −0 Vagrantfile
  3. +29 −0
@@ -113,6 +113,27 @@ IMPORTANT - There is a limit imposed by Amazon on how many instances can be run

Where 'someproject' is the name of the project directory (and jmx file) and '1' is the number of instances you wish to spread the test over. If you have provided a list of hosts using REMOTE_HOSTS then this value is ignored and all hosts in the list will be used.

## Running locally with Vagrant
[Vagrant]( allows you to test your jmeter-ec2 scripts locally before pushing them to ec2.

### Pre-requisits
* [Vagrant](

### Usage:
Use `` as a template for local provisioning. This file is setup to use Vagrants ssh key, ports, etc.
# backup your properties files just in case
# use the vagrant properties file
# start vm and provision defaultjre
vagrant up
# run your project
project="myproject" setup="TRUE" ./

### Note
* You may need to edit the `Vagrantfile` to meet any specific networking needs. See Vagrant's [networking documentation]( for details

## Notes:
### Your PEM File
@@ -0,0 +1,25 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config| = "quantal64"
config.vm.box_url = ""

# Forward jmeter's command port for shutdown. :forwarded_port, guest: 4445, host: 4445

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# :private_network, ip: ""

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# :public_network

# requires java installed when using REMTOE_HOSTS
config.vm.provision :shell do |shell|
shell.inline = "sudo apt-get update"
shell.inline = "sudo apt-get -y install default-jre"
@@ -0,0 +1,29 @@
# This is a java stye properties file for the jmeter-ec2 shell script
# It is treated like a normal shell script and must have executable permissions
# See README.txt for more details about each property
LOCAL_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # The root for this script - all files should be put here as per the README
REMOTE_HOME="/tmp" # This can be left as /tmp - it is a temporary working location
PEM_FILE="insecure_private_key" # The full name of the pem file you downloaded from your Amazon account. Usualy .pem from AWS but you could generate your own and name it what you want.
PEM_PATH="$HOME/.vagrant.d" # The path to your pem file
USER="vagrant" # Should match the AMI
REMOTE_PORT="2222" # The port number sshd is running on,
JMETER_VERSION="apache-jmeter-2.7" # The version of JMeter to be used. Must be the full name used in the dir structure. Does not work for versions prior to 2.5.1.
JAVA_VERSION_32='jre-6u32-linux-i586.bin' # Specify the JAVA binary you will be using in the case of 32Bit.
JAVA_VERSION_64='jre-6u32-linux-x64.bin' # Specify the JAVA binary you will be using in the case of 64Bit.


# If specified, then the script will import the results to the mysql database given here

0 comments on commit a42837b

Please sign in to comment.