-
Notifications
You must be signed in to change notification settings - Fork 7
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
Modernize vagrant environment so it is compatible with current Macs (M1) #1361
Comments
https://forums.virtualbox.org/viewtopic.php?t=107344
https://forums.virtualbox.org/viewtopic.php?f=15&t=106919&p=523035#p523069 Doesn't look like VirtualBox for M1 will be available anytime soon. |
UTM, which is a GUI wrapper around qemu, does support having ARM guests on M1 machines. Don't think it quite has Vagrant support yet: hashicorp/vagrant#12518 utmapp/UTM#3718. Seeing how far I can get with the UTM / qemu approach today. |
Making some progress with the Running into issues with network and folder sharing support, which seem not yet available with qemu: ppggff/vagrant-qemu#40 (comment), https://github.com/ppggff/vagrant-qemu#todo. |
I have not been able to fix the network and file sharing support, and have also been unable to find an alternative to |
Surfacing an offline discussion: we're going to move forward with plan B here, which is spinning up a shared x86-based build environment for this and other vagrant-based projects. |
The current deployment and development setup uses Vagrant and Virtualbox with x86 Ubuntu images (18.04) which used to make developing or deploying on an M1 Mac essentially impossible.
However, there are newer dependencies available that may allow us to make the project functional on M1 Macs, specifically:
So there now seems to be a possible path toward M1 compatibility, albeit one that depends on a beta version of VirtualBox. The alternative options are:
docker compose
. This would probably need to apply to the deployment as well; it would theoretically be possible to continue building AMIs with Ansible and deploying to simple EC2 instances (because that code isn't architecture-specific), but then the development environment would be worryingly different from the deployment environment.Given the above, we should make a timeboxed attempt to allow the existing vagrant + Virtualbox development environment to run on M1 Macs (while preserving existing functionality for x86 users).
If I had an M1 and were doing this, I would probably attempt something like the following process (I'm envisioning this card as a timebox, so we don't need to finish up every single task in this list, but we should do enough that we feel reasonably confident that there aren't any hidden blockers that we don't know about):
database
VM because that is a pretty simple setup that runs vanilla Postgres, so I would expect that all the dependencies would be fairly well tested on ARM processors. Currently, PostGIS is being built from source, but I think that's only for versioning reasons -- feel free to jettison that if we can get a more modern version from the OS packages now (we probably can).database
VM can be provisioned on M1 successfully, next attempt theotp
VM, which runs OpenTripPlanner (OTP). OTP is a Java application, and it probably has the worst combination of complexity, age, and low maintenance of any dependency we use in the app, so if we're going to encounter total blockers I would expect to find them here (but I still think we should start with the Postgres VM because I expect that to be the easiest, which should help us isolate OTP-specific issues from more general Virtualbox-on-ARM issues).Note: Reach out to me at this stage for a copy of what should be in the
otp_data
folder to successfully provision the OTP VM. The generation of this data is somewhat complicated and runs in a separate environment that is already M1-compatible, so you don't need to learn how to create the data to complete the task at hand.app
VM. It has the most going on because it handles the frontend and Django, but I don't have any reason to think that either of those should be problematic to run on M1s.The text was updated successfully, but these errors were encountered: