-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Enable envoy images build on Arm CI environments #11813
Conversation
.azure-pipelines/pipelines.yml
Outdated
displayName: "Linux-arm64 docker" | ||
dependsOn: ["release_arm64"] | ||
condition: and(succeeded(), eq(variables['PostSubmit'], 'true'), ne(variables['Build.Reason'], 'PullRequest')) | ||
pool: "arm-large" |
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 do this in existing docker job with multiarch?
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.
Hi, lizan
Yes, we can. And the buildx tool could make code more clean. But, the build image by qemu may be a little bit slow, i don't know whether there is enough time to do this. So I choose to build it on the arm environment.
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.
What is your opinion about it?
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 leaning to do it with buildx, I don't think you'll face any issue, we just do base image + putting binary in it.
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.
Sound good! I will cancel this PR.
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.
Hi, I update this patch by buildx tool.
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.
Hi, Could you please give some comments @lizan
43ed848
to
b79bd57
Compare
d8442d8
to
00dc595
Compare
ci/Dockerfile-envoy
Outdated
@@ -31,9 +31,16 @@ RUN adduser --group --system envoy | |||
|
|||
RUN mkdir -p /etc/envoy | |||
|
|||
ADD build_release_stripped/envoy /usr/local/bin/envoy | |||
ADD arm64/build_release_stripped/envoy /usr/local/bin/envoy-arm64 |
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.
Effectively you put everything in the image here, i.e. making the image big, doing rm
later doesn't remove the binary form docker layers. Can this actually just be a build-arg?
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.
Has updated. Please check it.
00dc595
to
6790431
Compare
ci/Dockerfile-envoy-google-vrp
Outdated
@@ -1,4 +1,41 @@ | |||
FROM envoyproxy/envoy:local | |||
ARG BUILD_FROM=ubuntu:18.04 |
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.
Why do you need this change? you don't really need this?
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.
Hi, Lizan
The envoy-google-vrp is based on envoyproxy/envoy:local image. But when building envoy-google-vrp by buildx, I found that the buildx can not find the envoyproxy/envoy:local image which was just built by buildx. The envoyproxy/envoy:local image does not exist in docker images list.
If we export envoyproxy/envoy:local by command "docker buildx build -o type=docker ", buildx still can not access that image. Although "docker build" could access envoyproxy/envoy:local image.
So, I think, if we replace based image by source dockerfile, the build script may be simpler than before. At same time, for envoy-google-vrp image, it could be more dependent. And it also does not extend the building time since it will use the image cache which was built before.
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.
Will defer this part to @htuch
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.
Seem plausible. FWIW, I don't think we need VRP for ARM, but if you'd like to cleanup the build flow while retaining the same semantics (i.e. have the equivalent of envoyproxy/envoy
latest state based on the current tree as the base) then that's great.
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.
@lizan Have updated. Please check it.
In this patch, it will enable the envoyproxy/envoy arm image to build in community arm CI environments. 1. Do some modifications in docker_ci.sh script for building arm images by buildx. It will firstly set up environments. Then use the buildx tool to build the envoyproxy/envoy arm images on x86 platform. 2. Modify the docker build job for building multi-arch images. It will firstly download the arm64 and amd64 envoy binaries. Then invoke the docker_ci.sh scripts to generate images. Signed-off-by: Jingzhao <Jingzhao.Ni@arm.com>
1. Update building scripts 2. Update dockerfiles for building arm64 images Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
6a5a6db
to
0d668ef
Compare
Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
.azure-pipelines/pipelines.yml
Outdated
- bash: | | ||
set -e | ||
tar zxf $(Build.StagingDirectory)/bazel.release/envoy_binary.tar.gz | ||
mkdir -p linux/amd64 && tar zxf $(Build.StagingDirectory)/bazel.release/envoy_binary.tar.gz -C ./linux/amd64 | ||
mkdir -p linux/arm64 && tar zxf $(Build.StagingDirectory)/bazel.release.server_only.arm64/envoy_binary.tar.gz -C ./linux/arm64 |
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.
bazel.release
instead of bazel.release.server_only
.
Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
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.
Thanks, this LGTM. I triggered a post-submit job based on this:
https://dev.azure.com/cncf/envoy/_build/results?buildId=46427&view=results
If this succeeds we can merge with fixing the nit. If no let's address it.
ci/docker_ci.sh
Outdated
done | ||
|
||
|
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.
nit: remove this extra line.
Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
@Jingzhao123 one last thing, can you add a release note? Thanks. |
Does the release note describe what does the PR do? Or others? |
Has updated. Please check it. |
@Jingzhao123 I meant adding a line to https://github.com/envoyproxy/envoy/blob/master/docs/root/version_history/current.rst |
Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
@Jingzhao123 @lizan would it be possible to document the ARM images that we offer here? https://www.envoyproxy.io/docs/envoy/latest/install/building#pre-built-binaries It's not completely clear to me whether these show up in different repos, are a single multi-arch image, how a user consumes them, etc. Thank you! |
In this patch, it will enable the envoyproxy/envoy arm image to build in community arm CI environments. 1. Do some modifications in docker_ci.sh script for building arm images by buildx. It will firstly set up environments. Then use the buildx tool to build the envoyproxy/envoy arm images on x86 platform. 2. Modify the docker build job for building multi-arch images. It will firstly download the arm64 and amd64 envoy binaries. Then invoke the docker_ci.sh scripts to generate images. Risk Level: Medium (of breaking images) Testing: CI Docs Changes: N/A Release Notes: Added Fixes envoyproxy#1861 Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
In this patch, it will enable the envoyproxy/envoy arm image to build in community arm CI environments. 1. Do some modifications in docker_ci.sh script for building arm images by buildx. It will firstly set up environments. Then use the buildx tool to build the envoyproxy/envoy arm images on x86 platform. 2. Modify the docker build job for building multi-arch images. It will firstly download the arm64 and amd64 envoy binaries. Then invoke the docker_ci.sh scripts to generate images. Risk Level: Medium (of breaking images) Testing: CI Docs Changes: N/A Release Notes: Added Fixes envoyproxy#1861 Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
In this patch, it will enable the envoyproxy/envoy arm image to build in community arm CI environments. 1. Do some modifications in docker_ci.sh script for building arm images by buildx. It will firstly set up environments. Then use the buildx tool to build the envoyproxy/envoy arm images on x86 platform. 2. Modify the docker build job for building multi-arch images. It will firstly download the arm64 and amd64 envoy binaries. Then invoke the docker_ci.sh scripts to generate images. Risk Level: Medium (of breaking images) Testing: CI Docs Changes: N/A Release Notes: Added Fixes envoyproxy#1861 Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
In this patch, it will enable the envoyproxy/envoy arm image to build
in community arm CI environments.
buildx tool to build the envoyproxy/envoy arm images on x86 platform.
invoke the docker_ci.sh scripts to generate images.
Signed-off-by: Jingzhao Jingzhao.Ni@arm.com
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
In this PR, we enable the envoyproxy/envoy arm64 image on Envoy CI system.
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]