Messing up your perfectly planned system.
Editing iptables
to mimic network gray outs is scary. Wouldn't it be nice to
have a tool that does exactly what you want in an easy to write / read way
and provides you a reset button in case things don't work the way you
expect it to? Me too!
Bundler
- Ruby >= 2.2.1, may work on >= 2.0, but haven't tested it.
- Linux distributions with
iptables
andat
sudo
access
git clone
bundle
bin/leeroy
will display a prompt with available commandsbin/leeroy <command> --help
will display options available to that command.
All commands require --for_reals
flag to actually run. Otherwise
LeeroyJenkins
will output to the commands it will run.
This command will ssh into a target
server and create iptable rules aimed to
drop packets at random. This will create latency, as packets need to be resent
over the wire, or simulate half-open connections, where the target can
communicate to outside services but won't get a response back (because all
incoming packets will be dropped). This command also comes with a default
escape hatch which will trigger in 1 hour.
Required arguments:
-t
,--target=TARGET
pass the url of the server which you'd like to cause a network disruption on. For example if I want to randomly drop packets on serverweb-server
,Leeroy Jenkins
will runssh 'whoami'@web-server
and changeiptables
on that box.
This command will run a process which will randomly ssh
into your servers and
run disruptions. Leeroy will know about your services and their dependencies by
reading a yaml file. The format should be like:
nodes:
web:
url: web.example.com
dependencies:
- db
- api
api:
url: api.example.com
dependencies:
- facebook.com
db:
url: db.examplc.com
Dependencies can be the name of other services you've described in your yaml file, or the url of a vendor.
Network is currently the only available disruption, more to come in the future!
bundle exec rspec