Puppet a developer workstation from scratch.
This is a work in progress!
This is super-alpha; I'm currently running this on my machine to drive out changes and bugfixes. The list of to-dos is still incredibly long, and I would not recommend using this until it's a little further along.
At this point I'm developing this in a single repository, but I plan on extracting the osx-specific puppet extensions into their own modules once I'm happy with them.
Holy Grail
- Install OSX Snow Leopard
gem install puppet
curl -O http://someday.github.com/phinze/puppet-workstation.tgz && tar zxf puppet-workstation.tgz
cd puppet-workstation; ~/.gem/ruby/1.8/puppet apply puppet.pp
- Enjoy fully installed and configured developer workstation.
Secondary Goals
- acquire root privs only when necessary, and make it obvious why they are necessary when password is requested
- properly connect puppet
require
s -- only one invocation ofpuppet apply
should be necessary - don't give puppet the ability change anything that it does not also have the ability to change back
Current features
macapp package provider
- Given a URL, will download and install a mac application
- Started as a combination of the existing
pkgdmg
andappdmg
providers - Now will recognize and install
app
andpkg
files inside ofdmg
,zip
, and,tgz
containers - Has ability to source applications from Dropbox for non-publically-available apps with
dropbox://
- TODO: support elevating privileges when installing
pkg
s that require it, so puppet itself does not need
apple_preference resource type
- Low-level wrapper allowing the maintenance of speicifc keys in Apple Preference
plist
files - Currently successfully used to:
- script the mapping of capslock to control
- provide some basic settings around the dock
- Plan is to extend this with children to a cleaner interface for Dock settings, Adium accounts, and other fun
plist
-backed settings
homebrew package provider
- Borrowing this from jedi4ever; so far I haven't had to even look at the code. Thanks jedi4ever!
- TODO: have puppet manage the install homebrew itself
pip package provider
- Borrowing this from rcrowley; forked and hacked it up a bit; planning to push changes back up. Thanks rcrowley!
- TODO: automatically have all pip provided packages depend on the pip homebrew package
A small selection of future features
- Install and manage rvm rubies and gemsets
- Clone git repositories into place
- Clone and symlink in dotfiles from a repository
- Lots of app-specfic configuration abilities: Terminal, Adium, Chrome, other System Preferences
- Pies; skies; etc...
launchd
services
Weirdness with Puppet comes with a built-in launchd provider for services, but I've been having quite a bit of trouble with it.
This was one thing I had to do:
sudo chgrp admin /var/db/launchd.db/com.apple.launchd/overrides.plist sudo chmod 660 /var/db/launchd.db/com.apple.launchd/overrides.plist
Another problem is launchctl
will be unable to connect to the correct socket
when run from tmux, unless it's being run from sudo. This means that
'com.apple.Dock.agent' won't show up in launchctl list
. I'm punting on
launchd services for now and doing a killall Dock
to make Dock config
settings take effect.