Configuration as Code for Mac Packages
Using simple bash scripts, I have been able to maintain sync between different mac environments, with a view to bringing configuration management to OS level packages.1
The benefits include:
- the ability to keep multiple macs in sync
- version control of dependencies
- better visibility of installed dependencies; can help prevent hidden bloat
- ensuring the latest versions are installed; can reduce exposure to security exploits
- efficiency; automated building of software packages rather than updating manually
- the ability to quickly reinstall an environment after system failure.
- mas allows for command line installation of apps from the Mac App Store
- homebrew command line utilities
- homebrew-cask allows for command line installation of non App Store apps
- same principle can be applied for global npm -g and rubygems packages.
- Place a simple text file in dropbox (or any cloud based storage of choice) for each package system.
- Run a script every time the mac restarts to ensure dependancies are installed on each environment. I personally have an automator workflow added to my login items which launches the script to run in a terminal window.