I'm the primary tech support person for my family. For the most part, we're an Apple household. I spend a lot of time helping friends and family get their Macs set up. I've had moments where I started thinking about purchasing a license for a Mac administration tool/service (e.g. Jamf. That seemed like overkill and a bit expensive, so I started researching other options.
I'm not a huge fan of the Time Machine or imaging/snapshot approach because I think it is helpful to do the occassional "clean install" and get rid of all of the crud that builds up on a machine over time. Due to some MacOS firmware changes, imaging is not really an option anymore.
I knew there were some open-source tools that did bits and pieces of the heavy-lifting. There is Homebrew, a package manager for MacOS, that allows you to install applications from the command line or a "Brewfile" (list of all of the apps you want to install). I was also aware of MacOS' Preference ("plist") files that would let you preserve some of your preferences and settings. Had anyone stitched all of these things together to help users with a clean install?
Bringing it all together
When you do a clean install of MacOS, you need to do 5 main tasks:
- Install the new operating system
- Install all of your applications
- Configure all of your applications with your preferences/settings
- Configure the dock, wallpaper, and other MacOS bits
- Bring across all of your files
I went in search of any Github projects that covered all or most of these steps. After lots of Googling, it didn't seem like anyone had. The closest project I found was this Ruby project.
Fortunately, each of these 5 tasks are fully or partially covered by an open-source project or other tool/service. They just needed to be stitched together. I found some easy-to-follow instructions for doing the clean install of the operating system itself. As noted above, Homebrew and a Brewfile will help us install the apps. You can bring across your application preferences with an open-source tool called Mackup. It's plist-approach doesn't cover 100% of our application preferences, nor the operating system preferences, so we've got to follow that up with some shell-scripting using Mathias Byens' dotfiles. There are some other tools like Dockutil that help with building out some of the other MacOS-specific settings not covered by the dotfiles. And to finish it off, you can bring across your files with DropBox, GDrive, OneDrive, or one of the other cloud-storage providers.
Problems to solve and things to build
There are a few problems to solve in order to stitch all of these together and provide a comprehensive clean install tool. First, we have a bit of a "bootstrap" problem with getting Homebrew and Python 3 onto the fresh, new OS. So... we've got to build a shell-script to get our tools in place. Next, we need something to coordinate all of the steps - Homebrew app install, Mackup preference copying, dotfiles shell-script execution, and so on. I'm a Python programmer, so we're going with Python and the Invoke module.
There also seem to be some "content gaps" in the current solutions. Mackup is an amazing project, but is missing a bunch of commonly used applications like Microsoft Office and Evernote to name a few. I suspect this is because it is geared more towards software engineers and not the average business user. The dotfiles projects cover a wide-range of settings, but don't provide much coverage for anything related to security hardening.
A soon-to-be-released open source project
In between writing shell scripts and Invoke coordinators, I've been doing a bunch of research to fill in the "content gaps" described above. I've been poring over Armin Briegel's Scripting OSX website and book to get a better understanding of plists and Mac administration in general. I've also been reading through some of these helpful security hardening posts - here and here. I'm a few days away from releasing an early-version of an open-source project I'm going to call MacMaestro (in a nod to the Seinfeld episode when Elaine starts dating a conductor). You can check the Github project page for when I finally flip the switch from private to public!