2

Don't fall in love with your Mac—automate it!

 2 years ago
source link: https://www.jeffgeerling.com/blog/2021/dont-fall-love-your-mac%E2%80%94automate-it
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Don't fall in love with your Mac—automate it!

June 4, 2021

Ah, the feeling of unpacking a brand new computer:

16 inch 2019 MacBook Pro with Intel core i9 9th gen processor - macOS Setup screen

In my case, I'm actually selling the 16" MacBook Pro pictured above and replacing it with a 13" MacBook Air and 10 Gigabit Mac mini.

Once you turn on the new Mac, what's next? Do you:

  1. Wait 6+ hours for a Time Machine restore (you do have a backup, right?) or use Migration Assistant to move all your old files and cruft from your old Mac?
  2. Manually install apps and click through tons of preference panes to set it up to your liking?
  3. Use a completely automated process like mac-dev-playbook to build everything fresh using mas, homebrew, and a tool like Ansible, so it's in a pristine state, with all your data and apps configured within an hour or two?

I choose the latter. And as a bonus, I can run the automation on both my new Macs frequently, to keep their configuration and app layout in sync!

I just posted a video about the entire process to my YouTube channel:

As I said in the video, you should really treat your workstation like cattle, not a pet—my goal is to be able to be 100% productive with a new computer in less than a day. Sometimes you don't even get the choice, if your computer dies or gets stolen!

If you want to see how to use the open source playbook, check out the mac-dev-playbook README.

It took about one hour before all my apps and configuration were present, and only a few more minutes for the initial Dropbox data sync to complete. After that, Photos slowly downloaded my entire library in the background, and all the rest of my work is open source and available on GitHub and a private mirror, so I just ran a shell script to clone all my repositories to my ~/Development folder.

Less than a full day to fully transition to a new Mac mini and format my old MacBook Pro—all done while recording the video above!

There are other tools focused on managing 'fleets' of Macs (like Jamf and other MDM tools), but Ansible's a pretty robust tool for managing one or more Macs, and it and the Mac Dev Playbook are nice and free!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK