{"id":22477524,"url":"https://github.com/tech-pw/open-load-fury","last_synced_at":"2025-07-27T12:37:57.525Z","repository":{"id":264993185,"uuid":"809634513","full_name":"tech-pw/open-load-fury","owner":"tech-pw","description":"jMeter based automated large scale load test setup. Run your load tests with just JMX file and few commands. ","archived":false,"fork":false,"pushed_at":"2024-06-07T07:27:44.000Z","size":30667,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-26T01:11:35.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tech-pw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-03T06:45:24.000Z","updated_at":"2025-05-11T06:11:00.000Z","dependencies_parsed_at":"2024-11-27T14:18:18.984Z","dependency_job_id":null,"html_url":"https://github.com/tech-pw/open-load-fury","commit_stats":null,"previous_names":["tech-pw/open-load-fury"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tech-pw/open-load-fury","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2Fopen-load-fury","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2Fopen-load-fury/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2Fopen-load-fury/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2Fopen-load-fury/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tech-pw","download_url":"https://codeload.github.com/tech-pw/open-load-fury/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tech-pw%2Fopen-load-fury/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262188396,"owners_count":23272341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T14:11:27.048Z","updated_at":"2025-06-27T04:33:04.949Z","avatar_url":"https://github.com/tech-pw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Open Load Fury - Distributed load testing made easy with \u003cimg src=\"./images/pw.jpg\" alt=\"drawing\" width=\"30\"/\u003e\n\n\nOpen Load fury help in execution of a distributed load testing environment using Apache JMeter on Amazon EC2 instances. The goal is to enable users to perform comprehensive load tests on their applications, simulating real-world scenarios by distributing the load across different geographic regions and availability zones. The entire setup is user-friendly, requiring interaction only through a YAML configuration file.\n\n## Load Test Features\n\n**Action**                          | **Description**                                                                                   | **Supported**                                       \n----------------------------------- | ----------------------------------------------------------------------------------------------- | -------------------------------------------------\nLaunch EC2 instances                | Launches EC2 instances in different regions and availability zones based on [user inputs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/run_instances.html) | Yes\nInstall Apache JMeter               | Optionally installs specific versions of JMeter on Debian and RedHat-based OS | Yes\nInstall JMeter plugins              | Optionally downloads plugins and places them in the *jmeter-plugins* directory | Yes\nJmeter Heap                            | Allows you to update Jmeter heap settings | Yes\nDownload individual reports and Merge individual reports         | Collects individual reports from remote machines  and Merges individual reports and creates a combined CSV report| Yes\nCreate final HTML report            | Generates a final HTML report using the CSV report | Yes\nUpload final HTML report to S3 bucket | Uploads the final HTML report to an S3 bucket | Yes\n\n\n## How to read code\n\n```\n├── jmeter            # Load test configuration files, such as plan.jmx\n├── jmeter_plugins    # Additional JMeter plugins\n├── loadtest-role     # Ansible role for configuring services and running the load test\n├── scripts           # Python scripts\n│   ├── data_file.py  # For splitting data files\n│   ├── ec2.py        # For launching EC2 instances, checking instance status, and terminating instances\n│   ├── get_data.py   # For reading the YAML file\n│   ├── loadtest.py   # For merging load test reports and distributing EC2 instances\n│   ├── logger.py     # For logging\n│   ├── s3.py         # For sending reports to an S3 bucket\n│   ├── scm.py        # For creating inventory files and running Ansible\n│   └── validations.py # For validation functions\n├── ssh_keys          # SSH private PEM key\n```\n\n\n\n## Prerequisites\n  - **AWS Account:** You need an active AWS account to utilize AWS services.\n  - **Python Environment:** Ensure Python is installed on your local machine or server. Download Python from the official Python website and follow the installation instructions for your operating system.\n  - **AWS CLI:** Install the AWS Command Line Interface (CLI) tool to interact with AWS services from the command line. Refer to the AWS CLI documentation for installation instructions.\n  - **AWS IAM Credentials:** Obtain AWS Identity and Access Management (IAM) credentials with appropriate permissions to launch, describe, and terminate EC2 instances and put object to S3 bucket if you want to upload final report to S3.\n  - **Additional Libraries:** Install additional libraries using pip. Run `pip3 install -r requirements.txt` in your terminal or command prompt.\n\n## Requirements\n\n| Name       | Version |\n|------------|---------|\n| AWS        | \u003e= 2.0  |\n| Python     | \u003e= 3.0  |\n\n## Providers\n\n| Name       | Version |\n|------------|---------|\n| AWS        | \u003e= 2.0  |\n\n\n## Configuration Parameters\n\n### instances\n| Name | Description | Type | Required |\n|------|-------------|------|:--------:|\n| `region` | AWS region where the EC2 instances will be launched | string | Yes |\n| `spec` | EC2 instance specifications for more specs for the [boto3 run_instances](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/run_instances.html) | dict | Yes |\n| `spec.ImageId` | ID of the AMI to use for the instance | string | Yes |\n| `spec.InstanceType` | Type of the EC2 instance | string | Yes |\n| `spec.KeyName` | Name of the key pair | string | Yes |\n| `spec.SecurityGroupIds` | List of security group IDs | list | Yes |\n| `spec.SubnetId` | ID of the subnet | string | Yes |\n| `spec.TagSpecifications` | Tags to apply to the instances | list | No |\n| `spec.TagSpecifications.ResourceType` | Type of the resource to tag | string | No |\n| `spec.TagSpecifications.Tags` | List of tags | list | No |\n| `spec.TagSpecifications.Tags.Key` | Tag key | string | No |\n| `spec.TagSpecifications.Tags.Value` | Tag value | string | No |\n\n### loadtest\n| Name | Description | Type | Required |\n|------|-------------|------|:--------:|\n| `name` | Name for the load test, used for uploading the final report to S3 | string | No |\n| `instance_count` | Number of EC2 instances to use for the load test | int | Yes |\n| `jmeter_local_data_dir` | Local directory for JMeter data | string | No |\n| `tool` | Tool to use for the load test (e.g., JMeter) | string | No |\n| `install` | Flag to indicate whether to install the tool | bool | No |\n| `jmeter_version` | Version of JMeter to use | string | No |\n| `jmeter_local_config_dir` | Local directory for JMeter configuration | string | No |\n| `jmeter_remote_config_dir` | Remote directory for JMeter configuration | string | No |\n| `jmeter_output_file` | Output file for JMeter results | string | No |\n| `output_report_dir` | Directory to store the load test results | string | No |\n| `jmeter_plan_file` | JMeter test plan file | string | No |\n\n### remote_execution\n| Name | Description | Type | Required |\n|------|-------------|------|:--------:|\n| `ssh_key_dir` | Directory for SSH keys | string | Yes |\n| `ssh_user` | SSH user to connect to the instances | string | Yes |\n| `parallel_tasks_limit` | Limit for parallel tasks execution | int | No |\n| `playbook_file` | Ansible playbook file | string | No |\n\n### log_file_path\n| Name | Description | Type | Required |\n|------|-------------|------|:--------:|\n| `log_file_path` | Path to the log file | string | No |\n\n## Implementation Steps\n\n1. **Provision EC2 Instances**:\n    - **Python Scripts**: Utilize Python scripts to provision EC2 instances across various regions and availability zones based on the YAML configuration file.\n    - **Instance Configuration**: Define instance types, security groups, and other configurations required for the test environment in the YAML file.\n\n### Example YAML Configuration for provisioning EC2 instances\n\n```yaml\n\ninstances:\n  - region: ap-south-1\n    spec:\n      ImageId: ami-1234567890\n      InstanceType: t3.xlarge\n      KeyName: key-name\n      SecurityGroupIds:\n        - sg-1234567890\n      SubnetId: subnet-1234567890\n      TagSpecifications:\n        - ResourceType: instance\n          Tags:\n            - Key: Name\n              Value: Loadtest\n\n  - region: ap-south-2\n    spec:\n      ImageId: ami-0987654321\n      InstanceType: t3.xlarge\n      KeyName: key-name\n      SecurityGroupIds:\n        - sg-0987654321\n      SubnetId: subnet-0987654321\n      TagSpecifications:\n        - ResourceType: instance\n          Tags:\n            - Key: Name\n              Value: Loadtest\n```\n2. **Configure Services with Ansible**:\n    - **Instance Checks**: Use Ansible to verify that all EC2 instances are running and ready for SSH access.\n    - **Install JMeter**: Use Ansible roles to install JMeter on all EC2 instances, including necessary plugins, as specified in the YAML file.\n    - **File Distribution**: Copy the JMeter test plan and data files to each EC2 instance as defined in the YAML file.\n    - **Heap Dump Memory Update**: Update the heap dump memory settings on each machine to optimize performance for load testing.\n\n### Remote execution configuration\n```yaml\nremote_execution:\n  ssh_key_dir: location to your ssh keys\n  ssh_user: 'ubuntu'\n  parallel_tasks_limit: 10\n  playbook_file: playbook.yaml\n\n```\n\n3. **Automate Load Test Execution**:\n    - **Ansible Playbooks**: Use Ansible playbooks to start the JMeter load test on all EC2 instances.\n    - **Scripted Execution**: Execute the JMeter tests, collect individual CSV reports from each instance, and generate a final aggregated CSV report.\n\n4. **Post-Test Actions**:\n    - **Result Collection**: Use Ansible playbooks to copy all load test CSV reports from the EC2 instances to the host machine.\n    - **Report Generation**: Compile the results into a final comprehensive load test report using the aggregated CSV data.\n    - **Instance Termination**: Terminate all EC2 instances that were provisioned for performing the load test to optimize costs.\n\n### Load test configuration\n```yaml\nloadtest:\n  name: demo\n  instance_count: 1\n  jmeter_local_data_dir: data/\n  tool: jmeter\n  install: true\n  jmeter_version: 5.6.3\n  jmeter_local_config_dir: jmeter\n  jmeter_remote_config_dir: jmeter/\n  jmeter_output_file: result.csv\n  output_report_dir: loadtest_result\n  jmeter_plan_file: plan.jmx\n\n```\n\n## Usage\n\n### Running Locally with Python\nEnsure you have Python and the required dependencies installed:\n\n```\npip install -r requirements.txt\n```\n\nFor running load test\n\n```\npython3 main.py -f your_config_file.yaml\n```\n\n# Contributing\n\nWhen contributing to this repository, please first discuss the change you wish to make via issue, or any other method with the owners of this repository before making a change.\n\nPlease note we have a code of conduct, please follow it in all your interactions with the project.\n\n## Pull Request Process\n\n1. Ensure any install or build dependencies are removed before the end of the layer when doing a\n   build.\n2. Update the README.md with details of changes to the interface, this includes new environment\n   variables, exposed ports, useful file locations and container parameters.\n3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you\n   do not have permission to do that, you may request the second reviewer to merge it for you.\n\n\n# Code of Conduct\n\n### Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\nnationality, personal appearance, race, religion, or sexual identity and\norientation.\n\n### Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\nadvances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n### Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Authors and acknowledgment\nShow your appreciation to those who have contributed to the project.\n\n## License\nFor open source projects, say how it is licensed.\n\n## Project status\nIf you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-pw%2Fopen-load-fury","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftech-pw%2Fopen-load-fury","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftech-pw%2Fopen-load-fury/lists"}