'Trying to build end to end jmeter AWS instance testing architecture
I am trying to build on demand AWS jmeter(can be any testing tool like SOAP UI, Selenium ) instance to using Jenkins. Not looking for Server client Jmeter distribution architecture.
This is to provide cost effective solution to the spawn on demand jmeter(Not containerization )instance using Jenkins. New instance need JNLP or jenkins agent to establish connectivity with Jenkins Master.
Can some one provide me any documentation and codes(CLI) to spin up aws instance with or without AMI ?
Solution 1:[1]
You can use AWS CLI to manage instances (create, launch, shut down, terminate, etc.)
Example command would be:
aws ec2 run-instances --image-id your_image_id --count how_many_instances_you_want --instance-type desired_EC2_instance_type --key-name your_key_pair --security-groups your_EC2_security_group_name
Make sure that the security group allows the following ports:
- the port you define as
server_port, by default1099 - the port you define as
server.rmi.localport - the port(s) you define as
client.rmi.localport
More information:
Solution 2:[2]
Am not sure if your are looking for this kind of setup.
- Use terraform, infra as code. You will be able to spawn all the resources that are required for your test. The steps will follow like this,
- Create a jmeter Docker image
- Push it to ECR
- Create a Cluster in ECS
- Create a Task definition
- Create a service in ECS cluster where it uses the Jmeter image and you can use fargate serverless.
On all the above you can use Jenkins CI/CD where you can trigger you terraform code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dmitri T |
| Solution 2 | Akilan Govindasamy |
