Repository navigation
Provide arm64 images for M1/M2 Macs #1069
Description
Activity
I built the following devstack images on arm64 architecture and tested them by accessing the browser locally. They are working fine as expected.
- edx.devstack.lms
- edx.devstack.studio
- edx.devstack.credentials
How I tested:
- Build the images on arm64 architecture, I build images on the M2 machine which build all image on arm64 by default.
- I updated the images name in devstack compose file with the local build images.
- Build the devstack with the locally updated images.
To confirm the architecture of locally built images we can use the command
docker image inspect [image name]e.g
docker image inspect edxplatform:1.0Output (output shows much information but i and showing here just the architecture information for reference)
"Id": "sha256:2987375a153a2705ddbb3fa14bbb0dcc5ef989169045690dc79e4edba617d31f",
"RepoTags": [
"edxplatform:1.0"
],
"Architecture": "arm64",Milestones for the current issue:
- Build and test all devstack images locally with arm64 architecture. Run devstack containers using the locally built images to verify everything.
- Update the docker-push workflows in the services to also build & publish images for the arm64 architecture on DockerHub
- Update the devstack pull command to fetch the respective image based on the system architecture.
Current status on the second module:
Update the docker-push workflows in the services to also build & publish images for the arm64 architecture on DockerHubi am trying to push multi-arch(linux/amd64, linuxarm64) docker image with github workflow but not succeeding. The workflow is pushing two images but just for amd64. I discussed this with the SRE team who has already done this job for mysql 5.7 but they mentioned they pushed the image manually not automated it with workflow.
Using the changes in the PR openedx/credentials#2023 we were able to successfully build and push test dev images for credentials on DockerHub. https://hub.docker.com/layers/openedx/credentials-dev/test/images/sha256-ab7ebbe830bd11cab87ee2f98e8081c579738969a760558d9c6beb7f9f13c2fd?context=explore
We have also tested that we don't need to do any changes on the pull commands for devstack images since Docker handles this automatically and pulls the compatible image for the architecture (
arm64oramd64)I was facing some issues to push multi-platform docker images on the docker hub with github actions, I resolved that issue and now successfully created PR for the openedx/credential, there are a few comments on it need to fix them. Now I am working on the edx-platform repo for multi-platform docker images.
https://github.com/openedx/edx-platform/actions/runs/5331274878/jobs/9658906855?pr=32519
I am trying to resolve some issues with edx-platform multi-platform docker images, facing some code understanding issues.
I have created PR on the following repositories
credentialshttps://github.com/openedx/credentials
edx-platformlms,cmshttps://github.com/openedx/edx-platform
edx-notes-apihttps://github.com/openedx/edx-notes-apiFollowing repositories left
course-discovery
ecommerce
@jmbowman as we do not have access to push on these repositories so should we assign these repositories to owning team or create PRs with forks?Blocker:
cs_comments_servicehttps://github.com/openedx/cs_comments_service
This repo is not updated with the docker file.Merged the PR for
credentialsrepo openedx/credentials#2023.I have merged and created multi-arch docker images for the following repositories.
- edx-platform (lms ,cms) (Docker multi-arch images push for linux/amd64, linux/arm64 openedx/openedx-platform#32686)
- credential (Fix for docker multi-arch image openedx/credentials#2077)
Following PRs are waiting to merge from owning teams
There were two previous attempts (#852 and #920) to build devstack images that could run natively on newer ARM-based Apple computers, but both ran into significant problems trying to get working Ansible builds on that architecture. Thanks to the work in #943, we no longer use Ansible to build our devstack images. We should attempt again to build arm64 versions of all our devstack images; Tutor already does this, so it should be feasible (and its Dockerfile templates may serve as a useful reference if problems are encountered).