diff --git a/locust/Dockerfile b/locust/Dockerfile index 2637542..5272bd2 100644 --- a/locust/Dockerfile +++ b/locust/Dockerfile @@ -1,4 +1,4 @@ -FROM locustio/locust:2.5.0 +FROM locustio/locust:2.23.1 LABEL org.opencontainers.image.source=https://github.com/base2Services/build-containers diff --git a/locust/docker-entrypoint.sh b/locust/docker-entrypoint.sh index 8bc9458..ceb5069 100755 --- a/locust/docker-entrypoint.sh +++ b/locust/docker-entrypoint.sh @@ -18,15 +18,17 @@ if [ ${1} = "locust" ] ; then exit 1 fi - LOCUST_OPTS="-f ${LOCUST_FILE} --host=${TEST_HOST_URL} --no-reset-stats $LOCUST_OPTS" + LOCUST_OPTS="--host=${TEST_HOST_URL} --no-reset-stats $LOCUST_OPTS" case `echo ${LOCUST_MODE} | tr 'a-z' 'A-Z'` in "MASTER") - LOCUST_OPTS="--master --master-bind-port=${LOCUST_MASTER_BIND_PORT} $LOCUST_OPTS" + echo "Setting master node config" + LOCUST_OPTS="-f ${LOCUST_FILE} --master --master-bind-port=${LOCUST_MASTER_BIND_PORT} $LOCUST_OPTS" ;; - "SLAVE") - LOCUST_OPTS="--slave --master-host=${LOCUST_MASTER} --master-port=${LOCUST_MASTER_BIND_PORT} $LOCUST_OPTS" + "WORKER") + echo "Setting worker node config" + LOCUST_OPTS="-f - --worker --master-host=${LOCUST_MASTER} --master-port=${LOCUST_MASTER_BIND_PORT} --processes -1 $LOCUST_OPTS" if [ -z ${LOCUST_MASTER+x} ] ; then echo "You need to set LOCUST_MASTER." exit 1