When running the latests docker image with LOCUST_MODE set to worker, locust should start in worker mode, but it does not.
It seems to start in standalone mode and the correct LOCUST_OPTS from the docker_start.sh file are not being set.
When the container runs, I should see:
Starting Locust in worker mode...
$ locust -f /tests/locustfile.py -H ${TARGET_URL} --worker --master-host=${LOCUST_MASTER_HOST} --master-port=${LOCUST_MASTER_PORT:-5557}
Line 19 in the docker file should take effect:
https://github.com/locustio/locust/blob/master/docker_start.sh
It seems to recognise that the mode was set to worker, but the options are not getting updated to run in worker mode:
Starting Locust in worker mode...
$ locust -f /tests/locustfile.py -H http://something
[2020-04-10 06:05:33,874] moma-locust-worker-c8m79/INFO/locust.main: Starting web monitor at http://*:8089
[2020-04-10 06:05:33,874] moma-locust-worker-c8m79/INFO/locust.main: Starting Locust 0.14.5
Run the docker image with these environment variables set
LOCUST_MODE: worker
LOCUST_MASTER_HOST: something
TARGET_URL: http://something
LOCUSTFILE_PATH: /tests/locustfile.py
This docker-compose give the same issue:
x-common: &common
image: locustio/locust
environment: &common-env
TARGET_URL: http://localhost:8080
LOCUSTFILE_PATH: /tests/locustfile.py
volumes:
- ./tests:/tests
services:
locust-master:
<<: *common
ports:
- 8089:8089
environment:
<<: *common-env
LOCUST_MODE: master
locust-worker:
<<: *common
depends_on: [locust-master]
environment:
<<: *common-env
LOCUST_MODE: worker
LOCUST_MASTER_HOST: locust-master
Just realised it's just because the latest docker image doesn't reflect what is in master.
Switched to the master tag (instead of latest) and everything looks good to me.
Though, it would be good to know when we're getting a new docker image, would love to pin my version rather than use the master tag :)
Though, it would be good to know when we're getting a new docker image, would love to pin my version rather than use the master tag :)
Version 1.0 is not quite ready yet, but hopefully we'll be able to release a beta/release candidate pretty soon. It's hard to give a reliable ETA though since all work is done on an unpaid voluntary basis :).