-
Notifications
You must be signed in to change notification settings - Fork 170
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
Building FCOS with qemu-user-static for different architectures #2248
Comments
Agreed, it may not even be really hard to add support for cross-arch builds. Since cosa already uses qemu/kvm I think the strategy that would make the most sense is for us to support running crossarch qemu for our internal bits, instead of trying to run the whole thing under podman+qemu. |
@cgwalters Not sure if I understood everything correctly. Do you mean that you would prefer dropping podman support in favor of running everything directly on the build host? If that is the case, I would like to argue that being able to build coreos-assembler from scratch with podman for different architectures allows users to embed the container build process in a k8s cluster with some tweaks and leverage the clusters resources to speed up everything. |
Sure, you can do builds of COSA via Take a look at https://github.com/coreos/coreos-assembler/tree/main/docs/gangplank which allows for starting a build on one-arch but doing the work in another place (Kube/OpenShift, Podman remote). Gangplank is how FCOS is building |
Feature Request
From my point of view, support for different architectures besides x86_64 is becoming increasingly important but it seems that the coreos-assembler container image does not support that yet. This means that one has to build the container image from scratch for the target architecture for any other architecture than x86_64, even though one might lack a proper build machine running on aarch64 for example.
At this stage not many options are left, one of them is using qemu-user-static but it is not supported out of the box and requires changes to coreos-assembler code base. An example implementation of what I am trying to achieve for aarch64 can be seen here, even though it does not work due to some limitations in coreos-assembler.
Desired Feature
I would love to see two things:
Add support for qemu-user-static that does not require patching of the coreos-assembler source code
Provide a multi-arch container image for coreos-assembler on quay.io that can be used by other to build their own custom FCOS on different architectures
Example Usage
This boils down to the following:
sudo podman run --rm --pull always --privileged registry.hub.docker.com/multiarch/qemu-user-static:latest --reset -p yes podman build --arch ${COREOS_ARCHITECTURE} -f target/src/coreos-assembler/Dockerfile -t localhost/coreos-assembler target/src/coreos-assembler/
Where:
${COREOS_ARCHITECTURE}
- Target architecture such asaarch64
ors390x
Where:
${COREOS_ARCHITECTURE}
- Target architecture such asaarch64
ors390x
${CMD}
- Somecosa
commandOther Information
None.
The text was updated successfully, but these errors were encountered: