Installing Chassis with Mac OS X [ Episode 2 (1 and 3 to come)]

Chassis is a new shiny environment VM especially made for WordPress developers – if you are pretty comfortable with the VM’s, vagrant, terminal blah blah — skip to the repo readme

Introduction

If your typical WP workflow is on MAMP or an (x)AMP equivalent, the immediate benefit of Chassis might escape you and the effort might not seem worthwhile – but I used to do all dev work with MAMP and have completely switched to Chassis.

Benefits

  1. Each site is sandboxed 100% to its own server environment (think Virtual Machine for each site).
  2. Resource usage is typically minimal
  3. Usage is easy… ‘vagrant up’ and go develop
  4. Its faster than the other projects (VVV and VagrantPress)
  5. The environment you develop with more closely matches manage hosting environments ( WP Engine via NGINX )
  6. It’s not MAMP… sometimes this is enough to switch.

What you need; TLDR

  1. Install Git CLI
  2. Install VirtualBox (free) or similar supported VM manager
  3. Install Vagrant
  4. Install Vagrant HostsUpdater (this might change in the future)
  5. Run Vagrant Up
  6. Profit
  7. Time (put aside an hour if all this is new to you)

Number 5 is only important if you are new to terminal.Most of these steps are simple “copy and paste” but if something doesn’t work – you might need to know how to troubleshoot it.

Let’s go pre-requisites

1. Install GIT

Nice and easy, visit: http://git-scm.com/download/mac and download the latest version of GIT. This will allow you to use the GIT command in the Command line

 2. Install VirtualBox

Next up, Virtual Machine manager, VirtualBox: https://www.virtualbox.org/wiki/Downloads. I currently have version 4.3.10 for OS X hosts 

3. Install Vagrant

Download and install Vagrant for your OS: http://www.vagrantup.com/downloads

vagrant-installer

4. Install Vagrant-hosts-updater (via terminal)

vagrant-hosts-updater

Open terminal (Command + Space -> type “Terminal) or Applications->Terminal; and type the following command

vagrant plugin install vagrant-hostsupdater

Chassis Time

With our environment almost ready to be chassis-fied, we can start getting to the fun part.

1. Clone the Chassis repository into a project folder (via terminal)

Within Terminal I typically make a folder called “repo“ and use the GIT clone command to make project folders. In this example I would use the following (where new-project is the name you want for the project)
cd ~/ && git clone --recursive https://github.com/Chassis/Chassis.git new-project
git chassis

2. Change directory and vagrant up (via terminal. 5 – 20 mins, up to 300mb)

In terminal type the following command (replacing new-project for the project name in the previous step).

cd new-project && vagrant up

This is the magic moment… so much is happening behind the code but I’ll sum it up:

  1. Virtual Box is downloading a new image which it will reference for all future VM’s created
  2. Chassis is configuring the new image and setting up the environment (this is magic, installing NGINX / PHP / Download and configuring WordPress)

Vagrant Hosts Updater makes it so you can access the site at http://vagrant.local when complete.chassis-install

2.1 Enter your password:

This is your user account password (if you haven’t set one – you can hit “enter” and try your luck.

3. Grab a browser and prosper

You should now be able to open a browser and visit http://vagrant.local to view the following awesomeness:

Screen Shot 2014-04-01 at 7.36.11 pm

Next steps

Granted, this tutorial ends with a white screen – but the next episode in the series we’ll discuss how to give your project a head start by using the Chassis content directory repo named “Supercharger

Leave a Reply