Merge pull request #1 from boxen/enable_puppet

Enable real Puppet runs
This commit is contained in:
Will Farrington 2012-10-07 18:01:33 -07:00
commit 011f08e42b
25 changed files with 244 additions and 49 deletions

View file

@ -3,9 +3,9 @@ GEM
specs: specs:
addressable (2.3.2) addressable (2.3.2)
ansi (1.4.3) ansi (1.4.3)
boxen (0.2.0) boxen (0.3.3)
ansi (~> 1.4) ansi (~> 1.4)
hiera (= 1.0.0) hiera (~> 1.0.0)
highline (~> 1.6) highline (~> 1.6)
json_pure (~> 1.7) json_pure (~> 1.7)
librarian-puppet (~> 0.9) librarian-puppet (~> 0.9)
@ -19,7 +19,6 @@ GEM
hashie (1.2.0) hashie (1.2.0)
hiera (1.0.0) hiera (1.0.0)
highline (1.6.15) highline (1.6.15)
json (1.7.5)
json_pure (1.7.5) json_pure (1.7.5)
librarian-puppet (0.9.6) librarian-puppet (0.9.6)
json_pure json_pure

View file

@ -7,13 +7,22 @@
# Includes many of our custom types and providers, as well as global # Includes many of our custom types and providers, as well as global
# config. Required. # config. Required.
mod "boxen", "0.0.1.1", :github_tarball => "boxen/puppet-boxen"
# Core modules for a basic development environment. # Core modules for a basic development environment.
# You can replace some/most of those if you want, but it's not recommended. # You can replace some/most of those if you want, but it's not recommended.
#%w(ruby rbenv nvm nodejs git hub inifile sudo homebrew xcode).each do |modulename|
# mod modulename, "0.0.1", :github_tarball => "boxen/puppet-#{modulename}" mod "boxen", "0.0.20", :github_tarball => "boxen/puppet-boxen"
#end mod "dnsmasq", "0.0.1", :github_tarball => "boxen/puppet-dnsmasq"
mod "git", "0.0.2.4", :github_tarball => "boxen/puppet-git"
mod "hub", "0.0.1", :github_tarball => "boxen/puppet-hub"
mod "homebrew", "0.0.8", :github_tarball => "boxen/puppet-homebrew"
mod "inifile", "0.0.1", :github_tarball => "boxen/puppet-inifile"
mod "nginx", "0.0.2", :github_tarball => "boxen/puppet-nginx"
mod "nodejs", "0.0.1", :github_tarball => "boxen/puppet-nodejs"
mod "nvm", "0.0.5", :github_tarball => "boxen/puppet-nvm"
mod "rbenv", "0.0.2", :github_tarball => "boxen/puppet-rbenv"
mod "ruby", "0.0.8", :github_tarball => "boxen/puppet-ruby"
mod "stdlib", "3.0.0", :github_tarball => "puppetlabs/puppetlabs-stdlib"
mod "sudo", "0.0.1", :github_tarball => "boxen/puppet-sudo"
# Add your custom modules here. # Add your custom modules here.
# There are tons available at https://github.com/boxen. # There are tons available at https://github.com/boxen.

View file

@ -1,8 +1,80 @@
GITHUBTARBALL GITHUBTARBALL
remote: boxen/puppet-boxen remote: boxen/puppet-boxen
specs: specs:
boxen (0.0.1.1) boxen (0.0.20)
GITHUBTARBALL
remote: boxen/puppet-dnsmasq
specs:
dnsmasq (0.0.1)
GITHUBTARBALL
remote: boxen/puppet-git
specs:
git (0.0.2.4)
GITHUBTARBALL
remote: boxen/puppet-homebrew
specs:
homebrew (0.0.8)
GITHUBTARBALL
remote: boxen/puppet-hub
specs:
hub (0.0.1)
GITHUBTARBALL
remote: boxen/puppet-inifile
specs:
inifile (0.0.1)
GITHUBTARBALL
remote: boxen/puppet-nginx
specs:
nginx (0.0.2)
GITHUBTARBALL
remote: boxen/puppet-nodejs
specs:
nodejs (0.0.1)
GITHUBTARBALL
remote: boxen/puppet-nvm
specs:
nvm (0.0.5)
GITHUBTARBALL
remote: boxen/puppet-rbenv
specs:
rbenv (0.0.2)
GITHUBTARBALL
remote: boxen/puppet-ruby
specs:
ruby (0.0.8)
GITHUBTARBALL
remote: boxen/puppet-sudo
specs:
sudo (0.0.1)
GITHUBTARBALL
remote: puppetlabs/puppetlabs-stdlib
specs:
stdlib (3.0.0)
DEPENDENCIES DEPENDENCIES
boxen (= 0.0.1.1) boxen (= 0.0.20)
dnsmasq (= 0.0.1)
git (= 0.0.2.4)
homebrew (= 0.0.8)
hub (= 0.0.1)
inifile (= 0.0.1)
nginx (= 0.0.2)
nodejs (= 0.0.1)
nvm (= 0.0.5)
rbenv (= 0.0.2)
ruby (= 0.0.8)
stdlib (= 3.0.0)
sudo (= 0.0.1)

View file

