-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Official Docker image and documentation #850
Conversation
Codecov Report
@@ Coverage Diff @@
## master #850 +/- ##
=======================================
Coverage 66.55% 66.55%
=======================================
Files 14 14
Lines 1438 1438
Branches 226 226
=======================================
Hits 957 957
Misses 430 430
Partials 51 51 Continue to review full report at Codecov.
|
thanks for this! |
I've found it easier to run locust locally in standalone mode while developing the locustfile. The example docker-compose file still exists though.
Hey! I think having an official Docker image for Locust would be great. Do we really need the |
@@ -11,6 +11,8 @@ matrix: | |||
env: TOXENV=py34 | |||
- python: 2.7 | |||
env: TOXENV=py27 | |||
- stage: Verify Docker image builds | |||
script: docker build -t locustio/locust . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update this to push latest
if the branch is master?
@@ -0,0 +1,10 @@ | |||
FROM python:3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use either alpine
or slim-stretch
variants to reduce the image size.
@@ -0,0 +1,25 @@ | |||
#!/usr/bin/env bash | |||
|
|||
if [ -z "${TARGET_URL}" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I agree we should handle env vars for all of these settings, I think we should handle these at the app leveland simply take whatever the $@
entrypoint is, defaulting to locust
. This allows the user to modify their entry as necessary and simply pass the envvars to be used.
|
||
``` | ||
FROM locustio/locust | ||
ADD locustfile.py locustfile.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should discourage the usage of ADD
for the user's locustfile.py
and document mounting a directory with the locustfile.py
instead.
@@ -0,0 +1,25 @@ | |||
version: "3.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for using the latest docker-compose
syntax version, but maybe we could pin at 3
to increase availability/adoption.
I have tried the docker image as is in this PR branch and it works great! There was a Locust Helm chart in the stable repository that hasn't been updated in about a year. I made all of the changes necessary to do the update to v0.9.0 and also added a bunch of other Kubernetes items in there to make it work a little nicer like nodeSelectors/Taints and an Ingress. I have this PR for the Helm Chart update but I should probably wait for an official image instead of using the image in my Docker Hub repo. Here is the updated Chart: https://github.com/helm/charts/compare/master...sekka1:with-v0.9.0?expand=1#diff-c9789cc33518b31f9230b6284b2b6116R4 The last response to the updates was about a month ago. I'm happy to continue on if @JDiPierro is too busy now. Thoughs @mbeacom |
@sekka1 this PR was superseded by #882 , which has already been merged... so Docker stuff is in master branch now. Could you give it a try? I am going to close this one now. |
The Docker image in Master works for me. @cgoldberg Is there any plans for an official Locust Docker hub image? |
It would be great to release the image to an official account. This account looks like scam https://hub.docker.com/r/locustio/locust , though not sure if it actually is. https://hub.docker.com/r/_/locust would be great ! |
Is this docker image built and pushed to a public registry yet? |
Nevermind. There is an ongoing discussion around this topic - #849 |
For #849 :)
Adds a basic
Dockerfile
that starts frompython:3.6
and a includes custom startup script that allows you to start in any mode.Includes a first attempt at documentation.
I added a Travis stage to build the image but for releasing I think the better approach is for someone to create a DockerHub account for locustio and set up an automated build for the repository. I believe they do security scanning on the resulting image as well.
Let me know if there's any docs changes, extra features, etc you'd like to see or if I can help with the DockerHub setup. I'm hanging around the Slack server as @JDiPierro as well :D