Open ErikSchierboom opened 3 months ago
@ErikSchierboom Working on this. Currently trying to figure out how to register qemu inside the container. Before I go to far with this, do we just need to use an x86-64 container and still run and register qemu outside the container or does qemu need to be installed inside the container? From the terraform, it looks like we use ECS. Just don't know if we can install qemu on specific nodes in cluster, and run the container only on those nodes? Or if we need to be able to run on any node in the cluster? Sorry about getting down in the weeds here.
Is it possible to just have it in the container?
Although possible, probably not a good idea. It appears the container would have to run in privileged mode so it has access to the host. Obviously not good from a security standpoint and I am not sure we can do that with managed infra.
If it would help, I am happy to take a look at the infra repos and put a PR together to add arm64 support. Obviously that would still require significant effort from more than just me so I am not sure if we want to do that.
Although possible, probably not a good idea. It appears the container would have to run in privileged mode so it has access to the host. Obviously not good from a security standpoint and I am not sure we can do that with managed infra.
Okay. What would need to be installed on the host for the emulation to work?
If it would help, I am happy to take a look at the infra repos and put a PR together to add arm64 support. Obviously that would still require significant effort from more than just me so I am not sure if we want to do that.
No sorry, we don't want to do that.
So we need to have
yum install -y qemu binfmt-support qemu-user-static
in the host image. We will also probably need to run
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
to automatically handle binaries for different architectures. I think you would need to install, run the docker command and then create a custom AMI from that. I realize this is a big change to just support one more track so I am not sure it's appropriate. I just don't currently know another way.
Okay, we'll have a think and see if that would work for us or not.
We're currently somewhat limited on time so maybe we can, for now, have the track launch without an ARM runner.
In that case, there would not be an online editor so the student would just need to develop locally correct? I might need some help on where and how to document that so there is not a lot of confusion.
That is correct!
We've tried getting an ARM image running on our infrastructure, but it doesn't (yet) work. It would require a lot of effort, which we don't have the time or resources for at the moment. The best alternative is probably to convert the test runner's Docker image to be an x86-64 based on and then use emulation to run the tests. It's not great, but it's the best option for now.