To run:
- Install virtualenv through
easy_install virtualenv
or throughpip install virtualenv
- Create virtualenv
virtualenv ~/ansible2.8
- Activate virtualenv
source ~/ansible2.8/bin/activate
- Install ansible and locust
pip install -r requirements.txt
locust -f locust.py
- visit http://localhost:8089
- enter endpoint e.g. http://sg1.solrpc.com:8080
Before launching worker nodes, make sure you have a master node ready to run (start with locust -f locust.py --master
). It should have a public IP accessible.
To launch worker nodes you need a digital ocean API token - https://cloud.digitalocean.com/account/api/tokens
Then specify the environment variable DO_API_TOKEN
, e.g. export DO_API_TOKEN=<token>
Verify settings for your launch in vars.yml
Then run the launch command ansible-playbook launch-workers.yml
When you are done running the test, run the command: ansible-playbook terminate-workers.yml
Run ./status.sh to get the systemctl status locust on all worker nodes.
Run ./restart-workers.sh to restart all worker nodes.