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 darwin/arm64 on Apple Silicon #2338

Closed
8 tasks done
rfay opened this issue Jun 25, 2020 · 19 comments · Fixed by #2687
Closed
8 tasks done

Support darwin/arm64 on Apple Silicon #2338

rfay opened this issue Jun 25, 2020 · 19 comments · Fixed by #2687

Comments

@rfay
Copy link
Member

rfay commented Jun 25, 2020

The announcement was made this week that macOS and mac hardware are going to switch to ARM chips.

This has major impact on DDEV-Local. We'll want to be prepared for the new hardware before it is released in Fall, 2020

In order to have DDEV-Local ready for before new hardware comes out, we should

Related: #2322 is about building binary and docker images, and it may come sooner.

@rfay rfay changed the title Prepare for macOS switch to ARM Prepare for macOS switch to ARM; Subscribe to Quick Start program Jun 25, 2020
@unn
Copy link
Contributor

unn commented Jun 29, 2020

FYI @cyberswat

@rfay
Copy link
Member Author

rfay commented Jul 8, 2020

@cyberswat did submit the application for the program, thanks!

@cyberswat
Copy link
Contributor

Still have not received a response on this.

@rfay rfay changed the title Prepare for macOS switch to ARM; Subscribe to Quick Start program Prepare for macOS switch to ARM64; Subscribe to Quick Start program Aug 21, 2020
@unn
Copy link
Contributor

unn commented Aug 21, 2020

It appears that our application was withdrawn or rejected for some reason. We should reapply.

@rfay
Copy link
Member Author

rfay commented Sep 9, 2020

The application was accepted, but when we got the email, it had like a 24-hour deadline and it was missed among all the other email.

@cyberswat has resubmitted the application, hopefully we'll do better this time.

Quite a significant amount of build-reorganization will need to be done, as the assumption of amd64 is wired into all the builds.

rfay added a commit that referenced this issue Sep 27, 2020
@rfay
Copy link
Member Author

rfay commented Nov 5, 2020

gotip (upcoming v1.16) now has darwin/arm64:

rfay@rfay-mbp-2017:~/sdk/gotip/bin$ go tool dist list | grep darwin
darwin/amd64
darwin/arm64

@rfay
Copy link
Member Author

rfay commented Nov 8, 2020

We will purchase Apple Silicon as soon as it's available; gotip already builds arm64 binary, but of course we have nowhere to run it.

@rfay rfay changed the title Prepare for macOS switch to ARM64; Subscribe to Quick Start program Support darwin/arm64 on Apple Silicon Nov 8, 2020
@rfay rfay added this to the v1.17 milestone Nov 8, 2020
@rfay
Copy link
Member Author

rfay commented Nov 21, 2020

We now have a macbook Pro with Apple Silicon.

Current situation explained in https://www.ddev.com/ddev-local/arm64-apple-silicon-m1-ddev-local-what-does-it-all-mean/ - but the biggest issue is ddev can't work until Docker Desktop does. Waiting for Docker (see blog).

@mglaman
Copy link
Contributor

mglaman commented Nov 24, 2020

@rfay I have an Apple Silicon machine as well and can test as well!

@rfay
Copy link
Member Author

rfay commented Nov 24, 2020

Will look forward to it! Right now, we're just waiting for Docker to release a tech preview. Docker Desktop doesn't currently start on Silicon.

@ped
Copy link

ped commented Nov 30, 2020

Has anyone tried ddev with docker running in a VM on apple M1?
https://finestructure.co/blog/2020/11/27/running-docker-on-apple-silicon-m1-follow-up

@rfay
Copy link
Member Author

rfay commented Nov 30, 2020

Unfortunately, Apple M1 also doesn't have VM support yet. Parallels is also working hard to come up with a tech preview. I don't think there are any options to do this at this point.

@ped
Copy link

ped commented Dec 1, 2020

But according to this article:
https://finestructure.co/blog/2020/11/27/running-docker-on-apple-silicon-m1
and the follow up that i mentioned in my previous comment, this person managed to get a ubuntu vm running on an Apple M1 machine, as well as docker.

With that running it should be possible to run ddev in that ubuntu VM? Maybe not the best solution, but for now that would be better than nothing.

@rfay
Copy link
Member Author

rfay commented Dec 1, 2020

Yes, I think you'd be able to get ddev going this way in a Linux VM.

@ped
Copy link

ped commented Dec 1, 2020

Can you test that on your MacBook Pro with Apple M1, please? Would be great to know if that actually works! Thank you!

@rfay
Copy link
Member Author

rfay commented Dec 1, 2020

I'd love to, but it's off-track for me at the moment. Sounds like fun though! I was hoping you'd try it and tell me :)

@ped
Copy link

ped commented Dec 1, 2020

I'd love to try it, but being able to run ddev and docker are the last things holding me back from buying a new MacBook with Apple M1, so I can't test it.

@ped
Copy link

ped commented Dec 11, 2020

Hello everyone,

according to this new blogpost by Docker they now have support for apple M1 in their preview build.

Can one of you with an Apple M1 Mac check this out and test ddev on it please?

Thanks!

@rfay
Copy link
Member Author

rfay commented Dec 11, 2020

Hi @ped - here's my initial results after a ddev recompile for arm64 and loads and loads of work earlier this year by @dennisameling to make the images work
https://twitter.com/randyfay/status/1337208925289005062

You can follow the progress to production ready in #2687

This should make it into an early v1.17 alpha.

@rfay rfay linked a pull request Dec 11, 2020 that will close this issue
6 tasks
rfay added a commit that referenced this issue Dec 31, 2020
…#2687)

* First working ddev on darwin_arm64

* Build shouldn't have an -it in it

* Add mysql 8.0 back in as possible version

* Release should build darwin_arm64

* Make install_ddev.sh recognize m1 arm64

* Docs for apple silicon

* Don't show actual output of notarize step

* Fix windows signing on macOS

* Clean up macos notarization in Makefile

* To avoid re-signing, delete target at beginning

* Remove code signature if found since arm64 signing seems to auto-sign

* Build both architectures for mysql (8.0)

* Back off of mysql 8.0 for arm64, it's actually not in the offical mysql on dockerhub

* Temporary hack to set host.docker.internal

The Docker Mac M1 preview does not yet support host.docker.internal
So this lets us set it to what it is for me, or override it in the
~/.ddev/global_config.yaml

* Fix broken Makefile - lost a couple of lines somehow

* Update golang-build-container to v1.16-beta

* Update BUILD_IMAGE to v1.16-beta
* Retire PACKR2_BUILD_IMAGE and use BUILD_IMAGE for that.

* Only build Apple M1 using go1.16-beta

* Build bottles for M1 homebrew

* Try to get the homebrew stuff from the correct repo

* Minor fixes that won't fix it
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 a pull request may close this issue.

5 participants