Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add arm64-platform support (e.g. for Apple Silicon processors) to docker-image #3501

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sjorek
Copy link

@sjorek sjorek commented Feb 19, 2023

What this PR does

This PR adds arm64-platform support (e.g. for Apple Silicon processors) to typo3solr/ext-solr docker-image. Therefore several changes were neccessary:

  • Update all required github-actions in .github/workflow/ci.yml
  • Add a new publish-docker-hub job to the pipeline
    • Reuse the cached solrci-image image artifact from the test-job for linux/amd64 (Intel & Co.) platforms
    • Build typo3solr/ext-solr image with the additional linux/arm64 (Apple Silicon) platform
    • I tried my best to guess which (kind of) git-tag and -branch corresponds to which docker-image tag in your current docker-hub build setup
      • The current git-tag/-branch to docker-image tag mapping is:
        | git-branch or -tag | docker image-tag(s) |
        |--------------------|---------------------|
        | main               | latest              |
        | release-11.5.x     | release-11.5.x      |
        | release-11.2.x     | release-11.2.x      |
        | release-11.0.x     | release-11.0.x      |
        | release-10.0.x     | release-10.0.x      |
        | 11.5.1             | 11.5.1, 11.5, 11    |(†)
        | 11.2.1             | 11.2.1, 11.2        |(†)
        | 10.0.1             | 10.0.1, 10.0, 10    |(†)
        | 11.5.0-rc-1        | 11.5.x-dev          |
        | 11.2.0-alpha-1     | 11.2.x-dev          |
        | 11.0.0-beta-1      | 11.0.x-dev          |
        (†) git-tags without pre-release suffix produce three docker image-tags, if they represent the latest release of its MAJOR version, otherwise they produce only two docker-image tags.
  • Rename the publish-job to publish-typo3-ter, to avoid confusion, with the new publish-docker-hub job.

New GitHub Action environment-variables and secrets

  • two new secrets are needed:
    DOCKERHUB_USERNAME : "typo3solr"
    DOCKERHUB_TOKEN    : "DOCKERHUB_PERSONAL_ACCESS_TOKEN"
  • three new environment-variables
    DOCKER_PLATFORMS  : "linux/amd64,linux/arm64"
    DOCKER_IMAGE_NAME : "${{ secrets.DOCKERHUB_USERNAME }}/ext-solr"
    # This one is overridden automatically, based upon branch or tag, see above
    DOCKER_IMAGE_TAGS : ""

How to test

Good question? I tried to test it with https://github.com/nektos/act#readme on Apple Silicon M2 Max and Mac OS Ventura 13.2.1. This brought me surprisingly far, but in the end I had no luck, as the cibuild_docker.sh always fails in the assertDataPathIsCreatedByApacheSolr function. This is still confusing to me, as this does not seem to be related with this PR at all.

Hope we can finish this (or another) solution together?

Cheers,
Stephan


As soon as everything ist running, this PR …
Fixes: #2891

@dkd-kaehm
Copy link
Collaborator

@sjorek
Wow,
Thanks for kick-starting that PR.
We'll proceed with it in TYPO3 12 compatibility task.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@dkd-kaehm dkd-kaehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjorek @brandung-sjorek
Thanks for your work, it looks really good.
@dkd-friedrich approved the patch as well.

We must make test on docker hub by some test account to avoid any troubles with current builds and setup of automated builds on Docker hub.
I'm currently a fully involved on TYPO3 12 compatibility task,
therefore we'll look and test it a little bit later.

@sjorek
Copy link
Author

sjorek commented Feb 25, 2023

@dkd-kaehm Good news, I'll keep my fingers crossed, while I'm still trying to pass the cibuild_docker.sh tests in the local act run. All tests except assertDataPathIsCreatedByApacheSolr are passing - which means solr is per se working. There is something strange going on with the local volume - I bet it's either the way act works or something with the multiarch support, when running act on Apple Silicon.

Let me know if I can be of any help.

…rs) to docker-image

This PR also updates all required actions in .github/workflow/ci.yml and adds a new
publish-docker-hub job to the pipeline.

Fixes: TYPO3-Solr#2891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add arm support (e.g. for new Apple M1 processors) for Docker image
3 participants