Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gleicon/locust-swarm
ansible automation to master/slave locust.io test
https://github.com/gleicon/locust-swarm
Last synced: about 2 months ago
JSON representation
ansible automation to master/slave locust.io test
- Host: GitHub
- URL: https://github.com/gleicon/locust-swarm
- Owner: gleicon
- Created: 2015-04-01T03:08:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-30T05:17:11.000Z (over 6 years ago)
- Last Synced: 2024-07-24T13:59:51.370Z (2 months ago)
- Language: Python
- Size: 121 KB
- Stars: 31
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Swarm for Locust.io
Ansible AWS Provisioning for Locust.io Distributed load testing. There will be one Master VM and a number of slave VMs
## AWS
- Depends on Ansible and boto
$ sudo pip install ansible
$ sudo pip install boto
- Ships with ec2.py and ec2.ini from ansible. you probably want to check [this doc and update](http://docs.ansible.com/intro_dynamic_inventory.html)
- Export credentials
$ export AWS_ACCESS_KEY_ID=
$ export AWS_SECRET_ACCESS_KEY=
- Disable host key checking
$ export ANSIBLE_HOST_KEY_CHECKING=False- At AWS, take note of your VPC id, subnet id, IP block assigned to this subnet and the key name you will be using.
- Each region may have distinct AMI ids for Ubuntu 14.04 64 bits (trusty)
- Configure group_vars/all with your data
- slave_count is the number of slave VMs
- test_host is the target host you will be testing (base host, not full URL)
ssh_key_name: aws_devel
aws_region: us-east-1
ami_id: ami-9eaa1cf6
instance_type: t2.micro
vpc_id: vpc-ffffffff
subnet_id: subnet-ffffffff
slave_count: 3
cidr_ip: 10.0.0.0/16
test_host: "https://google.com"$ ansible-playbook -i aws_hosts.ini locust.yml --private-key ~/.ssh/aws_devel.pem
- aws_devel.pem is your public key, the same referred in the file above
- aws_hosts.ini file containing
[local]
localhost- use EC2 panel to remove servers or $ ansible-playbook -i ./ec2.py remove_servers.yml
## Testing agent
The testing agent is agent.py, copied into templates/ dir of locust role. If you use *run.sh* it will do it for you
## Target host
The target host is configured at locust.yml variable test_host
## Master
Access the master VM using http://ip:8089