{"id":18387460,"url":"https://github.com/j5ik2o/aws-gatling-tools","last_synced_at":"2025-04-07T00:34:15.542Z","repository":{"id":37797346,"uuid":"248946239","full_name":"j5ik2o/aws-gatling-tools","owner":"j5ik2o","description":"the aws stress-test tool used by gatling","archived":false,"fork":false,"pushed_at":"2024-09-09T16:41:45.000Z","size":636,"stargazers_count":26,"open_issues_count":15,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-10T13:29:20.910Z","etag":null,"topics":["aws","gatling","load-test","scala","stress-test"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j5ik2o.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-21T09:43:01.000Z","updated_at":"2023-12-15T08:27:45.000Z","dependencies_parsed_at":"2024-02-16T23:23:18.179Z","dependency_job_id":"2cac8f7d-6c90-4c09-b75f-4c57e234d4cd","html_url":"https://github.com/j5ik2o/aws-gatling-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Faws-gatling-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Faws-gatling-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Faws-gatling-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Faws-gatling-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j5ik2o","download_url":"https://codeload.github.com/j5ik2o/aws-gatling-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223268610,"owners_count":17116841,"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":["aws","gatling","load-test","scala","stress-test"],"created_at":"2024-11-06T01:26:11.988Z","updated_at":"2024-11-06T01:26:12.578Z","avatar_url":"https://github.com/j5ik2o.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-gatling-tools\n\n`aws-gatling-tools` is an AWS stress testing tool used by [gatling](https://gatling.io/) to perform stress tests using processes on Fargate, output reports to S3, and notify chats of the URL of the report.\n\n\u003cimg src=\"https://raw.githubusercontent.com/j5ik2o/aws-gatling-tools/master/doc/system-layout.png\"/\u003e\n\n\n## project structure\n\n- terraform\n    - The terraform scripts for deploying a stress-test environment on AWS.\n- gatling-aggregate-runner\n    - The application to manage stress testing.\n- gatling-runner\n    - The application that performs stress tests.\n- gatling-s3-reporter(not sbt project)\n    - The application that aggregates logs and outputs a report to S3.\n- api-server(for test)\n    - The server application for testing.\n\n## preparation\n\n- installing tool\n    ```sh\n    $ brew install sbt awscli jq terraform\n    ```\n- installing Docker for Mac\n- register an IAM user in AWS account\n- add a profile for the IAM user as `aws-gatling-tools` to `~/.aws/credentails`.\n    ```sh\n    [aws-gatling-tools]\n    aws_access_key_id = XXXXX\n    aws_secret_access_key = XXXXX\n    region = ap-northeast-1 \n    ```\n\n## build the AWS environment\n\n```sh\n$ cd terraform\nterraform $ cp terraform.tfvars.default terraform.tfvars\nterrafrom $ vi terrafrom.tfvars # edit\nterraform $ terraform init\nterraform $ terraform plan\nterraform $ terraform apply\n```\n\nIf you don't need the test application(api-server), please comment out the following part of `terraform/main.tf`.\n\n```terraform\n# module \"ecr_api_server\" {\n#   source   = \"./api-server\"\n#   prefix   = var.prefix\n#   owner    = var.owner\n#   vpc_id = module.vpc.vpc_id\n#   subnet_ids = module.vpc.public_subnets\n#   aws_subnet_public = var.aws_subnet_public\n#   api_server_ecs_cluster_name = var.api_server_ecs_cluster_name\n#   api_server_ecr_name = var.api_server_ecr_name\n#   aws_account_id = var.account_id\n# }\n```\n\n\n## build the test application(if necessary)\n\nThis is just to check the operation.It is not necessary if you use your own test application. \n\n```sh\n# api-server docker build \u0026 push\n$ AWS_DEFAULT_PROFILE=aws-gatling-tools sbt api-server/ecr:push\n```\n\n## build the stress-test tools\n\n```sh\n# gatling-runner docker build \u0026 push\n$ AWS_DEFAULT_PROFILE=aws-gatling-tools sbt gatling-runner/ecr:push\n\n# gatling-s3-reporter docker build \u0026 push\n$ cd gatling-s3-reporter \u0026\u0026 make release \u0026\u0026 cd ..\n\n# gatling-aggregate-runner build \u0026 push\n$ AWS_DEFAULT_PROFILE=aws-gatling-tools sbt gatling-aggregate-runner/ecr:push\n```\n\n## run a stress-test\n\n```sh\n$ cp run-stress-test.sh.default run-stress-test.sh\n$ vi run-stress-test.sh # edit stress-test conditions\n$ sh ./run-stress-test.sh\n```\n\n1. `Aggregate Runner` starts on the ECS cluster.\n1. `Aggregate Runner` starts the specified number of `Runners`, notifies to chat.\n1. Wait for all `Runners` until finish.\n1. After all runners have finished, launch the `S3 Reporter`, `Aggregate Runner` notifies to chat\n1. `Aggregate Runner` notifies the url to gatling report on S3.\n\nAll control is performed by `Aggregate Runner`, so the terminal can be closed after execute the command.\n\n### chat log example\n\n```\nGatling Runner started:\ntask arns = [\nhttps://ap-northeast-1.console.aws.amazon.com/ecs/home?region=ap-northeast-1#/clusters/j5ik2o-aws-gatling-tools-ecs/tasks/xxxxxxxxxx/details\n...\nhttps://ap-northeast-1.console.aws.amazon.com/ecs/home?region=ap-northeast-1#/clusters/j5ik2o-aws-gatling-tools-ecs/tasks/xxxxxxxxxx/details\n]\nrunTaskCount = 10, runTaskEnvironments = Map(GATLING_S3_BUCKET_NAME -\u003e j5ik2o-aws-gatling-tools-logs, GATLING_PAUSE_DURATION -\u003e 3s, GATLING_TARGET_ENDPOINT_BASE_URL -\u003e http://tf-xxxxxxxxxx-xxxxxxxx.ap-northeast-1.elb.amazonaws.com, GATLING_EXECUTION_ID -\u003e api-server/xxxxxxxx-xxxxxxxxx, GATLING_SIMULATION_CLASS -\u003e com.github.j5ik2o.gatling.BasicSimulation, GATLING_RAMP_DURATION -\u003e 200s, GATLING_RESULT_DIR -\u003e target/gatling, GATLING_HOLD_DURATION -\u003e 5m, GATLING_USERS -\u003e 10, AWS_REGION -\u003e ap-northeast-1)\nGatling Runner finished: task arns = [\nhttps://ap-northeast-1.console.aws.amazon.com/ecs/home?region=ap-northeast-1#/clusters/j5ik2o-aws-gatling-tools-ecs/tasks/xxxxxxxxxx/details\n...\nhttps://ap-northeast-1.console.aws.amazon.com/ecs/home?region=ap-northeast-1#/clusters/j5ik2o-aws-gatling-tools-ecs/tasks/xxxxxxxxxx/details\n]\nGatling Reporter started: task arns = https://ap-northeast-1.console.aws.amazon.com/ecs/home?region=ap-northeast-1#/clusters/j5ik2o-aws-gatling-tools-ecs/tasks/xxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxxxx/details\nrunTaskReporterEnvironments = Map(AWS_REGION -\u003e ap-northeast-1, GATLING_BUCKET_NAME -\u003e j5ik2o-aws-gatling-tools-logs, GATLING_RESULT_DIR_PATH -\u003e api-server/xxxxxxxxxxx-xxxxxxxxxxxx)\nGatling Reporter finished: report url: https://j5ik2o-aws-gatling-tools-logs.s3.amazonaws.com/api-server/xxxxxxxxx-xxxxxxxxxxx/index.html\n```\n\n### gatling report example\n\n\u003cimg src=\"https://raw.githubusercontent.com/j5ik2o/aws-gatling-tools/master/doc/gatling-report.png\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Faws-gatling-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj5ik2o%2Faws-gatling-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Faws-gatling-tools/lists"}