@ -8,5 +8,38 @@ modify appropriately.
1. Fork this repository. 1. Fork this repository.
2. Modify the `Puppetfile` and `modules/` to your heart's content. 2. Modify the `Puppetfile` and `modules/` to your heart's content.
3. Get a copy of your fork somewhere locally. 3. Get a copy of your fork somewhere locally.
4. `cd` to that dir and run `script/boxen` 4. Install the XCode Command Line Tools package. You need an Apple ID. We know. It sucks. You can thank Apple for not allowing the Command Line Tools to be redistributed publicly.
5. Rock out. :metal: 5. `cd` to that dir and run `script/boxen`
6. Rock out. :metal:
## What You Get
This template project provides the following by default:
* Homebrew
* Git
* Hub
* DNSMasq w/ .dev resolver for localhost
* NVM
* RBenv
* Full Disk Encryption requirement
* NodeJS 0.4
* NodeJS 0.6
* NodeJS 0.8
* Ruby 1.8.7
* Ruby 1.9.2
* Ruby 1.9.3
* Ack
* Findutils
* GNU-Tar
## Customizing
You can always check out the number of existing modules we already provide as optional installs under the [boxen organization](https://github.com/boxen). These modules are all tested to be compatible with Boxen. You can include these modules by modifying the Puppetfile, adding them to `manifests/site.pp` if they should be installed on every machine, and then running `boxen`.
For your organization, it's recommended you create a module to contain the configuration in the `modules/` directory (eg. `modules/github`).
Then, you simply need to include that module in `manifests/site.pp`.
For organization projects (read: repositories that people will be working in), please see the documentation in the projects module template we provide.
For per-user configuration that doesn't need to be applied globally to everyone, please see the documentation in the people module template we provide.

View file

@ -1,2 +1,8 @@
# This file will be loaded by config/basic early in a Boxen run. Use # This file will be loaded by config/basic early in a Boxen run. Use
# it to provide any custom code or behavior your Boxen setup requires. # it to provide any custom code or behavior your Boxen setup requires.
# Change the prefix boxen is installed to.
# ENV['BOXEN_HOME'] = '/opt/boxen'
# Change the repo boxen will use.
# ENV['BOXEN_REPO_NAME'] = 'boxen/our-boxen'

View file

@ -1,43 +1,73 @@
# require boxen::environment require boxen::environment
# require homebrew::repo require homebrew::repo
# Exec { Exec {
# group => 'staff', group => 'staff',
# logoutput => on_failure, logoutput => on_failure,
# user => $luser, user => $luser,
# path => [ path => [
# "${boxen::config::home}/rbenv/shims", "${boxen::config::home}/rbenv/shims",
# "${boxen::config::home}/homebrew/bin", "${boxen::config::home}/homebrew/bin",
# '/usr/bin', '/usr/bin',
# '/bin', '/bin',
# '/usr/sbin', '/usr/sbin',
# '/sbin' '/sbin'
# ] ]
# } }
# File { File {
# group => 'staff', group => 'staff',
# owner => $luser owner => $luser
# } }
# Package { Package {
# provider => homebrew, provider => homebrew,
# require => Class['homebrew'] require => Class['homebrew']
# } }
# Repository { Repository {
# provider => git, provider => git,
# extra => [ extra => [
# '--recurse-submodules' '--recurse-submodules'
# ], ],
# require => Class['git'] require => Class['git']
# } }
# Service { Service {
# provider => ghlaunchd provider => ghlaunchd
# } }
# node default { node default {
# include git # core modules, needed for most things
# } include dnsmasq
include git
include hub
include nginx
include nvm
include rbenv
# fail if FDE is not enabled
if $::root_encrypted == false {
fail('Please enable full disk encryption and try again')
}
# node versions
include nodejs::0-4
include nodejs::0-6
include nodejs::0-8
# default ruby versions
include ruby::1-8-7
include ruby::1-9-2
include ruby::1-9-3
# common, useful packages
package {
[
'ack',
'findutils',
'gnu-tar'
]:
}
}

View file

@ -8,7 +8,7 @@ class people::jbarnette {
include emacs # requires emacs module in Puppetfile include emacs # requires emacs module in Puppetfile
include sparrow # requires sparrow module in Puppetfile include sparrow # requires sparrow module in Puppetfile
$home = '/Users/jbarnette' $home = "/Users/${::luser}"
$my = "${home}/my" $my = "${home}/my"
$dotfiles = "${my}/dotfiles" $dotfiles = "${my}/dotfiles"
@ -18,3 +18,13 @@ class people::jbarnette {
} }
} }
``` ```
## Projects
While you _can_ include projects one by one, sometimes you might just want
all of them.
You can do that easily with:
```
include projects::all
```

View file

@ -0,0 +1,3 @@
class projects::all {
include_all_projects()
}

33
script/boxen-git-credential Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/ruby
# Provide git credentials using Boxen's config.
unless command = ARGV.shift
this = File.basename $0
abort "Usage: #{this} <get|store|erase>"
end
# We only support get.
exit 0 unless command == "get"
# Make sure we're looking for github.com stuff.
attrs = Hash[$stdin.read.split($/).map { |l| l.split("=") }]
exit 1 unless attrs["host"] == "github.com"
require "pathname"
# Put us where we belong, in the root dir of our boxen repo.
Dir.chdir Pathname.new(__FILE__).realpath + "../.."
# Set up our local configuration, deps, and load path.
load "config/basic.rb"
require "boxen/config"
config = Boxen::Config.load
puts "username=#{config.login}"
puts "password=#{config.password}"

Binary file not shown.

BIN
vendor/cache/boxen-0.3.3.gem vendored Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.