From 19fc13f8d14dcbeb0760918bbf942461176bd847 Mon Sep 17 00:00:00 2001 From: budi utomo Date: Wed, 27 Dec 2017 13:31:25 +0100 Subject: [PATCH 1/4] Added oauth in docker-compose --- docker-compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index ceb3dfe..2a0f1ef 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -26,6 +26,9 @@ services: - TARGET_HOST=$TARGET_HOST - LOCUST_FILE=$LOCUST_FILE - SLAVE_MUL=$SLAVE_NUM + - OAUTH=$OAUTH + - URL=$URL + - SCOPES=$SCOPES controller: image: $IMAGE container_name: docker_locusts_controller From 51ce13505c1bff935ca6c63382dea16c6cf56b87 Mon Sep 17 00:00:00 2001 From: budi utomo Date: Wed, 27 Dec 2017 13:44:06 +0100 Subject: [PATCH 2/4] Added additional folder to be shared --- README.md | 2 +- docker-compose.yaml | 1 + local.sh | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e0505bc..9193c84 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ bash <(curl -s https://raw.githubusercontent.com/zalando-incubator/docker-locust It is also possible to run with normal docker command: ```bash -docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=https://targeturl.com -e LOCUST_FILE=https://raw.githubusercontent.com/zalando-incubator/docker-locust/master/example/simple.py -e SLAVE_MUL=4 -e AUTOMATIC=False registry.opensource.zalan.do/tip/docker-locust +docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script -v $PWD/assets:/opt/assets -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=https://targeturl.com -e LOCUST_FILE=https://raw.githubusercontent.com/zalando-incubator/docker-locust/master/example/simple.py -e SLAVE_MUL=4 -e AUTOMATIC=False registry.opensource.zalan.do/tip/docker-locust ``` ### Multiple machines diff --git a/docker-compose.yaml b/docker-compose.yaml index 2a0f1ef..235d30b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -20,6 +20,7 @@ services: volumes: - ~/.aws:/root/.aws - ./:/opt/script + - ./assets:/opt/assets environment: - ROLE=slave - MASTER_HOST=master diff --git a/local.sh b/local.sh index 0410510..f8a55bc 100755 --- a/local.sh +++ b/local.sh @@ -174,10 +174,10 @@ EOF fi else echo "Run in standalone mode" - docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script -p 8089:8089 \ - -e ROLE=standalone -e TARGET_HOST=$TARGET -e LOCUST_FILE=$LOCUST_FILE -e SLAVE_MUL=$SLAVES \ - -e AUTOMATIC=$AUTOMATIC -e USERS=$USERS -e HATCH_RATE=$HATCH_RATE -e DURATION=$DURATION \ - -e OAUTH=$OAUTH -e URL=$URL -e SCOPES=$SCOPES $IMAGE + docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script \ + -v $PWD/assets:/opt/assets -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=$TARGET \ + -e LOCUST_FILE=$LOCUST_FILE -e SLAVE_MUL=$SLAVES -e AUTOMATIC=$AUTOMATIC -e USERS=$USERS \ + -e HATCH_RATE=$HATCH_RATE -e DURATION=$DURATION -e OAUTH=$OAUTH -e URL=$URL -e SCOPES=$SCOPES $IMAGE fi } From 0c150c5d3b3144d7fcc090f6c8a564024145d7b1 Mon Sep 17 00:00:00 2001 From: budi utomo Date: Wed, 27 Dec 2017 13:47:39 +0100 Subject: [PATCH 3/4] Deleted waiting time --- example/simple_post.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/simple_post.py b/example/simple_post.py index 7edd8c8..faad60e 100644 --- a/example/simple_post.py +++ b/example/simple_post.py @@ -33,3 +33,5 @@ def post_random_payload(self): class MyLocust(HttpLocust): task_set = SimplePostBehavior + min_wait = 0 + max_wait = 0 From 1d1df3d0b7749ac42b1da262c7ac6f21267c0c0e Mon Sep 17 00:00:00 2001 From: budi utomo Date: Wed, 27 Dec 2017 14:13:48 +0100 Subject: [PATCH 4/4] Renamed folder --- README.md | 2 +- docker-compose.yaml | 2 +- local.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9193c84..e88e027 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ bash <(curl -s https://raw.githubusercontent.com/zalando-incubator/docker-locust It is also possible to run with normal docker command: ```bash -docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script -v $PWD/assets:/opt/assets -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=https://targeturl.com -e LOCUST_FILE=https://raw.githubusercontent.com/zalando-incubator/docker-locust/master/example/simple.py -e SLAVE_MUL=4 -e AUTOMATIC=False registry.opensource.zalan.do/tip/docker-locust +docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script -v $PWD/credentials:/meta/credentials -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=https://targeturl.com -e LOCUST_FILE=https://raw.githubusercontent.com/zalando-incubator/docker-locust/master/example/simple.py -e SLAVE_MUL=4 -e AUTOMATIC=False registry.opensource.zalan.do/tip/docker-locust ``` ### Multiple machines diff --git a/docker-compose.yaml b/docker-compose.yaml index 235d30b..da6d0b2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -20,7 +20,7 @@ services: volumes: - ~/.aws:/root/.aws - ./:/opt/script - - ./assets:/opt/assets + - ./credentials:/meta/credentials environment: - ROLE=slave - MASTER_HOST=master diff --git a/local.sh b/local.sh index f8a55bc..dd79509 100755 --- a/local.sh +++ b/local.sh @@ -175,7 +175,7 @@ EOF else echo "Run in standalone mode" docker run -i --rm -v $PWD/reports:/opt/reports -v ~/.aws:/root/.aws -v $PWD/:/opt/script \ - -v $PWD/assets:/opt/assets -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=$TARGET \ + -v $PWD/credentials:/meta/credentials -p 8089:8089 -e ROLE=standalone -e TARGET_HOST=$TARGET \ -e LOCUST_FILE=$LOCUST_FILE -e SLAVE_MUL=$SLAVES -e AUTOMATIC=$AUTOMATIC -e USERS=$USERS \ -e HATCH_RATE=$HATCH_RATE -e DURATION=$DURATION -e OAUTH=$OAUTH -e URL=$URL -e SCOPES=$SCOPES $IMAGE fi