{"id":24079935,"url":"https://github.com/amrabed/docker-ec2","last_synced_at":"2025-09-11T06:34:12.663Z","repository":{"id":152512573,"uuid":"10183847","full_name":"amrabed/docker-ec2","owner":"amrabed","description":"Automatically run and test an application using Docker image running on different Amazon AWS EC2 instances","archived":false,"fork":false,"pushed_at":"2018-10-31T14:43:05.000Z","size":1719,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T14:43:07.453Z","etag":null,"topics":["amazon-aws","docker","ec2-instance","shell","vagrant"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/amrabed.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,"zenodo":null}},"created_at":"2013-05-20T23:14:07.000Z","updated_at":"2018-10-31T14:43:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"65e992a6-79dd-4efc-b747-d4cc263f1c57","html_url":"https://github.com/amrabed/docker-ec2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amrabed/docker-ec2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrabed%2Fdocker-ec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrabed%2Fdocker-ec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrabed%2Fdocker-ec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrabed%2Fdocker-ec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amrabed","download_url":"https://codeload.github.com/amrabed/docker-ec2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amrabed%2Fdocker-ec2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274589627,"owners_count":25312971,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["amazon-aws","docker","ec2-instance","shell","vagrant"],"created_at":"2025-01-09T22:39:56.526Z","updated_at":"2025-09-11T06:34:12.653Z","avatar_url":"https://github.com/amrabed.png","language":"Shell","readme":"\u003ch1\u003eDocker-EC2\u003c/h1\u003e\n\n\u003cp\u003eThis script automates the process of running and testing an application using Docker image running on different Amazon AWS EC2 instances, provided by the user\u003c/p\u003e \n\n\u003ch2\u003eQuick Start\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eDownload the files from \u003ca href=\"https://github.com/amrabed/docker-ec2.git\"\u003ehere \u003c/a\u003e \u003c/li\u003e\n\n\u003cli\u003eUpdate the fields of the Vagrantfile in the vagrant/ folder to match your own AWS credentials\u003c/li\u003e\n\n\u003cli\u003eRun the script: \u003ccode\u003e./docker-ec2 -h\u003c/code\u003e\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch2\u003eHow It Works\u003c/h2\u003e\n\u003cp\u003eThe script:\n\u003col\u003e\n\u003cli\u003e Reads needed information provided in the input file, the VagrantFile, and the command line options\u003c/li\u003e\n\u003cli\u003eConnects to the list of instance types provided\u003c/li\u003e\n\u003cli\u003eInstalls Docker on each instance\u003c/li\u003e\n\u003cli\u003eStarts the application by running the provided command on the provided Docker app image\u003c/li\u003e\n\u003cli\u003eTests the application by running the provided test command on the provided Docker test image\u003c/li\u003e\n\u003cli\u003eCopies test results back to local machine (requires SSH port enabled on test image)\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch2\u003eUsage\u003c/h2\u003e\n\u003cpre\u003e\u003ccode\u003e\nUsage: ./docker-ec2 input_file [-k] [-i instance1[:instance2[:...]]]\nor\n       ./docker-ec2 -h   (for help)\n\n  -i    - List of EC2 instance types (default: m1.small)\n  -k    - Keep instances from previous runs (default: false)\n  -h    - Print this message\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch3\u003eInput File\u003c/h3\u003e\n\u003cp\u003e\u003cb\u003ePLEASE NOTE THAT running Docker-EC2 using the sample input file may result in costs on your Amazon AWS account. Please read and modify the file as needed to match your preferences before running the script\u003c/b\u003e\u003c/p\u003e\n\u003cp\u003eThe input file 'sample.in' provides an example input file showing the format and the full list of supported specs for application and test\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eapp.image\u003c/code\u003e (required): The Docker image for the application under test\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eapp.command\u003c/code\u003e (required): The command to be run on the Docker image to start the application\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eapp.port\u003c/code\u003e : The application port (e.g. 80 for HTTP server)\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003eapp.instances\u003c/code\u003e :  The list of EC2 instance types (separated by commas ',' or colons ':' )\u003c/p\u003e\n\n\u003cp\u003e\u003ccode\u003etest.image\u003c/code\u003e :  The Docker image for the test\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003etest.command\u003c/code\u003e : The command to be run on the Docker image to start the test\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003etest.port\u003c/code\u003e : The port at which the test results are accessible (e.g. 22 for SSH/SCP)\u003c/p\u003e\n\n\u003ch3\u003eInstance Types\u003c/h3\u003e\n\u003cp\u003eInstance types can be specified either by using the input file using the \u003ccode\u003eapp.instances\u003c/code\u003e specifier, or using the \u003ccode\u003e-i\u003c/code\u003e commend line option.\u003c/p\u003e\n\u003cp\u003eIf both are specified, the command line option overrides the input file specification.\u003c/p\u003e\n\u003cp\u003eIf none is specified, a default 'm1.small' is assumed.\u003c/p\u003e\n\n\u003ch2\u003eClean Up\u003c/h2\u003e\n\u003cp\u003eBy default, each run cleans all traces of previous runs, i.e. deletes created workspace folder (including output files), and terminates any running EC2 instances\u003c/p\u003e\n\u003cp\u003eTo disable the auto-cleanup feature of the script, use the \u003ccode\u003e-k\u003c/code\u003e option. Using this option, output files created from subsequent runs may override files from previous runs (if they share the same instance types). However, running EC2 instances will be re-used.\u003c/p\u003e\n\u003cp\u003eTo manually clean traces from previous runs, and/or terminate running EC2 instances, use the \u003ccode\u003eclean\u003c/code\u003e script as follows:\n\u003cpre\u003e\u003ccode\u003e\nUsage: ./clean [-n] [all|log|output|instance]\nor\n       ./clean -h   (for help)\n\n  all   \t- Delete all generated files and folders  \n  log\t\t- Delete log files only\n  output\t- Delete output folders only\n  instance\t- Delete instance folders only (default)\n\n  -n    \t- Do NOT terminate EC2 instance(s)\n  -h\t\t- Display this message\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003ch2\u003eTo Do\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eFix problem where app/test terminates (does not run as a service)\u003c/li\u003e\n\u003cli\u003eAutomate plotting of received results\u003c/li\u003e\n\u003cli\u003eAllow test to be run on a separate instance type\u003c/li\u003e\n\u003cli\u003eHandle hashing in input file\u003c/li\u003e\n\u003cli\u003eAdd Code Documentation\u003c/li\u003e\n\u003cli\u003eUpdate this file\u003c/li\u003e\n\u003c/ul\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrabed%2Fdocker-ec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famrabed%2Fdocker-ec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famrabed%2Fdocker-ec2/lists"}