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

Support for ARM64 #343

Merged
merged 4 commits into from
Sep 29, 2021
Merged

Support for ARM64 #343

merged 4 commits into from
Sep 29, 2021

Conversation

ntwb
Copy link
Contributor

@ntwb ntwb commented Sep 19, 2021

Follow up to #252

This PR was created using Altis v8 with local-server release candidate 8.1.0-rc here

Notes:

  • All images are native ARM64, no containers run under emulation
  • All images except for Mailhog are using the original Docker base image
  • Minio ~12 months ago bumped MC to v10 when multi-arch images began being built, hence the v10 config bump
  • I've used latest for Docker images here for simplicity, pinning to specific releases would be required for release
  • I'm using mysql/mysql-server:8.0, rather than MariaDB, solely because I have a client project where I'm using this daily, I think the suggestion has been to prefer MariaDB over MySQL v8?

Testing

From the dashboard -> tools menu e.g. https://subdomain.altis.dev/wp-admin/tools.php
image

@ntwb ntwb mentioned this pull request Sep 19, 2021
@joehoyle
Copy link
Member

I'm using mysql/mysql-server:8.0, rather than MariaDB, solely because I have a client project where I'm using this daily, I think the suggestion has been to prefer MariaDB over MySQL v8?

I think this is due to compatibility, the assumption being that Maria would be closer to MySQL 5.7 in terms of compat. We will need to switch Altis Cloud to MySQL 8 at some point . I don't believe AWS Aurora MySQL supports 8 yet, so I don't think we'd be switching for some time though.

@roborourke
Copy link
Contributor

That minio error is kinda telling: exist.minios3-subdomain/minious-east-xxxxxxxxxxx

I think it'll work with a slash on the end eg. https://s3-subdomain.altis.dev/minio/ - if the admin tools menu link is missing that then we should add it. Maybe it's some change in minio 10. Let me know if that sorts it anyway. Maybe some other Minio admin related stuff has changed.

@roborourke
Copy link
Contributor

I'll go through an make tagged releases for anything referencing latest here unless they already exist.

The MySQL 8 issue seems to be the major hurdle here. Local databases will need to be recreated to use it iirc.

We could try this image in the interim https://hub.docker.com/r/biarms/mysql - not official but has a lot of pulls / usage.

Copy link
Contributor

@roborourke roborourke left a comment

Choose a reason for hiding this comment

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

I think this should cover it

inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
@ntwb
Copy link
Contributor Author

ntwb commented Sep 21, 2021

That minio error is kinda telling: exist.minios3-subdomain/minious-east-xxxxxxxxxxx

I think it'll work with a slash on the end eg. https://s3-subdomain.altis.dev/minio/ - if the admin tools menu link is missing that then we should add it. Maybe it's some change in minio 10. Let me know if that sorts it anyway. Maybe some other Minio admin related stuff has changed.

It did not, same error though there's now a / between minio and the AWS region:

NoSuchKeyThe specified key does not exist.minio/s3-subdomain/minio/us-east-xxxxxxxxxxx

And correct, the tools menu item doesn't include the trailing slash...

@ntwb
Copy link
Contributor Author

ntwb commented Sep 21, 2021

Thanks, I'll go through and update images in the coming days, I should be able to dump my database and try with that MySQL v5.7 build also.

@roborourke
Copy link
Contributor

It did not, same error though there's now a / between minio and the AWS region:

Cheers for confirming, will need to dig into the config then. There's a bit of faffing around to get the URLs to play nicely.

@rmccue
Copy link
Member

rmccue commented Sep 22, 2021

n.b. I made some slight improvements to the Minio/AWS SDK configuration in #341 that might be worth looking at here; in particular, changing the Minio hostname and the SDK config to avoid dynamically building hostnames.

@roborourke roborourke changed the title Support for ARM64 - Stephen Support for ARM64 Sep 22, 2021
@joehoyle
Copy link
Member

