zalando-incubator / docker-locust Goto Github PK
View Code? Open in Web Editor NEWDocker image for the Locust.io open source load testing tool
License: Other
Docker image for the Locust.io open source load testing tool
License: Other
docker-locust can only read one single file from s3 and http/https resource. It should be able to read multiple files and choose which one is the load test script and which one is additional file. Sample case: 1 python file is load test script and 1 json file is file that store the payload.
Current formatting of html report is a disaster:
locust_report.html.zip
The proposal is to review the feature and either improve or remove it.
Also, it would be nice to change the long lines to multiline code blocks in order to remove a need of horizontal scrolling and provide an ability to compare different run methods.
The controller only downloads html report, however automatic mode usually assumes automatic parsing and values comparison. #57 enables Controller to download locust .csv and .json reports from a Master node.
Similarly to https://github.com/hakobera/docker-locust
It would simplify the flow and allow to get rid of docker-compose.
When running locust as a Jenkins job (as described in the readme), aborting the Jenkins job does not actually abort the running load test.
All the spawned docker containers are still running after the job has been canceled and they still create load.
It would be great, if aborting the Jenkins job would also abort the running load test.
I see three approaches how this could work:
I think, 1. would be the best, and 2. probably the easiest
After #87 and #88 I started to get errors with the locally built image:
Traceback (most recent call last):
File "/usr/local/bin/locust", line 7, in <module>
from locust.main import main
File "/usr/local/lib/python3.5/dist-packages/locust/main.py", line 14, in <module>
from . import events, runners, web
File "/usr/local/lib/python3.5/dist-packages/locust/runners.py", line 13, in <module>
from gevent.pool import Group
File "/usr/local/lib/python3.5/dist-packages/gevent/pool.py", line 27, in <module>
from gevent._imap import IMap
File "/usr/local/lib/python3.5/dist-packages/gevent/_imap.py", line 227, in <module>
import_c_accel(globals(), 'gevent.__imap')
File "/usr/local/lib/python3.5/dist-packages/gevent/_util.py", line 105, in import_c_accel
mod = importlib.import_module(cname)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "src/gevent/_queue.pxd", line 18, in init gevent.__imap
ValueError: gevent._queue.Queue has the wrong size, try recompiling. Expected 80, got 72
The PRs have been temporarily reverted until the issue is found.
Since docker-locust itself is not a tool, but rather a wrapper, it doesn't compete with the commercial load testing tools. Provided advantages should base on docker-locust comparison with Locust itself or the other Locust wrappers (e.g. https://github.com/hakobera/docker-locust)
Currently in the AUTOMATIC mode the Controller waits for Master web UI to come up and then immediately starts the test.
In order to support distributed environments (e.g. AWS) where instance spin up time may take several minutes, it should also wait for all Slaves to be connected to the Master, until certain time limit is reached.
What makes this different from any of these Docker images? Putting a few lines about this in the README will be helpful to anyone external who might be able to use it.
In order to simplify app's architecture, the controller process could be removed in favor of --no-web and --expect-slaves options.
Based on the Zalando OSS Readme Template, I think we can improve the following items:
Hi, thanks for putting this together. Just a few feedback items to consider:
docker
and docker-compose
(especially curl to bash ). Responsible users will have to read every line of the bash script before running it anyway. Which is a waste since everything this script does can already be done with plain old Docker or Compose. It would be better to just prepare a ready made docker-compose.yml
file that can be copy/pasted and just run TARGET_HOST=example.com docker-compose up -d
to run the entire stack.-v ~/.aws:/root/.aws
) to run a single instance of the stack. It currently doesn't seem required to run this locally yet the aws credentials are volume mounted in all the examples.It'd be nice to update to 0.8.x branch as it contains some basic graphs in the UI.
These args are hardcoded, but it might be desired to customize them, e.g.:
I used the CI bash example command, I get the following error instead of any success.
Creating docker_locusts_controller ... done
Creating app_slave_1 ...
Creating app_slave_1 ... done
Locust application is successfully deployed. you can access http://<docker-host-ip-address>:8089
Error response from daemon: Could not find the file /opt/reports in container docker_locusts_controller
Hi there, the issue I am having is that I build the container, which is pulling from FROM registry.opensource.zalan.do/stups/ubuntu:16.04-60
then run ./local.sh deploy
Sending build context to Docker daemon 382 kB
Step 1/12 : FROM registry.opensource.zalan.do/stups/ubuntu:16.04-60
---> e3d1f57f68e0
Step 2/12 : ENV REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
---> Using cache
---> 0c9f403ed6b1
Step 3/12 : RUN apt-get update && apt-get install -y python-dev python-zmq python-pip
---> Using cache
---> f205011bd69b
Step 4/12 : EXPOSE 8089
---> Using cache
---> 520046f518de
Step 5/12 : EXPOSE 5557
---> Using cache
---> 58deb910ad03
Step 6/12 : EXPOSE 5558
---> Using cache
---> f9dd9b1ddd33
Step 7/12 : COPY requirements.txt /tmp/
---> Using cache
---> 103daacc086b
Step 8/12 : RUN pip install -r /tmp/requirements.txt
---> Using cache
---> ee12e515f513
Step 9/12 : COPY . /opt/
---> b0e64588c9b1
Removing intermediate container 152600dbef69
Step 10/12 : WORKDIR /opt
---> 94af69a003f1
Removing intermediate container 3fc81a7bd97b
Step 11/12 : ENV PYTHONPATH .
---> Running in c451832efdb5
---> 6b28a22a0c7f
Removing intermediate container c451832efdb5
Step 12/12 : CMD /usr/bin/python src/start.py
---> Running in 548581acbb36
---> 9e47141bd1dd
Removing intermediate container 548581acbb36
Successfully built 9e47141bd1dd```
`root@hq-stage-docker06:/home/toor/workspace/qa-docker-locust-io# docker ps`
reveals no locust containers... it used to work...
now when I connect to http:www.localhost.com:8089 (black page)...
Hey, thanks for this repo, all looks great and seems to be functioning well.
I have a html report, I can access the CSV files also. However, I cannot verify that the tests were run against my Target URL. Is there an indicator to state what the tests were run against? i.e - that they weren't just run against /
or localhost
on the same machine.
I set the URL initially, but afterwards there is no indicator I can see. When I echo out $TARGET_HOST
, $TARGET_URL
and `$TARGET' I'm getting a blank also.
Thanks.
During bootstrap a controller node checks in app.py
that the number of connected slaves is actually equal to desired number of slaves. This check, however, fails if the controller times out waiting for all slaves to come online. Instead, the controller - correctly - warns that the number of online slaves is not equal to the desired number of slaves, yet still proceeds:
5:34:47 PM INFO:bootstrap:Currently connected slaves: 0
5:34:52 PM INFO:bootstrap:Checking if all slave(s) are connected.
5:34:52 PM INFO:bootstrap:Currently connected slaves: 0
5:34:57 PM INFO:bootstrap:Checking if all slave(s) are connected.
5:34:57 PM INFO:bootstrap:Currently connected slaves: 0
5:35:02 PM WARNING:bootstrap:Connected slaves:0 != defined slaves:8
5:35:02 PM INFO:bootstrap:All slaves are succesfully connected! Start load test automatically for 150 seconds.
The issue is here:
Line 107 in 1f19a41
Instead, app.py
should bail out with an error.
Distributed testing is an important Locust feature, which is also mentioned in project's Key advantages: "It is also possible to be deployed in AWS to create bigger load". However, there's no any mentioning of distributed flow or AWS deployment in project's README.
Locust has a reports collection and generation delay, that depends on the amount of data generated by slaves per second. In the meantime, delay of 3 seconds had been observed, but it can probably be higher for a larger test scenario.
Static delay has been introduced in #57
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.