karol-brejna-i / docker-locust Goto Github PK
View Code? Open in Web Editor NEWRepository for docker images for locust.io
License: Apache License 2.0
Repository for docker images for locust.io
License: Apache License 2.0
Can you add the new version to DockerHub?
PR #9 (merged)
Currently the README notes the following:
LOCUST_MODE | Set the mode to run in. Can be standalone, master or slave.
In the latest locust versions this is changed to 'worker' instead of 'slave'
Hi *,
I really like the work you did and are willing to help to make them easily usable within FROM ...
in docker.
What do you think about?
I am interested in this library. I would like to use your scripts and Dockerfile as an example/base for custom scripts but this is currently not possible. Please add an appropriate LICENSE file to the repository.
When I update the image and the env variables I get the following error:
usage: locust [-h] [-H HOST] [--web-host WEB_HOST] [-P PORT] [-f LOCUSTFILE]
[--csv CSVFILEBASE] [--csv-full-history] [--master] [--slave]
[--master-host MASTER_HOST] [--master-port MASTER_PORT]
[--master-bind-host MASTER_BIND_HOST]
[--master-bind-port MASTER_BIND_PORT]
[--heartbeat-liveness HEARTBEAT_LIVENESS]
[--heartbeat-interval HEARTBEAT_INTERVAL]
[--expect-slaves EXPECT_SLAVES] [--no-web] [-c NUM_CLIENTS]
[-r HATCH_RATE] [-t RUN_TIME] [--skip-log-setup] [--step-load]
[--step-clients STEP_CLIENTS] [--step-time STEP_TIME]
[--loglevel LOGLEVEL] [--logfile LOGFILE] [--print-stats]
[--only-summary] [--no-reset-stats] [--reset-stats] [-l]
[--show-task-ratio] [--show-task-ratio-json] [-V]
[--exit-code-on-error EXIT_CODE_ON_ERROR] [-s STOP_TIMEOUT]
[LocustClass [LocustClass ...]]
locust: error: argument -P/--port/--web-port: invalid int value: 'tcp://0.0.0.0:5557'
I was able to debug the container and manually run the locust command adding -P=5557
argument.
Any ideas?
Note: 0.0.0.0 is masking the real IP for obvious reasons.
Locust seems to have released new version with v1.0.x . It would be great to have this supported here. Example would be like
FROM python:3.8.1-alpine3.11
COPY docker-entrypoint.sh /
RUN apk --no-cache add --virtual=.build-dep build-base git \
&& apk --no-cache add zeromq-dev libffi-dev \
&& python3 -m pip install --no-cache-dir git+https://github.com/locustio/[email protected]#egg=locustio \
&& apk del .build-dep \
&& chmod +x /docker-entrypoint.sh \
&& mkdir /locust
WORKDIR /locust
EXPOSE 8089 5557 5558
ENTRYPOINT ["/docker-entrypoint.sh"]
When running in distributed mode, you'll get the following error:
master | [2019-04-17 18:18:36,124] master/INFO/stdout: 1000 records read
master | [2019-04-17 18:18:36,124] master/INFO/stdout:
master | [2019-04-17 18:18:36,125] master/INFO/root: Waiting for slaves to be ready, 0 of 1 connected
master | [2019-04-17 18:18:36,200] master/INFO/locust.runners: Client b'81269be90ff9_24c41e4b061f4e37acde0753d38cca38' reported as ready. Currently 1 clients ready to swarm.
master | [2019-04-17 18:18:37,126] master/INFO/locust.runners: Sending hatch jobs to 1 ready clients
master | [2019-04-17 18:18:37,127] master/INFO/stdout: on_master_start_hatching
master | [2019-04-17 18:18:37,127] master/INFO/stdout:
master | [2019-04-17 18:18:37,127] master/ERROR/stderr: Traceback (most recent call last):
master | [2019-04-17 18:18:37,127] master/ERROR/stderr: File "/usr/local/bin/locust", line 10, in <module>
master | [2019-04-17 18:18:37,128] master/ERROR/stderr:
master | [2019-04-17 18:18:37,128] master/ERROR/stderr: sys.exit(main())
master | [2019-04-17 18:18:37,128] master/ERROR/stderr:
master | [2019-04-17 18:18:37,128] master/ERROR/stderr: File "/usr/local/lib/python3.6/site-packages/locust/main.py", line 505, in main
master | [2019-04-17 18:18:37,129] master/ERROR/stderr:
master | [2019-04-17 18:18:37,129] master/ERROR/stderr: runners.locust_runner.start_hatching(options.num_clients, options.hatch_rate)
master | [2019-04-17 18:18:37,129] master/ERROR/stderr:
master | [2019-04-17 18:18:37,129] master/ERROR/stderr: File "/usr/local/lib/python3.6/site-packages/locust/runners.py", line 310, in start_hatching
master | [2019-04-17 18:18:37,130] master/ERROR/stderr:
master | [2019-04-17 18:18:37,130] master/ERROR/stderr: self.server.send_to_client(Message("hatch", data, client.id))
master | [2019-04-17 18:18:37,130] master/ERROR/stderr:
master | [2019-04-17 18:18:37,130] master/ERROR/stderr: File "/usr/local/lib/python3.6/site-packages/locust/rpc/zmqrpc.py", line 15, in send_to_client
master | [2019-04-17 18:18:37,130] master/ERROR/stderr:
master | [2019-04-17 18:18:37,130] master/ERROR/stderr: self.socket.send_multipart([msg.node_id.encode(), msg.serialize()])
master | [2019-04-17 18:18:37,130] master/ERROR/stderr:
master | [2019-04-17 18:18:37,130] master/ERROR/stderr: AttributeError
master | [2019-04-17 18:18:37,131] master/ERROR/stderr: :
master | [2019-04-17 18:18:37,131] master/ERROR/stderr: 'bytes' object has no attribute 'encode'
master | [2019-04-17 18:18:37,131] master/ERROR/stderr:
master exited with code 1
Images for version 0.9 and 0.11 work OK.
Use for example "grubykarol/locust:0.10.0-python3.6-alpine3.9" image to start master and slave (can use example from the repo: https://github.com/karol-brejna-i/docker-locust/blob/master/examples/docker-compose-distributed-headless.yml)
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.