Giter Club home page Giter Club logo

vagrant-osx's Introduction

Vagrant setup for OSX

Vagrant environment for testing and experiments inside OSX running via VMWare.

Prerequisites

  1. Download a fresh copy of OSX installer from AppStore.
  2. Create a Vagrant OSX box via timsutton/osx-vm-templates
  • Use --only=vmware-iso to only use VMWare builder
  • Increase the disk size (default is 20480 MB) as installing large packages from Homebrew and elsewhere may take up 20GB pretty quickly
  • Remove Parallels and Chef scripts as we won't need these
  1. Place the result box in the root of this repo as mac-osx-10-10-vmware.box
  2. Install Homebrew (which implies having XCode CLI Tools installed)
  3. Install Brewcask brew install caskroom/cask/brew-cask
  4. Install other tools: brew cask install vagrant vmware-fusion
  5. Install Vagrant VMWare plugin: vagrant plugin install vagrant-vmware-fusion and add license vagrant plugin license vagrant-vmware-fusion license.lic

Caveats

Boxen & synced folders

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.

Testing environments

Just pure OSX

Just a pure OSX with no extra mountpoints/provisioners, works out of the box.

vagrant up base

Boxen

Expects ./our-boxen directory in the root, Vagrant will mount it & install accordingly.

Available ENV variables:

  • GH_TOKEN - Github token for Boxen
  • UNLOCK_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 not
vagrant up boxen

Dotfiles

TODO

Homebrew (Cask)

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

Usage

vagrant ssh brew
brew install vagrant/homebrew-mytap/package-name

vagrant-osx's People

Contributors

radeksimko avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.