envoy-build-tools icon indicating copy to clipboard operation
envoy-build-tools copied to clipboard

Add dependencies for Salvo aiming to serve Envoy ecosystem

Open gyohuangxin opened this issue 3 years ago • 7 comments

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:

  • Benchmarking Envoy's performance as part of CI (continuous integration) as a pre-submit check on PR (pull requests).
  • Monitoring Envoy's performance of Envoy over time and preventing performance regressions.
  • Providing Envoy developers with a push button to perform A/B testing.

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:

  • docker.io
  • python3-pytest
  • python3-docker
  • openjdk-11-jdk

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 avatar May 05 '22 08:05 gyohuangxin

cc @mum4k

gyohuangxin avatar May 05 '22 08:05 gyohuangxin

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).

mum4k avatar May 05 '22 14:05 mum4k

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

keith avatar May 05 '22 14:05 keith

@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.

gyohuangxin avatar May 05 '22 15:05 gyohuangxin

@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.

lizan avatar May 07 '22 05:05 lizan

@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.

gyohuangxin avatar May 07 '22 11:05 gyohuangxin

@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.

lizan avatar May 09 '22 18:05 lizan