Giter VIP home page Giter VIP logo

mac-dev-playbook's Introduction

Mac Development Playbook

This playbook installs and configures most of the software I use on my Mac for web and software development. There are still a few manual steps, documented here.

Install before running the Playbook

Command Line Tools

  1. Download and extract the Apple Command Line Tools from here.
  2. Extract and run the pkg installer then run the following commands to install the package and then the headers
sudo installer -pkg \
  /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Python via brew

Recommended for now due to common build problems with pyenv.

export PYTHON_CONFIGURE_OPTS="--enable-framework"
brew install readline xz python
pip3 install --user --upgrade pynvim

Python via pyenv

Not recommended for now due to common build problems in OS X 10.14 Mojave and other platforms.

  1. Install pyenv and pipenv with brew
  2. Add pyenv init to .bash_profile
  3. Run export PYTHON_CONFIGURE_OPTS="--enable-framework" to ensure python compiles correctly for use with cmake
  4. Install dependencies with brew install readline xz
  5. Install python 2 and 3 via pyenv
  6. Set python version to 3.7.3
  7. Upgrade pynvim (for use with YouCompleteMe vim plugin)
brew install pyenv pipenv
pyenv init
# Add eval "$(pyenv init -)" to .bash_profile
export PYTHON_CONFIGURE_OPTS="--enable-framework"
brew install readline xz
pyenv install 2.7.16
pyenv install 3.7.3
pyenv global 3.7.3
pyenv rehash
pip3 install --user --upgrade pynvim

Ansible

  1. Install ansible via brew
  2. Clone this repository
  3. Install required roles
  4. Run the playbook in check mode
  5. Run the playbook
  6. Running individual tasks by tag
# Install ansible
brew install ansible

# Clone this repository
git clone https://github.com/bginbey/mac-dev-playbook.git

# Install roles (from repo directory)
ansible-galaxy install -r requirements.yml

# Run playbook in check mode
# Sequentially dependent tasks may appear to fail
ansible-playbook main.yml -i inventory --check -K -vvvv 

# Run playbook
ansible-playbook main.yml -i inventory -K -vvvv

# Run tasks by tag
ansible-playbook main.yml -i inventory -K --tags "dotfiles,homebrew"

Overriding Defaults

Any variable can be overridden in config.yml. For example, you can customize the installed packages and apps with something like:

homebrew_installed_packages:
  - cowsay
  - git
  - go

Included applications and configuration

Brew casks

Brew taps

  • git
  • hub
  • cmake
  • node
  • neovim

Dotfiles

Dotfiles are installed into ~/dotfiles/ with symbolic links in the home directory. The .neovim-init is also linked to Neovim's default location ./config/nvim/init.vim You can disable dotfiles management by setting configure_dotfiles: no in your configuration.

  • .zshrc
  • .gitconfig
  • .hyper.js
  • .osx
  • .antigen
  • .neovim-init.vim

Zsh and Antigen bundles

  • git
  • heroku
  • pip
  • lein
  • command-not-found

Future development

  • Visual Studio dotfile configuration
  • Visual Studio Code dotfile configuration
  • Adobe Creative Cloud

Testing the Playbook

See instructions for how to build a Mac OS X VirtualBox VM, on which playbooks may be run for testing.

mac-dev-playbook's People

Contributors

geerlingguy avatar bginbey avatar oxyc avatar ksoda avatar mikesouza avatar readmecritic avatar newtonne 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.