envoyproxy / envoy-build-tools

Common build tools shared by the Envoy/UDPA ecosystem
Apache License 2.0
42 stars 66 forks source link

Add dependencies for Salvo aiming to serve Envoy ecosystem #174

Open gyohuangxin opened 2 years ago

gyohuangxin commented 2 years ago

Title: Add dependencies for Salvo aiming to serve Envoy ecosystem

Description: Salvo project is the Envoy benchmarking framework aiming to serve Envoy ecosystem with capable of:

In order to integrate well with Envoy CI system, we are migrating Salvo's CI workflow from CircleCI to AZP. Aligning with Envoy's and Nighthawk's CI workflow, we are also using script run_envoy_docker.sh to run the envoyproxy/envoy-build-ubuntu container to run Salvo's CI workflow.

We found below packages are required when running Salvo in envoyproxy/envoy-build-ubuntu container:

At this stage, we are only focusing on x86_64 arch and ubuntu OS, can we add above packages in envoyproxy/envoy-build-ubuntu Ubuntu x86_64 image?

Relevant Links: OSS benchmarking of Envoy Requirements: https://docs.google.com/document/d/1mAma-ksRN0OIBInoZKUdjdaIhK2nTQxFnCujq2fKi4E/edit

gyohuangxin commented 2 years ago

cc @mum4k

mum4k commented 2 years ago

Thank you @gyohuangxin for starting this discussion. I would also add that Salvo can and likely will develop its own Docker image long-term as the need for more packages / tooling grows.

Adding these packages into this existing image now would help us focus our available cycles on developing the main features of Salvo and postpone the investment into our docker image to a time when we have more contributors working on Salvo (eta ~6 months).

keith commented 2 years ago

It would be useful to know what impact those dependencies have on the docker image size

gyohuangxin commented 2 years ago

@mum4k @keith Thanks for the useful information and comments. If we add above packages, the uncompressed docker image size will be 7.43GB, the origin envoyproxy/envoy-build-ubuntu:ac5c9b6e73711ca8686de21cba7bc75c87de0ec8 is 6.63GB.

gyohuang/envoy-build-ubuntu     full-amd64                                 bde5271ab91a   8 hours ago    7.43GB
envoyproxy/envoy-build-ubuntu   ac5c9b6e73711ca8686de21cba7bc75c87de0ec8   15c64c319161   21 hours ago   6.63GB

Then for the compressed docker image uploaded to docker hub, the image size with above packages will be 2.19 GB, the envoyproxy/envoy-build-ubuntu:ac5c9b6e73711ca8686de21cba7bc75c87de0ec8 is 1.82 GB.

lizan commented 2 years ago

@gyohuangxin why would you need docker.io in the image? We do install docker-ce-cli so if you mount docker.sock into container it can talk to it.

gyohuangxin commented 2 years ago

@lizan Thanks for the useful information, double-checked, the docker.io is actually not necessary, we can use docker-ce-cli instead. And I learned that python3-pytest and python3-docker can be also installed with pip. Therefore, we just require openjdk-11-jdk in Ubuntu x86_64 image. Then the uncompressed image size will be 7.21GB, and the compressed one will be 2.14 GB.

lizan commented 2 years ago

@gyohuangxin Seems Salvo is using Bazel as well, according to https://bazel.build/docs/bazel-and-java if you use remotejdk_11 then you shouldn't need a JDK to be installed locally (in the docker image), that's what we do for Envoy. If that works you can just use existing image.