-
Notifications
You must be signed in to change notification settings - Fork 425
Add basic support for Apple Silicon #852
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# These overrides allow Open edX devstack to run on ARM64 systems like the M1 Macs (Apple Silicon) | ||
# However, these amd64 images are likely to be very slow. We should replace them with ARM64 versions | ||
# as much as possible. | ||
version: "2.1" | ||
|
||
services: | ||
|
||
chrome: | ||
platform: linux/amd64 | ||
|
||
coursegraph: | ||
platform: linux/amd64 | ||
|
||
devpi: | ||
platform: linux/amd64 | ||
|
||
elasticsearch: | ||
platform: linux/amd64 | ||
|
||
# elasticsearch7: | ||
# image: elasticsearch:7.8.1 is available in linux/arm64/v8 | ||
|
||
# elasticsearch710: | ||
# image: elasticsearch:7.10.1 is available in linux/arm64/v8 | ||
|
||
firefox: | ||
platform: linux/amd64 | ||
|
||
# memcached: | ||
# image: memcached:1.5.10-alpine is available in linux/arm64/v8 | ||
|
||
# mongo: | ||
# image: mongo:4.2.14 is available in linux/arm64/v8 | ||
|
||
mysql57: | ||
#image: mysql:5.7 doesn't support linux/arm64/v8 | ||
image: mariadb:10.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see you are using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't try it, so I'm not sure. Based on my experience with the other images, I suspect it would work fine, but all the database queries would be a bit slower, degrading overall performance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For what it's worth, the MySQL 8 images published by Oracle support arm64/v8: https://hub.docker.com/r/mysql/mysql-server/tags |
||
|
||
redis: | ||
# image: redis:2.8 is ancient and doesn't support linux/arm64/v8 | ||
image: redis:5 | ||
Comment on lines
+39
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How much were you able to test this change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't yet done extensive tests. Only basic things like logging into the LMS, using the django admin, and running parts of the test suite. However, so far I haven't encountered any issues. |
||
|
||
# ================================================ | ||
# edX services | ||
# ================================================ | ||
|
||
credentials: | ||
platform: linux/amd64 | ||
|
||
discovery: | ||
platform: linux/amd64 | ||
|
||
ecommerce: | ||
platform: linux/amd64 | ||
|
||
edx_notes_api: | ||
platform: linux/amd64 | ||
|
||
forum: | ||
platform: linux/amd64 | ||
|
||
lms: | ||
platform: linux/amd64 | ||
|
||
insights: | ||
platform: linux/amd64 | ||
|
||
analyticsapi: | ||
platform: linux/amd64 | ||
|
||
registrar: | ||
platform: linux/amd64 | ||
|
||
registrar-worker: | ||
platform: linux/amd64 | ||
|
||
studio: | ||
platform: linux/amd64 | ||
|
||
xqueue: | ||
platform: linux/amd64 | ||
|
||
xqueue_consumer: | ||
platform: linux/amd64 | ||
|
||
# edX Microfrontends all use node:12 which has linux/arm64/v8 builds. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the MFEs have an issue too; As suggested in the issue above, one can work around this for now by setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this should be opt-in. I can't think of why someone with apple silicon would not want to do this, but putting this comment here in case someone reading this can think of a reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well the result is pretty slow. But it works, and it's definitely better than not having a devstack at all on M1 Mac.
I am dissatisfied with the performance though, which is why I've now tried building a native ARM image for edxapp instead. If I could get that working, I'd definitely change the PR to use that approach instead. I hit a roadblock, which I think is due to the old version of ansible being used.