Updated: April 14, 2014
To use this workflow, you’ll need to have some dependencies installed. In addition to the Chef-gm dependencies, I’ve included some additional packages that you should consider for your local development environment. If you run into problems, double check the software versions for compatibility.
Development Environment
The next steps will guide you through an automated development environment that has been configured using Vagrant and Chef-Solo to run in an Ubuntu virtual machine closely matching production. When you are finished, your development environment will have high parity with production and other developers’ environments. You should also be able to get up and ready to develop in about an hour of beginning this tutorial.
Chef-gm Dependencies
These were tested on OSX 10.9.2 on 4/16/2014. Alternative package versions are likely to behave if you choose.
- Ruby 2.1.0 (RVM recommended)
- Capistrano 3.1.x
- berkshelf 3.0.x
- Virtual Box 4.3.10
- Vagrant 1.5.x
- vagrant-berkshelf 2.0.0
- vagrant-hostmanager 1.4.0
- vagrant-omnibusvagrant 1.3.1
- git 1.8.x
Optional Packages *
- Bundler
- Homebrew
Install Dependencies
OSX Developer Tools
# Ensure OSX developer tools are installed
$ xcode-select --install
RVM (optional)
Ruby is required and RVM is the recommended way of managing your versions and gems.
# Install RVM
$ \curl -sSL https://get.rvm.io | bash -s stable
Configure RVM if necessary.
Chef and Knife
$ curl -L https://www.opscode.com/chef/install.sh | sudo bash
# verify installation
$ chef-client -v
Bundler *
$ gem install bundler --no-ri --no-rdoc
Gems
Berkshelf - Chef cookbook dependency manager Capistrano - Application Deployment
If you installed Bundler
$ cd {project-dir}
$ bundle install
else
$ gem install knife-solo berkshelf foodcritic capistrano --no-ri --no-rdoc
Vagrant Plugins
$ vagrant plugin install vagrant-hostmanager
$ vagrant plugin install vagrant-berkshelf --plugin-version 2.0.0.rc3
$ vagrant plugin install vagrant-omnibus
Knife plugins*
If you plan to provision on Digital ocean:
$ gem install knife-digital_ocean --no-ri --no-rdoc
homebrew *
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
composer *
$ brew tap josegonzalez/homebrew-php
$ brew install josegonzalez/php/composer
Install php 5.4 or greater
$ brew install php54-intl
* denotes optional but recommended for your future convenience