https://github.com/fnzv/dtbot
A loadstressing bot managed via Telegram currently supporting Openstack & AWS
https://github.com/fnzv/dtbot
ansible benchmark benchmarking ddos http loader loadstresser
Last synced: 9 months ago
JSON representation
A loadstressing bot managed via Telegram currently supporting Openstack & AWS
- Host: GitHub
- URL: https://github.com/fnzv/dtbot
- Owner: fnzv
- License: gpl-3.0
- Created: 2018-05-27T16:31:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-06T08:26:48.000Z (over 7 years ago)
- Last Synced: 2025-04-06T17:05:56.817Z (10 months ago)
- Topics: ansible, benchmark, benchmarking, ddos, http, loader, loadstresser
- Language: Python
- Size: 2.34 MB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

A loadstressing bot managed via Telegram currently supporting Openstack & AWS
-----------------
## Requirements
- Ubuntu 16.04
- Ansible (current version: ansible 2.5.3), Golang (if you want to compile it yourself)
### Quickstart
Run the bash script (install.sh) to install all the required dependencies.
```bash install_script.sh```
This install script will copy the current compiled binary from /bin into your current system and configure systemd.
Installed packages:
- python-pip (modules: ansible,shade,boto)
After the installation you need to setup your configuration file and credentials source files for Openstack and/or AWS.
The configuration file is ``` /etc/dtbot.conf ``` :
- Telegram Token (can be generated by writing to BotFather "/newbot" : https://telegram.me/botfather)
- Chat ID (if you don't know your id you can write some messages to the newly created bot and then open from this url on your browser: https://api.telegram.org/bot(token)/getUpdates )
The credential files must be placed on:
- /etc/dtbot/os_creds (for Openstack)
- /etc/dtbot/aws_creds (for AWS)
To start the bot process run:
```service dtbot start```
If you encounter any issue check the log file: /var/log/dtbot.log
Now before you can run the available commands you must check some parameters on the playbooks:
- /etc/dtbot/playbooks/aws-create-infra.yaml (Keyname - Create an SSH-key from your VM running the bot and import this last one on AWS, then use the name of the key in the playbook aws-create-infra.yaml)
- /etc/dtbot/playbooks/create-infra.yaml (Depending on your Openstack provider you need to adjust the "flavor:" and "image:"
- /etc/dtbot/playbooks/info.yaml,ddos.yaml (Same as above ..Openstack flavor,image)
### Usage
All the available commands can be viewed by sending the message /help to the Bot:
```
/help - shows this output
Examples:
/load
/create
/destroy
/stop ... The Num instances is a sequential number, if i deploy 10 Instances with /create 10 the next time i re-launch the command will not deploy another 10 instances but will only check that instances from 0-10 are present... The same for /stop /load and /destroy
/create_aws .. every time the command is launched new instances will be deployed
/destory_aws (shuts off all VMS Accessible via the ssh key provided so create a separate key.. Stresser nodes will be deleted on shutoff)
/load_aws ..
/loadj_aws - Downloads custom jmx and execute it on aws ..
/loadj - Downloads custom jmx and execute it on Openstack. ..
/load_custom .. start loadstressers and executes custom bash script provided on Openstack creds ..
/load_custom_aws .. start loadstressers and executes custom bash script provided on AWS nodes...
```
## Work Flow
This is the basic concept explained with a diagram:

Working on Ubuntu 16.04 and Ansible 2.5.3
## Contributors
Feel free to open issues or send me an email
## License
Code distributed under GPLv3 licence.