This is Dave Liggat's incarnation of Plyfe's incarnation of GitHub's Boxen. Automated Mac provisioning.
tested on clean OS X 10.8 machine
- You have a GitHub account, and have been added to the plyfe organization.
- Someone has 'onboarded' you to the plyfe/our-boxen repository and has created a
modules/people/manifests/$YOUR_GITHUB_HANDLE.pp
personal manifest file. See @dliggat or @chrislopresto for more info. - You have a public name and email address associated with your GitHub account. If you don't, the installer will bomb. See this issue for more details.
- Format machine to a clean install of OS X 10.8 Mountain Lion
- Important: Backup all important data and settings with liberal use of Dropbox and Time Machine
- Reboot machine, insert bootable USB drive with OS X installer, and hold the
Option
key - Use the USB drive's disk utility to erase Macintosh HD
- Install OS X onto the newly-erased Macintosh HD
- Install Xcode from the Mac App Store.
- Open Xcode -> Preferences -> Downloads -> Install Command Line Tools.
- In that same Download window, install the iOS Simulator for the current and previous version (as of the time of writing on 2013-07-31, that would be iOS6 and iOS5.1).
- Boxen checks and verifies that FileVault, OS X's full-disk encryption, is turned on.
- In the case of a laptop, it's probably a good idea. You can turn on FileVault in OS X's 'Security and Privacy' System Preferences pane. Be aware that this may take several hours to enable - so this should be done overnight preferrably.
- In the case of a shared machine (e.g. Mac Mini), it's probably not worth the effort.
- If you don't want Boxen to complain about the lack of FileVault, add
--no-fde
to step (7) to remove the check.
- Open Terminal.app and do the following:
sudo mkdir -p /opt/boxen
sudo chown ${USER}:staff /opt/boxen
git clone https://github.com/dliggat/boxen.git /opt/boxen/repo
cd /opt/boxen/repo
- Run
script/boxen --debug --profile
. (optionally add--no-fde
if you aren't turning on FileVault) - When complete, close Terminal.app, and open iTerm.app via Spotlight search. Ignore Terminal and use iTerm for all future command line interactions :D
- Now within iTerm,
cd /opt/boxen/repo
and runscript/boxen --debug --profile
for a second time (This is necessary due to what appears to be a bug in boxen - without a second run, the system wide gems are not installed, which causes bundler to fail downstream).
The machine's Plyfe boxen provisioning is now complete. Apps (Chrome, Dropbox, etc), Rubies (1.8.7, 1.9.3 - default, and 2.0.0), and Homebrew packages (heroku-toolbelt, pidof, etc) have been automatically installed. Further custom tweaks can be added and scripted automatically by editing your personal .pp manifest file (established in Prerequisite #2).
- Run
cd ~/code/boxen/plyfeme
. - Run
mysql -u root < db/init_dev_user.sql
(Initializes the local development database user account) - Run
bundle install
. - Run
bundle exec rake db:drop db:create db:migrate db:seed db:test:prepare
. - Run the unit test suite:
bundle exec guard
. After the batch of javascript tests visibly completes, enterrspec all
to run the ruby tests.Ctrl-C
to exit. - Finally, run the app itself:
script/thinserver
and when it loads, visit https://development.plyfe.me:3001
- Do this once:
git remote add plyfe-boxen https://github.com/plyfe/our-boxen.git
- Fetch commits:
git fetch plyfe-boxen
- Merge commits:
git merge plyfe-boxen/master
=======
Puppet modules are updated frequently, as new software releases occur. To update a module, find the corresponding GitHub repository tag (e.g. At the time of writing "1.1.1" was the latest in puppet-xquartx) and change the Puppetfile entry to match. Then run script/boxen
from /opt/boxen/repo
again. It may be necessary to do one or both of the following if a librarian or dependency error occurs:
rm -rf /opt/boxen/repo/.{tmp,librarian}
rm Puppetfile.lock
If that still fails, you may be running into a GitHub rate limiting issue. This can be worked around by generating a GitHub Authorized application token, setting set GITHUB_API_TOKEN=$your_token
and trying again.
plyfe/our-boxen is a fork of boxen/our-boxen - Substantial other documentation is available there.