https://github.com/qainsights/terraform-aws-jmeter
π±βπThis repository spins up an EC2 instance w/ Java, JMeter, and JMeter Plugins installed.
https://github.com/qainsights/terraform-aws-jmeter
apache aws ec2 ec2-instance jmeter performance-testing terraform
Last synced: 9 months ago
JSON representation
π±βπThis repository spins up an EC2 instance w/ Java, JMeter, and JMeter Plugins installed.
- Host: GitHub
- URL: https://github.com/qainsights/terraform-aws-jmeter
- Owner: QAInsights
- Created: 2022-01-21T19:50:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-13T02:59:26.000Z (over 4 years ago)
- Last Synced: 2025-03-31T00:24:03.276Z (over 1 year ago)
- Topics: apache, aws, ec2, ec2-instance, jmeter, performance-testing, terraform
- Language: HCL
- Homepage: https://registry.terraform.io/modules/QAInsights/jmeter/aws/latest
- Size: 37.1 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JMeter Terraform
This repo will help you to spin up an AWS EC2 instance with Java, JMeter, and JMeter Plugins installed.
## Prerequisites
* Terraform
* AWS Console w/ IAM role
## Setup
### AWS Key Pair
* Log into AWS console
* Navigate to EC2 -> Key Pairs
* Create a new key pair w/ RSA and Private Key format (PEM)
* Save the private key to a file in a secure location
## Usage
```
module "jmeter" {
source = "QAInsights/jmeter/aws"
version = "1.1.6"
# insert the 6 required variables here
aws_ami = "ami-001089eb624938d9f"
aws_instance_type = "t2.small"
aws_key_name = "terraform"
jmeter_version = "5.4.3"
availability_zone = "us-east-2a"
jmeter_plugins = ["jpgc-casutg"]
}
```
By default, it will spin up an `t2.micro` instance with `us-east-2` availability zone. Refer to the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-types.html) for more information.
To configure other input variables, refer to the [documentation](https://registry.terraform.io/modules/QAInsights/jmeter/aws/latest?tab=inputs#optional-inputs).
To configure [outputs](outputs.tf), refer to the [documentation](https://registry.terraform.io/modules/QAInsights/jmeter/aws/latest?tab=outputs).
## Terraform Plan and Apply
* Run `terraform init`
* Run `terraform plan`
* Run `terraform apply` when prompted to continue, enter `yes` to spin up the instance
## JMeter validation
ssh into the instance using the PEM and run `jmeter -v` to verify JMeter is installed and working.
## Reference
* https://www.terraform.io/
* https://aws.amazon.com/
* https://jmeter.apache.org/