flink-docker
flink-docker copied to clipboard
[FLINK-14241][test]Add arm64 support for docker e2e test -- work in progress
The docker image openjdk:8-jre
only works for amd64.
When running test on arm64, use arm64v8/openjdk:8-jre
instead.
@zentol can you take a look? Thanks very much
@rmetzger could you please take a look? This block arm64 test for a while. Thanks.
I'm not sure if this PR works as-is. The updated generator doesn't seem to set the architecture flag correctly: https://github.com/apache/flink-docker/pull/23/files#diff-0c5f825c10334c2eff0a90687f513c69R93
also, the architecture seems to depend on the architecture of the machine executing the generate.sh
script. But this script only generates the Dockerfile and metadata file, not the actual docker image.
I'm not sure if this PR works as-is. The updated generator doesn't seem to set the architecture flag correctly: https://github.com/apache/flink-docker/pull/23/files#diff-0c5f825c10334c2eff0a90687f513c69R93
also, the architecture seems to depend on the architecture of the machine executing the
generate.sh
script. But this script only generates the Dockerfile and metadata file, not the actual docker image.
Yeah, many docker images support multi arch now, for example openjdk:11-jre
1. For this kind of image, we don't need to change any code here of cause. Different machine use different image automatically.
But there are still some images don't support arm64, for example, the image openjdk:8-jre
2 which the e2e test uses. For this kind of image, we should use the image from another official repo arm64v8
3.
Now openlab runs flink e2e test on arm64 with my forked flink-docker
repo.4 And the test runs well5
P.S. In openlab test, the swr.ap-southeast-3.myhuaweicloud.com/openlab/arm64v8
is just a mirror for arm64v8
to speed up the test.
I'm sorry that I have to say it again, but I don't think the current approach is correct.
The generate.sh
script generates a Dockerfile and metadata file, then this file is used to create a stackbrew file, which is committed here: https://github.com/docker-library/official-images/blob/master/library/flink.
Then DockerHub does some magic to turn this into the official images.
If we want to add support for arm64 to the official Flink docker images, we probably need to generate an additional Dockerfile and metadata file with an updated FROM, and a correct release.metadata
file.
I believe that your change works on ARM64 with the Flink e2e tests, but this repository is mostly used for building the official Flink docker images, and we need to make sure we are not breaking them with this change.
Oh, I see. I didn't realize that this is used for offcial image build as well.
Yeah, If so, this PR is not correct. I'll find some way to only apply for e2e test. Thanks!!
Great! Thanks!
RocksDB is not currently being built for ARM. We had to manually compile it and override it in the classpath. Kinda hacky but it's the only solution we have until Flink supports it officially.
The latest frocksdb version Flink is using (https://search.maven.org/artifact/com.ververica/frocksdbjni/6.20.3-ververica-1.0/jar) supports Linux aarch64, so you should be able to run Flink on Docker on an M1 mac book (because Docker for Mac is effectively running in a (arm) Linux VM)