Setting up Dev Env on M1 Pro

Update 22/11/05

Using Homebrew works for most apps without needing Rosetta. Now I completely manage through homebrew again. Tools I use are now…

  • Oh my zsh

Under homebrew

  • fig

To use kubectl as gcloud component, add this to .zshrc

export PATH=”`brew — prefix`/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:$PATH”`

Will update Visual Studio Code plugins in the future.

Update 22/08/15

VM environment on M1 turned out to be too unstable so I reverted back to installing apps natively and making use of homebrew only for packages (not casks). Some other things I adopted…

  • oh my zsh + spaceship

Migration during setup is not recommended, especially if Virtualbox or other VM related things were installed

I’ve introduced how setting up disposable development environment makes for a clean workspace in the last post, but there is one caveat — it won’t work on M1, at least not verbatim.

I thought of three possible ways to approach my set up, and to stick to one of them.

  1. Install everything through distributed image files from official websites or App Store

This idea of sticking to one particular way of doing things actually came from this video on TDD, and one of its takeaways is not to mix mock with real data while testing. Like how test codes break at random times because of conflicting ideas about what conditions tests should cover, there will be conflicts in different approaches taken in a laptop setup — and unless you’re a hardware or software interface guru, debugging this conflict can be time-consuming.

After some trial and error, I figured it’s best to ditch using homebrew for good. The disposable environment idea provides for a minimal number of apps to be run on the host machine, after all, so it is not too hard to manage the apps.

I followed through the guide above word by word, installing everything as recommended by the provided distribution images. Then configured Vagrantfile.

Vagrant.configure("2") do |config| = "spox/ubuntu-arm"  config.vm.box_version = "1.0.0"  config.vm.hostname = "rusty-spoon"  config.vm.define "rusty-spoon"  config.vm.provider "vmware_desktop" do |v|    # v.gui = true    v.memory = "2048"    v.linked_clone = false    v.vmx["ethernet0.pcislotnumber"] = "160"  endend

There are few things to note about this setup

  • Unlike Virtualbox, you can’t setup a fixed private network IP on VMware. This is a known issue on Vagrant documentation. According to the gist thread above, some people have made it work, albeit unstable.

All I have on host machine is now…



r&d blog on architecture, software engineering and inspirations

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

r&d blog on architecture, software engineering and inspirations