{"id":19351836,"url":"https://github.com/thunder/thunder-performance-task-manager","last_synced_at":"2025-08-20T15:33:33.816Z","repository":{"id":44010190,"uuid":"226125258","full_name":"thunder/thunder-performance-task-manager","owner":"thunder","description":"The Thunder performance task manager","archived":false,"fork":false,"pushed_at":"2023-01-05T05:29:19.000Z","size":452,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-06T16:14:20.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thunder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-05T14:51:07.000Z","updated_at":"2020-11-17T11:58:56.000Z","dependencies_parsed_at":"2023-02-03T13:30:54.668Z","dependency_job_id":null,"html_url":"https://github.com/thunder/thunder-performance-task-manager","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/thunder%2Fthunder-performance-task-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunder%2Fthunder-performance-task-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunder%2Fthunder-performance-task-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunder%2Fthunder-performance-task-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunder","download_url":"https://codeload.github.com/thunder/thunder-performance-task-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240465106,"owners_count":19805843,"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-11-10T04:37:25.365Z","updated_at":"2025-02-24T10:41:39.529Z","avatar_url":"https://github.com/thunder.png","language":"JavaScript","readme":"# Thunder Performance Task Manager\n\n## Services\n\nTask manager has two services.\n\n- API endpoint service\n- Worker\n\n**The API endpoint service**\n\nIt has purpose to listen on request for running jobs and it will queue tasks in Redis. It's listens by default on port `3000`. It's also protected with Bearer token authentication.\n\n**Worker**\n\nThe worker service is there to handle queue tasks in Redis. It will handle them in sequential order.\n\nWorker can handle two types of tasks:\n\n- Warmup\n- Run\n\nWarmup task will run warmer to create warmed up container images for Thunder application and database. After warmer has created warmed up docker images, it will also queue run task to run performance tests with newly created images.\n\nRun task will use warmed up container images and run tests on them. After finished runner task, runner will queue next run task for executed performance tests. That means it will run performance test in infinite time.\n\n## How to queue warmup task\n\nTo queue new warmup task you have to send POST request to `/warmers` endpoint with required JSON object for warmer task. JSON Object looks like this:\n\n```\n{\n\t\"branchTag\": \"\u003cbranch to test\u003e\",\n\t\"imageTag\": \"\u003cimage tag for burda/thunder-performance docker image\u003e\",\n\t\"composeType\": \"default\"\n}\n```\n\nHere is an example with CURL command:\n\n```\ncurl -X POST -k https://localhost:3000/warmers -H 'Authorization: Bearer 123456' -H 'Content-Type: application/json' -d '{\"branchTag\": \"local-test\", \"imageTag\": \"local-test\", \"composeType\": \"default\"}'\n```\n\n## How to setup Thunder performance task manager server\n\n**NOTE: This workflow is created on Ubuntu 18.04**\n\nExecute following commands:\n\n```\n# Create Thunder PTM user\nadduser --disabled-password --gecos \"Thunder PTM\" thunder-ptm\nusermod -aG sudo thunder-ptm\necho \"thunder-ptm ALL=(ALL:ALL) NOPASSWD: ALL\" | tee -a /etc/sudoers\n\n# Create required groups and add thunder-ptm to these groups\nsudo groupadd docker\nusermod -aG docker thunder-ptm\n\nsudo usermod -aG systemd-journal thunder-ptm\n\n# Get Git\napt install --yes git\n\n# Checkout repository\nsu - thunder-ptm --command=\"git clone https://github.com/thunder/thunder-performance-task-manager.git /home/thunder-ptm/thunder-performance-task-manager\"\n```\n\nSet correct `ELASTIC_APM_URL` environment variable in file: `/home/thunder-ptm/worker-service.env`. You can use modified command bellow:\n\n```\nsu - thunder-ptm --command=\"echo ELASTIC_APM_URL=http://localhost:8200 \u003e /home/thunder-ptm/worker-service.env\"\n```\n\nAfter that, you can execute init script with following command:\n\n```\nsu - thunder-ptm --command=\"cd /home/thunder-ptm/thunder-performance-task-manager \u0026\u0026 bash scripts/server-init.sh\"\n```\n\n## Deploying new code\n\nAfter you deploy new code, you have to restart services and update crontab definitions. You can do that will following command:\n\n```\nbash \"${HOME}/thunder-performance-task-manager/scripts/deploy.sh\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunder%2Fthunder-performance-task-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunder%2Fthunder-performance-task-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunder%2Fthunder-performance-task-manager/lists"}