Vagrant setup for Mac OS X
MIT License
Vagrant environment for testing and experiments inside OSX running via VMWare.
timsutton/osx-vm-templates
--only=vmware-iso
to only use VMWare builder20480
MB) as installing large packages from Homebrew and elsewhere may take up 20GB pretty quicklymac-osx-10-10-vmware.box
brew install caskroom/cask/brew-cask
brew install --cask vagrant vmware-fusion
vagrant plugin install vagrant-vmware-fusion
and add license vagrant plugin license vagrant-vmware-fusion license.lic
Boxen uses file-locking to ensure it's only running once. This doesn't work with the default VMWare file-sync mechanism.
This is why we use NFS, but that has a different caveat - each time you run vagrant [up|reload]
,
Vagrant will try to modify /etc/exports
on your host machine, which will by default require your sudo password.
A workaround could be allowing write for all admins on that system & restarting nfsd without password:
# This is due to pesky sed - see https://github.com/mitchellh/vagrant/pull/5259
sudo chown root:admin /etc
sudo chmod g+w /etc
sudo chown root:admin /etc/exports
sudo chmod g+w /etc/exports
echo "%admin ALL=(root) NOPASSWD: /sbin/nfsd" >> /etc/sudoers
while having Vagrant 1.7.0+
installed.
Just a pure OSX with no extra mountpoints/provisioners, works out of the box.
vagrant up base
Expects ./our-boxen
directory in the root, Vagrant will mount it & install accordingly.
Available ENV variables:
GH_TOKEN
- Github token for BoxenUNLOCK_BOXEN
(empty or 1) - whether to unlock boxen (sometimes necessary when you kill the instance in mid-flight)NO_PULL
(empty or 1) - whether to pull down latest version of mounted our-boxen
or notvagrant up boxen
TODO
This will install latest Homebrew + Brewcask, turn Brewcask into DEV mode and mount any directories named as homebrew-*
as taps into the VM.
vagrant up brew
vagrant ssh brew
brew install vagrant/homebrew-mytap/package-name