Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Provide arm64 images for M1/M2 Macs #1069

Open
jmbowman opened this issue May 16, 2023 · 9 comments
Open

Provide arm64 images for M1/M2 Macs #1069

jmbowman opened this issue May 16, 2023 · 9 comments
Assignees

Comments

@jmbowman
Copy link
Contributor

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).

@salman2013
Copy link
Contributor

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:

  1. Build the images on arm64 architecture, I build images on the M2 machine which build all image on arm64 by default.
  2. I updated the images name in devstack compose file with the local build images.
  3. 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.0

Output (output shows much information but i and showing here just the architecture information for reference)

"Id": "sha256:2987375a153a2705ddbb3fa14bbb0dcc5ef989169045690dc79e4edba617d31f",
"RepoTags": [
"edxplatform:1.0"
],
"Architecture": "arm64",

@UsamaSadiq
Copy link
Contributor

UsamaSadiq commented Jun 2, 2023

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.

@salman2013
Copy link
Contributor

salman2013 commented Jun 7, 2023

Current status on the second module:
Update the docker-push workflows in the services to also build & publish images for the arm64 architecture on DockerHub

i 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.

@UsamaSadiq
Copy link
Contributor

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 ( arm64 or amd64)

@salman2013
Copy link
Contributor

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.

@salman2013
Copy link
Contributor

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.

@salman2013
Copy link
Contributor

salman2013 commented Jul 11, 2023

I have created PR on the following repositories
credentials https://github.com/openedx/credentials
edx-platform lms, cms https://github.com/openedx/edx-platform
edx-notes-api https://github.com/openedx/edx-notes-api

Following 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_service https://github.com/openedx/cs_comments_service
This repo is not updated with the docker file.

@UsamaSadiq
Copy link
Contributor

Merged the PR for credentials repo openedx/credentials#2023.

@salman2013
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants