-
Notifications
You must be signed in to change notification settings - Fork 387
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
Migrate Arm image building and testing to this repo #6453
Comments
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
I have been experimenting with the Github-hosted arm runners provided by the CNCF. At the moment, I am running into an issue where I cannot get the arm/v7 version of the Docker images to build on the arm runners, which use the aarch64 architecture. Most aarch64 CPUs which use the Armv8-A architecture are compatible with 32-bit arm/v7 binaries, and we actually leverage this in our current setup which uses self-hosted aarch64 runners. However, with the Github-hosted runners (which also use the Ampere platform), I keep getting the following error when building the antrea-openvswitch image:
The echo command was added by me to the Dockerfile, to show that commands can run successfully. But running We can wait a bit and see if the issue gets resolved as software is updated on the runners. We could also try qemu emulation to build the arm/v7 images, and see if it is fast (enough) on aarch64. |
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
The issue described in #6453 (comment) appears to have been resolved. The arm/v7 image can build successfully on the arm64 workers provided by the CNCF. I can probably make progress on this issue now. |
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. As part of this change, we also push "base images" (antrea/openvswitch, antrea/base-ubuntu) for arm64 and arm/v7 to the registry. This is necessary for building the Antrea images with the Docker container build driver. The base images now have the architecture as a suffix in their names. They are not available as multi-platform image manifests. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. As part of this change, we also push "base images" (antrea/openvswitch, antrea/base-ubuntu) for arm64 and arm/v7 to the registry. This is necessary for building the Antrea images with the Docker container build driver. The base images now have the architecture as a suffix in their names. They are not available as multi-platform image manifests. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. As part of this change, we also push "base images" (antrea/openvswitch, antrea/base-ubuntu) for arm64 and arm/v7 to the registry. This is necessary for building the Antrea images with the Docker container build driver. The base images now have the architecture as a suffix in their names. They are not available as multi-platform image manifests. For antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Github-hosted Arm runners are now in Beta for Enterprise accounts, and available to all CNCF projects. We can use them to build Antrea Arm images for the Agent and Controller, instead of relying on a private Github repo with self-hosted Arm runners. At the moment, we only migrate the building part (along with creation of the multi-image manifest), and we use the existing workflow in vmware-tanzu/antrea-build-infra for "asynchronous" testing of the Arm images. We will handle the migration of the testing part in the future. As part of this change, we also push "base images" (antrea/openvswitch, antrea/base-ubuntu) for arm64 and arm/v7 to the registry. This is necessary for building the Antrea images with the Docker container build driver. The base images now have the architecture as a suffix in their names. They are not available as multi-platform image manifests. For #6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
This is a follow-up to #6486, which added support for building Antrea Arm images in the antrea-io/antrea repo, using Github-hosted Arm runners. With this change, we will also be testing Arm images in this repo, hence finishing to remove our dependency on a private reposiotry, with self-hosted runners (vmware-tanzu/antrea-build-infra). This change is very small, as we re-use the existing conformance.yml workflow, and add a dispatch step to the build.yml and build_tag.yml workflows (same repo dispatch, instead of dispatching to vmware-tanzu/antrea-build-infra, as was the case previously). Using Sonobuoy, we run the conformance test suite every time the main branch is updated, as well as for every release. Unfortunately, we have to re-build the image before running the tests, but thanks to caching it only represents a small amount of time. We also remove some deprecated maintainer documentation. Fixes #6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
This is a follow-up to #6486, which added support for building Antrea Arm images in the antrea-io/antrea repo, using Github-hosted Arm runners. With this change, we will also be testing Arm images in this repo, hence finishing to remove our dependency on a private reposiotry, with self-hosted runners (vmware-tanzu/antrea-build-infra). This change is very small, as we re-use the existing conformance.yml workflow, and add a dispatch step to the build.yml and build_tag.yml workflows (same repo dispatch, instead of dispatching to vmware-tanzu/antrea-build-infra, as was the case previously). Using Sonobuoy, we run the conformance test suite every time the main branch is updated, as well as for every release. Unfortunately, we have to re-build the image before running the tests, but thanks to caching it only represents a small amount of time. We also remove some deprecated maintainer documentation. Fixes #6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
This is a follow-up to antrea-io#6486, which added support for building Antrea Arm images in the antrea-io/antrea repo, using Github-hosted Arm runners. With this change, we will also be testing Arm images in this repo, hence finishing to remove our dependency on a private reposiotry, with self-hosted runners (vmware-tanzu/antrea-build-infra). This change is very small, as we re-use the existing conformance.yml workflow, and add a dispatch step to the build.yml and build_tag.yml workflows (same repo dispatch, instead of dispatching to vmware-tanzu/antrea-build-infra, as was the case previously). Using Sonobuoy, we run the conformance test suite every time the main branch is updated, as well as for every release. Unfortunately, we have to re-build the image before running the tests, but thanks to caching it only represents a small amount of time. We also remove some deprecated maintainer documentation. Fixes antrea-io#6453 Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
Antrea has had support for the arm64 and arm/v7 platforms for a while now.
antrea/antrea-agent-ubuntu
andantrea/antrea-controller-ubuntu
are multi-platform image manifests.The way the build is currently structured is as follows:
main
branch is updated, a Github workflow runs and invokes./hack/build-antrea-linux-all.sh --pull --push-base-images
. The workflow then tags and pushesantrea/antrea-agent-ubuntu-amd64
andantrea/antrea-controller-ubuntu-amd64
. At this point, the multi-platform manifests have not been updated.vmware-tanzu/antrea-build-infra
). This repository supports a handful of self-hosted Arm64 runners. The repository is private as a public repo with non-ephemeral self-hosted runners would not be secure (https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#self-hosted-runner-security). The runners are graciously provided by OSUOSL which supports multiple open-source projects.arm64
(antrea/antrea-agent-ubuntu-arm64
,antrea/antrea-controller-ubuntu-arm64:latest
) andarm/v7
(antrea/antrea-agent-ubuntu-arm
,antrea/antrea-controller-ubuntu-arm:latest
). Note that an Arm64 machine can build 32-bit Arm artifacts without emulation. At that point, the multi-platform manifest is created and pushed to the registry. This completes the process of updatingantrea/antrea-agent-ubuntu:latest
andantrea/antrea-controller-ubuntu:latest
.vmware-tanzu/antrea-build-infra
) is triggered to test the Arm images, on the same set of self-hosted Arm64 runners.The same process is used for Antrea tagged releases.
The drawbacks of the current approach are:
make
after cloning the Antrea repository, as we do not automatically push base images for Arm platforms to the registry. Instead, contributors need to run./hack/build-antrea-linux-all.sh
, at least the first time they build Antrea (and later on, if they want up-to-date base images). There is no registry-based build cache for base images for Arm either, so they have to build everything from scratch (which is not that long).The alternative considered when Arm support was introduced was to use QEMU emulation to build the multi-platform images. This would only be practical if we built OVS, and potentially the Antrea Go binaries, without emulation, using cross-compilation support from the C and Go compilers. Otherwise, building OVS for Arm using QEMU would take way too much time. This would require making the build (Dockerfiles) more complex and harder to maintain. Even then, the build would be slow, as other things such as installing system packages / dependencies could take a while. As for testing, emulation is just not practical.
Even today, emulation is unlikely to be a good option for us. But recently there has been some interesting developments, with the availability (or upcoming availability) of hosted native Arm64 runners for Github workflows:
Using one of these options, we would no longer need to manage self-hosted Arm64 runners. We could also move all of the build infrastructure to this repository, and remove the dependency on
vmware-tanzu/antrea-build-infra
(at least for building, we may initially want to keep testing the Arm-based Antrea images using the OSUOSL machines, to keep our Github runners usage low).I am currently asking the CNCF if option 2 (Github-hosted Arm64 runners) is available for CNCF projects. I will update this issue once I find out.
Edit: according to CNCF staff, this is already enabled and available to all projects under the CNCF Github Enterprise account, so option 2 is something we could pursue right away. I have not tested it yet.
The text was updated successfully, but these errors were encountered: