A utility for arming (creating) many minnows (digital ocean instances) to attack (load test) targets (web applications). Based on Bees with Machine Guns
- Python 2.6
- dop
- paramiko
Preferred:
pip install minnowswithmachineguns
or, if you must:
easy_install minnowswithmachineguns
git clone git://github.com/newsapps/minnowswithmachineguns.git cd minnowswithmachineguns mkvirtualenv --no-site-packages minnows easy_install pip pip install -r requirements.txt
You’ll need to setup a keypair for access. A tutorial on how to do so is here in steps 1 and 2.
https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys—2
Then you’ll need to copy your public key into the digital ocean control panel. Login to the control panel, then click “SSH Keys”, then click “Add SSH Key” and copy your public key.
By default, minnows with machine guns with create new instances with a copy of each public key that you have registered through the control panel.
A typical bees session looks something like this:
minnows up -s 4 -c <YOUR CLIENT KEY> -a <YOUR API KEY> minnows attack -n 10000 -c 250 -u http://www.ournewwebbyhotness.com/ minnows down
This spins up 4 servers and loads your public key which is expected to live in ~/.ssh/id_rsa.pub into their authorized hosts. Then it installs apache bench (apache2-utils). It connects using the root login and without a password, just your keypair.
Note 2: Always include a trailing slash when testing a root domain. The underlying load-testing tool (ab) doesn’t support raw domains.
It then uses those 4 servers to send 10,000 requests, 250 at a time, to attack OurNewWebbyHotness.com.
Lastly, it spins down the 4 servers. Please remember to do this—we aren’t responsible for your Digital Ocean bills.
For complete options type:
minnows -h
(The following was cribbed from our original blog post about the bees.)
If you decide to use the Minnows, please keep in mind the following important caveat: they are, more-or-less a distributed denial-of-service attack in a fancy package and, therefore, if you point them at any server you don’t own you will behaving unethically, have your Digital Ocean account locked-out, and be liable in a court of law for any downtime you cause.
You have been warned.
Please log your bugs on the Github issues tracker.
Minnows with machine guns is 99.99% code from Bees with Machine Guns but with some changes to make it work for Digital Ocean rather than AWS. All credit goes to them.
The original bees with machine guns are a creation of the News Applications team at the Chicago Tribune—visit our blog and read our original post about the project.
Initial refactoring code and inspiration from Jeff Larson.
MIT.