Page MenuHomePhabricator

Create arm64 image variants of releng/dev-images used by MediaWiki-Docker
Open, Needs TriagePublic

Description

Developers on Apple M​1 systems or other systems using arm64 would benefit from this. For Docker for Mac users in particular, having an arm64 variant of the image seems like a prerequisite for any hope of reasonable performance. {{citation needed}}

Event Timeline

Maybe we use https://docs.docker.com/buildx/working-with-buildx? I guess we would have to integrate that with docker-pkg ?

docker-pkg has a parameter already for architecture, it just needs to be defined as a flag to pass to the CLI. But as noted in T274140: Create and publish arm64 images of wikimedia-stretch and wikimedia-buster we first need base images of wikimedia-stretch.

What I've tried:

  • modified docker-pkg to specify platform=arrm64
  • Built my own wikimedia-stretch image with a crude Dockerfile
FROM arm64v8/debian:stretch

COPY wikimedia-stretch.pub.gpg /etc/apt/trusted.gpg.d/wikimedia.asc

RUN apt-key add /etc/apt/trusted.gpg.d/wikimedia.asc
  • Built that image with docker buildx build --platform=linux/arm64 -t docker-registry.wikimedia.org/dev/wikimedia-stretch:latest .
  • Then removed all the wikimedia images I have locally, and with releng/dev-images repo, run docker-pkg -c dockerfiles/config.yaml build --select '*stretch-php72*' --no-pull --use-cache dockerfiles

The apt-get update command to install the initial set of PHP packages breaks with:

N: Skipping acquire of configured file 'component/php72/binary-arm64/Packages' as repository 'https://apt.wikimedia.org/wikimedia stretch-wikimedia InRelease' doesn't support architecture 'arm64'

Per T274140, it doesn't seem like making arm64 variants of our images is going to be possible. So I think the alternative is to consider using e.g. arm64v8/debian as our starting point.

I noticed Oracle Cloud added ARM VMs and servers and is offering a four-core, 24GB VM (or smaller equivalents) as part of the free tier. Could be useful for developers who don't have an arm64 dev box (or server) on their hands. Note for anyone trying this: your "home region" selection determines where free services are provisioned.

(Had been thinking about using this for a Wikibase (3rd party installations) stack - though it may require T273814/T280482, since arm64 support was only added in Elasticsearch 7.8.x.)

They also have a "$30,000 in credits for 12 months" offer for "Qualified open source developers, researchers, and industry partners...to help expand the Arm ecosystem or solve the next scientific problem faster." Might be claimable by WMF, and avoid paying for hardware 'til you know what's needed?

I noticed Oracle Cloud added ARM VMs and servers and is offering a four-core, 24GB VM (or smaller equivalents) as part of the free tier. Could be useful for developers who don't have an arm64 dev box (or server) on their hands. Note for anyone trying this: your "home region" selection determines where free services are provisioned.

(Had been thinking about using this for a Wikibase (3rd party installations) stack - though it may require T273814/T280482, since arm64 support was only added in Elasticsearch 7.8.x.)

They also have a "$30,000 in credits for 12 months" offer for "Qualified open source developers, researchers, and industry partners...to help expand the Arm ecosystem or solve the next scientific problem faster." Might be claimable by WMF, and avoid paying for hardware 'til you know what's needed?

Thanks for finding that info. I would be hesitant to commit to that but it's something for Release-Engineering-Team to consider.

For ElasticSearch 6, I managed to cobble together an arm64 compatible image: https://gitlab.wikimedia.org/kharlan/wmf-elasticsearch-arm64

I noticed Oracle Cloud added ARM VMs and servers and is offering a four-core, 24GB VM (or smaller equivalents) as part of the free tier. Could be useful for developers who don't have an arm64 dev box (or server) on their hands. Note for anyone trying this: your "home region" selection determines where free services are provisioned.

(Had been thinking about using this for a Wikibase (3rd party installations) stack - though it may require T273814/T280482, since arm64 support was only added in Elasticsearch 7.8.x.)

They also have a "$30,000 in credits for 12 months" offer for "Qualified open source developers, researchers, and industry partners...to help expand the Arm ecosystem or solve the next scientific problem faster." Might be claimable by WMF, and avoid paying for hardware 'til you know what's needed?

Thanks for finding that info. I would be hesitant to commit to that but it's something for Release-Engineering-Team to consider.

For ElasticSearch 6, I managed to cobble together an arm64 compatible image: https://gitlab.wikimedia.org/kharlan/wmf-elasticsearch-arm64

Building the ElasticSearch 7.10.2 image for arm64 is much easier, since ElasticSearch upstream has an arm64 compatible image: https://gitlab.wikimedia.org/kharlan/wmf-elasticsearch-arm64 has the updated information.

Hi! I managed to build the whole chain of images down to buster-php74-fpm using docker-pkg, see instructions. I tested the images by using them in a test setup for extensions/CirrusSearch.

Hi! I managed to build the whole chain of images down to buster-php74-fpm using docker-pkg, see instructions.

Is that paste intended to be open to all? It says I don't meet the "Can View" permissions.

Is that paste intended to be open to all? It says I don't meet the "Can View" permissions.

The paste is currently set to only allow members of WMF-NDA to read it. I don't see anything in the content that feels necessary to restrict readership, but I'll leave it to @pfischer to decide to open up their work or not.

@GreenReaper, I removed the restrictions.

Thank you, but I still get the same message, even when I tried to login again via a private tab to clear cookies:

Access Denied: Restricted Paste
You do not have permission to view this object.
Users with the "Can View" capability:
This object has a custom policy controlling who can take this action.
The author of a paste can always view and edit it.

Sorry for the hassle. ^^'

@GreenReaper, no worries, I could not change the visibility afterwards, so here's a copy that is public.

It may not be the most performant, but I've had luck using this for spinning up mediawiki via docker on my M1:

I'd love for there to be ARM64 images, but I'm not familiar enough with the pipeline which builds these images and what would need to change to produce them...

For what is worth, SRE had an arm64 related session in the recent SRE summit. I 've tried to capture it in T320811. It doesn't answer or help with the current problems listed here, but it might help to know that we are starting to come up with plans to address this down the line.