I noticed in https://github.com/humanmade/altis-local-server/blob/arm64-support-stephen/inc/composer/class-command.php#L706 too we reference a version of minio, does that need to be updated?

@roborourke roborourke marked this pull request as ready for review September 28, 2021 13:40
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
inc/composer/class-docker-compose-generator.php Outdated Show resolved Hide resolved
@joehoyle
Copy link
Member

Ok I can confirm I'm working, with all ARM containers (I did some manual fix-ups to the above missing images):

I wrote a quick bash script to verify (all dev_ containers for example).

docker ps | grep dev_ | awk '{print $1}' | xargs -I _ docker inspect _ -f '{{.Config.Image}}' | xargs -I z docker image inspect z -f '{{.Architecture}}'
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
arm64
amd64

The amd64 one at the end is 565b39f66056 mutagenio/sidecar:latest "/usr/bin/mutagen-si…" 35 minutes ago Up 35 minutes dev_mutagen_1 I'm not actually sure why I'm getting that though, because I didn't think I have mutagen on. However, do we need to look for that.

@roborourke
Copy link
Contributor

Ah ok, it won't be used unless you pass the --mutagen flag.

What version of the mutagen beta do you have installed? It looks like multiarch builds should be available with the 0.12.0 beta https://hub.docker.com/r/mutagenio/sidecar/tags

@roborourke roborourke requested a review from joehoyle September 29, 2021 08:08
@roborourke
Copy link
Contributor

For what it's worth mutagen is still an experimental feature so I don't see that as a blocker for this.

@ntwb
Copy link
Contributor Author

ntwb commented Sep 29, 2021

Yeah, I've been using mutagen locally, unsure how to fully test, but nothing seems to break, latest arm64 links and instructions are in the nightly docs too

@ntwb
Copy link
Contributor Author

ntwb commented Sep 29, 2021

I noticed in arm64-support-stephen/inc/composer/class-command.php#L706 too we reference a version of minio, does that need to be updated?

I suspect so, I missed updating this, once minio was bumped to 10 here these builds began working, on 9 the container constantly crashed https://github.com/humanmade/altis-local-server/pull/343/files#diff-9c62893c068f43a8f846f52604e52ced6c8278a8cd2216ac4060e2f052dbf9edR2

@@ -91,7 +91,7 @@ protected function get_php_reusable() : array {
'condition' => 'service_started',
],
],
'image' => 'humanmade/altis-local-server-php:4.0.0-dev',
'image' => 'humanmade/altis-local-server-php:4.2.0',
Copy link
Member

Choose a reason for hiding this comment

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

@roborourke -dev IIRC is the dev container, not a "dev version" that has xdebug intsalled: https://github.com/humanmade/docker-wordpress-php/blob/master/Dockerfile-dev. Did we stop using -dev just for the tag (and it's built from -dev?)-- sorry I can't remember but wanted to check, as I think it might have even been me who made that change!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah gotcha, yeah so the GitHub workflow uses the Dockerfile-dev file to build. It wasn't a dev container - it was always just used to reference the version that had Xdebug installed. I think that's fine personally as Xdebug 3 can be present and have minimal impact. Plus we don't use the builds on Docker hub on our infrastructure.

Copy link
Contributor

@roborourke roborourke Sep 29, 2021

Choose a reason for hiding this comment

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

I didn't make that particular change, I just didn't notice it earlier - I thought we still had the regular tag and tag + -dev with Xdebug being built and pushed up.

The -dev suffix was previously how we toggled between a container with Xdebug and one without, but we use the XDEBUG_MODE env var to switch it on or off now.

@roborourke roborourke dismissed joehoyle’s stale review September 29, 2021 15:16

Container versions are all correct now, confirmed working

@roborourke roborourke merged commit 2a9cf9f into master Sep 29, 2021
@roborourke roborourke deleted the arm64-support-stephen branch September 29, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants