We'll respond shortly.
So you have a nice new Apple machine running Lion, but you don’t want to spend the next few hours installing software.
The short answer: use chef/soloist in conjunction with a slew of recipes developed at Pivotal Labs to help install the most common set of components.
Here’s what to do:
Do the following:
sudo gem install soloist mkdir -p ~/workspace cd ~/workspace git clone https://github.com/pivotal/pivotal_workstation.git cat > ~/soloistrc <<EOF cookbook_paths: - $HOME/workspace recipes: - pivotal_workstation::meta_osx_base - pivotal_workstation::meta_osx_development - pivotal_workstation::meta_ruby_development EOF soloist
It typically takes an hour for the chef run to complete. You can do other things while it’s running (but if you reboot or logout you’ll need to restart the chef run).
[Chef is a framework written by OpsCode to help configure in maintain one or more machines using ‘recipes’ (ruby scripts, more or less).]
[Soloist is an application which makes running chef-solo (the version of chef which runs without any centralized server) easier. It was written by my co-worker Matthew Kocher.]
At the end of the chef run [as of this writing, and if all goes well] the following software will be installed:
The following services will be enabled:
The following preferences will be set:
Want to change the software that is installed? It’s simple: just change your ~/soloistrc file. Here’s a soloistrc that will only install TextMate & node.js:
cookbook_paths: - ./workspace recipes: - pivotal_workstation::textmate - pivotal_workstation::node_js
If you’re interested in seeing all the recipes available (and there are quite a few), just browse the recipes in the pivotal_workstation repo.
Early in June, several pivots (Sean Beckett, Matthew Kocher, and David Goudreau, and I) met to decide on the bare minimum set of software and features that our developers would need to function on a new Lion Machine.
This set of chef recipes is the result of that meeting. There have been some changes (we have had great difficulty writing recipes to install firefox addons, so we iceboxed the story; some of our developers contributed recipes for things they wanted, so we added those).
We chose chef/soloist partly because felt that our previous process had reached the end of its usefulness and were familiar with chef from our work automating server configuration.
Here’s how our previous process worked:
This approach had several shortcomings:
We looked for alternatives. We wanted the following features:
Integration tests for the cookbook took several days to set up. We use Faronic’s Deep Freeze on a fairly pristine mac mini to ensure that we have a clean machine when we run our chef scripts. Continuous integration has proven invaluable for collaboration, for we quickly learn if a commit has unintended consequences.
In the more complex chef recipes, we attempt to write tests to test that they [the recipes] have succeeded; sshd_on.rb is a good example of testing that a service (sshd) was correctly started.
The chef runs, especially the initial one, are flaky. Our current chef run must download software from over 40 different servers, any one of which being down or having changed the download location can cause a failure. For example, Little CMS, a dependency of ImageMagick, resided on littlecms.com, which was down for a few days. Our integration tests failed during that period.
If you encounter a server being down or a file that has moved, please send us a pull request with an updated download location, or just comment-out the broken recipe.
Our target audience is developers, which is great: they understand errors, and often contribute code fixes. Our goal is for Pivotal Ops to provide a framework for Pivotal Engineers to write the recipes that build the workstations they want.
I am grateful to Matthew Kocher, who more than anyone helped me write the bulk of the ruby scripts. Also to Sean Beckett, without whose support this would never have happened. And to the many pivots who offered suggestions & help.