codeIvy / fuzzy-octo-waffle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

!!IMPORTANT!! : using this script will incur money loss accoring to the time your spot instances will be running at the end of the month. Make sure that you are using throwaway card with no funds on it.
MAKE SURE YOU UNDERSTAND THIS, DO NOT USE CARDS WITH MONEY ON THEM IF YOU ARE NOT READY TO LOSE THEM

!!IMPORTANT!!: this repo is purely for educational purposes only. In some jurisdictions use of this script could be illegal.
Make sure that you understand this.

NOTE: for users on Mac edit ebash.sh script and change `base 64 -w` to `base64`
How it works (so far):
- run ebash.sh script with up to 3 targets domain names/IPs (it was tested with 3 targets, you can use more)
- it creates AWS EC2 Spot requests for 4(four) t3.medium servers with base Ubuntu 20 AMI (depends on the region) in Stockholm region eu-north-1a (it depends on the region you register your aws-cli tool), with price of 0.04 USD and termination protection disabled
- servers will automatically install docker.io and should start stress-testing targets for 1 hour
- in 3900 seconds servers will self-terminate
- instructions are encoded in base64 and sent to EC2 instances with UserData
- aws-cli pages whole info about successfull request to terminal, just press 'q' to close it


I assume you have basic understanding about running docker containers and using terminal and 
general IT-expertise if you are reading this. Some parts are vague on exact steps, I simply don't have time to 
explain everything in details.

This is manual to ghetto-loic implementation using the bombardier stress-test tool.
More info about tool here https://pkg.go.dev/github.com/codesenberg/bombardier?utm_source=godoc 
Ghetto-loic uses  'alpine/bombarideri' docker image to "stress-test" targets.


What you need to run this:
- AWS account
- key pair to connect over SSH (optional)
- AWS security group to connect to instance over SSH (optional), you can do that in AWS -> EC2 -> Networking
(make sure that you are allowing SSH port 22 inbound connections)
- installed aws-cli v2, jq
- run `aws configure` and supply details, you can get them in your AWS account IAM tab during user creation, google how to do it.
- make sure to `chmod +x ebash.sh` file to be able to run it
- find AMI ID for Ubuntu 20 in your AWS region
- ./ebash.sh target


In case of any questions review ebash.sh, specification and spec files. You can view payload file to see what exactly your 
instances will be doing.

About


Languages

Language:Roff 58.1%Language:Shell 41.9%