-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[loadgenerator] Bump deps and update container base image #669
[loadgenerator] Bump deps and update container base image #669
Conversation
I think changelog is needed. |
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.
Install of the requirements is not working (with Docker Desktop, Mac M1):
$ docker system prune -a
$ docker compose build loadgenerator
[+] Building 16.2s (10/13)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 987B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 1.04kB 0.0s
=> [internal] load metadata for docker.io/library/python:3.11-alpine3.17 1.7s
=> importing cache manifest from ghcr.io/open-telemetry/demo:v1.2.1-loadgenerator 1.6s
=> [internal] load build context 0.1s
=> => transferring context: 9.44kB 0.0s
=> [base 1/1] FROM docker.io/library/python:3.11-alpine3.17@sha256:af8fef83397b3886ed93d2c81bf3b4e70d39c0789c1c6feb1ecb86ca9bc42a0a 2.4s
=> => resolve docker.io/library/python:3.11-alpine3.17@sha256:af8fef83397b3886ed93d2c81bf3b4e70d39c0789c1c6feb1ecb86ca9bc42a0a 0.0s
=> => sha256:261da4162673b93e5c0e7700a3718d40bcc086dbf24b1ec9b54bca0b82300626 3.26MB / 3.26MB 0.4s
=> => sha256:e1c6f98fd0547fcc6cd773da260cc8d980e3beeceffd4c0805fb00942a7175e3 624.83kB / 624.83kB 0.5s
=> => sha256:45a28ad63eb058b6b4c2b3a90a0160e7bd2eb2a4c481b313b2e3226af2b58c35 12.80MB / 12.80MB 1.6s
=> => sha256:af8fef83397b3886ed93d2c81bf3b4e70d39c0789c1c6feb1ecb86ca9bc42a0a 1.65kB / 1.65kB 0.0s
=> => sha256:5693bfba00d784b3bb48b1f485233a2ac845946cde2a65427e316882b3e2f564 1.37kB / 1.37kB 0.0s
=> => sha256:bbd3f7c28acebf719a48db90839073e2d32da8a1d44d9686613ca58ec56942f9 7.05kB / 7.05kB 0.0s
=> => extracting sha256:261da4162673b93e5c0e7700a3718d40bcc086dbf24b1ec9b54bca0b82300626 0.2s
=> => sha256:fe2bfecb80211f62678e1546cdef5581c5a13c349b5f94fa182d6003b7e2e548 230B / 230B 0.5s
=> => sha256:b1fe52bb1731b2f5a7a7c38544faa2cbd654ecebbf287757c5e12d0d3c0c35a9 3.06MB / 3.06MB 0.9s
=> => extracting sha256:e1c6f98fd0547fcc6cd773da260cc8d980e3beeceffd4c0805fb00942a7175e3 0.3s
=> => extracting sha256:45a28ad63eb058b6b4c2b3a90a0160e7bd2eb2a4c481b313b2e3226af2b58c35 0.4s
=> => extracting sha256:fe2bfecb80211f62678e1546cdef5581c5a13c349b5f94fa182d6003b7e2e548 0.0s
=> => extracting sha256:b1fe52bb1731b2f5a7a7c38544faa2cbd654ecebbf287757c5e12d0d3c0c35a9 0.2s
=> [builder 1/3] RUN apk add gcc linux-headers musl-dev 3.2s
=> [stage-2 1/4] WORKDIR /usr/src/app/ 0.1s
=> [builder 2/3] COPY ./src/loadgenerator/requirements.txt . 0.0s
=> ERROR [builder 3/3] RUN pip install --prefix="/reqs" -r requirements.txt
...
#0 6.923 Failed to build cffi
#0 6.923 Installing collected packages: setuptools, pycparser, greenlet, Cython, cffi
#0 6.923 Running setup.py install for cffi: started
#0 6.923 Running setup.py install for cffi: finished with status 'error'
#0 6.923 error: subprocess-exited-with-error
#0 6.923
#0 6.923 × Running setup.py install for cffi did not run successfully.
#0 6.923 │ exit code: 1
@mviitane would you be able to try it again? |
I now get further, but it still fails:
|
@mviitane how about now? |
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.
Started working and runs fine. Image size is now much smaller, but build time increased. It's off course debatable, which is more important.
This PR:
Image size: 183MB
Building time: 152.2s (15/15) FINISHED
Previous:
Image size: 1.21GB
Building time: 21.4s (11/11) FINISHED
Tested on M1 mac.
Thank you very much @mviitane, that was an interesting one. |
Let's discuss this on Monday! That image size reduction is huge |
…etry#669) * Bump deps and changed container base image * Add extra dependencies * changelog * Adding dependencies * Add libstdc++ * Moving to slim image
Changes
For some unknown reason the loadgenerator container image had a size of 1.02GB.
When updating the
Dockerfile
, I've also updated the dependencies and tidied up a bit thelocustfile.py
.Now the image has a size of 135MB.
Merge Requirements
For new features contributions please make sure you have completed the following
essential items:
CHANGELOG.md
updated to document new feature additionsMaintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.