Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Merge pull request #78 from butomo1989/master
Browse files Browse the repository at this point in the history
Cleaned up
  • Loading branch information
budtmo authored Dec 27, 2017
2 parents 606eb94 + 1d1df3d commit 721a688
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/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
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ services:
volumes:
- ~/.aws:/root/.aws
- ./:/opt/script
- ./credentials:/meta/credentials
environment:
- ROLE=slave
- MASTER_HOST=master
- 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
Expand Down
2 changes: 2 additions & 0 deletions example/simple_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ def post_random_payload(self):

class MyLocust(HttpLocust):
task_set = SimplePostBehavior
min_wait = 0
max_wait = 0
8 changes: 4 additions & 4 deletions local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/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
}

Expand Down

0 comments on commit 721a688

Please sign in to comment.