Commit 011f08e42b693b2a18493ad3e17e0a4a884be1c6

Authored by Will Farrington

Merge pull request #1 from boxen/enable_puppet

Enable real Puppet runs

Showing 25 changed files Inline Diff

GEM 1 1 GEM
remote: http://rubygems.org/ 2 2 remote: http://rubygems.org/
specs: 3 3 specs:
addressable (2.3.2) 4 4 addressable (2.3.2)
ansi (1.4.3) 5 5 ansi (1.4.3)
boxen (0.2.0) 6 6 boxen (0.3.3)
ansi (~> 1.4) 7 7 ansi (~> 1.4)
hiera (= 1.0.0) 8 8 hiera (~> 1.0.0)
highline (~> 1.6) 9 9 highline (~> 1.6)
json_pure (~> 1.7) 10 10 json_pure (~> 1.7)
librarian-puppet (~> 0.9) 11 11 librarian-puppet (~> 0.9)
octokit (~> 1.15) 12 12 octokit (~> 1.15)
puppet (~> 3.0) 13 13 puppet (~> 3.0)
facter (1.6.12) 14 14 facter (1.6.12)
faraday (0.8.4) 15 15 faraday (0.8.4)
multipart-post (~> 1.1) 16 16 multipart-post (~> 1.1)
faraday_middleware (0.8.8) 17 17 faraday_middleware (0.8.8)
faraday (>= 0.7.4, < 0.9) 18 18 faraday (>= 0.7.4, < 0.9)
hashie (1.2.0) 19 19 hashie (1.2.0)
hiera (1.0.0) 20 20 hiera (1.0.0)
highline (1.6.15) 21 21 highline (1.6.15)
json (1.7.5) 22
json_pure (1.7.5) 23 22 json_pure (1.7.5)
librarian-puppet (0.9.6) 24 23 librarian-puppet (0.9.6)
json_pure 25 24 json_pure
puppet 26 25 puppet
thor (~> 0.15) 27 26 thor (~> 0.15)
multi_json (1.3.6) 28 27 multi_json (1.3.6)
multipart-post (1.1.5) 29 28 multipart-post (1.1.5)
octokit (1.15.1) 30 29 octokit (1.15.1)
addressable (~> 2.2) 31 30 addressable (~> 2.2)
faraday (~> 0.8) 32 31 faraday (~> 0.8)
faraday_middleware (~> 0.8) 33 32 faraday_middleware (~> 0.8)
hashie (~> 1.2) 34 33 hashie (~> 1.2)
multi_json (~> 1.3) 35 34 multi_json (~> 1.3)
puppet (3.0.0) 36 35 puppet (3.0.0)
facter (>= 1.6.11) 37 36 facter (>= 1.6.11)
hiera (>= 1.0.0rc) 38 37 hiera (>= 1.0.0rc)
thor (0.16.0) 39 38 thor (0.16.0)
40 39
PLATFORMS 41 40 PLATFORMS
ruby 42 41 ruby
43 42
DEPENDENCIES 44 43 DEPENDENCIES
boxen (~> 0.1) 45 44 boxen (~> 0.1)
# This file manages Puppet module dependencies. 1 1 # This file manages Puppet module dependencies.
# 2 2 #
# It works a lot like Bundler. We provide some core modules by 3 3 # It works a lot like Bundler. We provide some core modules by
# default. This ensures at least the ability to construct a basic 4 4 # default. This ensures at least the ability to construct a basic
# environment. 5 5 # environment.
6 6
# Includes many of our custom types and providers, as well as global 7 7 # Includes many of our custom types and providers, as well as global
# config. Required. 8 8 # config. Required.
9 9
mod "boxen", "0.0.1.1", :github_tarball => "boxen/puppet-boxen" 10
11
# Core modules for a basic development environment. 12 10 # Core modules for a basic development environment.
# You can replace some/most of those if you want, but it's not recommended. 13 11 # 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| 14 12
# mod modulename, "0.0.1", :github_tarball => "boxen/puppet-#{modulename}" 15 13 mod "boxen", "0.0.20", :github_tarball => "boxen/puppet-boxen"
#end 16 14 mod "dnsmasq", "0.0.1", :github_tarball => "boxen/puppet-dnsmasq"
15 mod "git", "0.0.2.4", :github_tarball => "boxen/puppet-git"
16 mod "hub", "0.0.1", :github_tarball => "boxen/puppet-hub"
17 mod "homebrew", "0.0.8", :github_tarball => "boxen/puppet-homebrew"
18 mod "inifile", "0.0.1", :github_tarball => "boxen/puppet-inifile"
19 mod "nginx", "0.0.2", :github_tarball => "boxen/puppet-nginx"
20 mod "nodejs", "0.0.1", :github_tarball => "boxen/puppet-nodejs"
21 mod "nvm", "0.0.5", :github_tarball => "boxen/puppet-nvm"
22 mod "rbenv", "0.0.2", :github_tarball => "boxen/puppet-rbenv"
23 mod "ruby", "0.0.8", :github_tarball => "boxen/puppet-ruby"
24 mod "stdlib", "3.0.0", :github_tarball => "puppetlabs/puppetlabs-stdlib"
25 mod "sudo", "0.0.1", :github_tarball => "boxen/puppet-sudo"
17 26
# Add your custom modules here. 18 27 # Add your custom modules here.
GITHUBTARBALL 1 1 GITHUBTARBALL
remote: boxen/puppet-boxen 2 2 remote: boxen/puppet-boxen
specs: 3 3 specs:
boxen (0.0.1.1) 4 4 boxen (0.0.20)
5 5
6 GITHUBTARBALL
7 remote: boxen/puppet-dnsmasq
8 specs:
9 dnsmasq (0.0.1)
10
11 GITHUBTARBALL
12 remote: boxen/puppet-git
13 specs:
14 git (0.0.2.4)
15
16 GITHUBTARBALL
17 remote: boxen/puppet-homebrew
18 specs:
19 homebrew (0.0.8)
20
21 GITHUBTARBALL
22 remote: boxen/puppet-hub
23 specs:
24 hub (0.0.1)
25
26 GITHUBTARBALL
27 remote: boxen/puppet-inifile
28 specs:
29 inifile (0.0.1)
30
31 GITHUBTARBALL
32 remote: boxen/puppet-nginx
33 specs:
34 nginx (0.0.2)
35
36 GITHUBTARBALL
37 remote: boxen/puppet-nodejs
38 specs:
39 nodejs (0.0.1)
40
41 GITHUBTARBALL
42 remote: boxen/puppet-nvm
43 specs:
44 nvm (0.0.5)
45
46 GITHUBTARBALL
47 remote: boxen/puppet-rbenv
48 specs:
49 rbenv (0.0.2)
50
51 GITHUBTARBALL
52 remote: boxen/puppet-ruby
53 specs:
54 ruby (0.0.8)
55
56 GITHUBTARBALL
57 remote: boxen/puppet-sudo
58 specs:
59 sudo (0.0.1)
60
61 GITHUBTARBALL
62 remote: puppetlabs/puppetlabs-stdlib
63 specs:
64 stdlib (3.0.0)
65
DEPENDENCIES 6 66 DEPENDENCIES
boxen (= 0.0.1.1) 7 67 boxen (= 0.0.20)
68 dnsmasq (= 0.0.1)
69 git (= 0.0.2.4)
70 homebrew (= 0.0.8)
71 hub (= 0.0.1)
72 inifile (= 0.0.1)
73 nginx (= 0.0.2)
74 nodejs (= 0.0.1)
75 nvm (= 0.0.5)
76 rbenv (= 0.0.2)
77 ruby (= 0.0.8)
78 stdlib (= 3.0.0)
79 sudo (= 0.0.1)
8 80
# Our Boxen 1 1 # Our Boxen
2 2
This is a template Boxen project designed for your organization to fork and 3 3 This is a template Boxen project designed for your organization to fork and
modify appropriately. 4 4 modify appropriately.
5 5
## Getting Started 6 6 ## Getting Started
7 7
1. Fork this repository. 8 8 1. Fork this repository.
2. Modify the `Puppetfile` and `modules/` to your heart's content. 9 9 2. Modify the `Puppetfile` and `modules/` to your heart's content.
3. Get a copy of your fork somewhere locally. 10 10 3. Get a copy of your fork somewhere locally.
4. `cd` to that dir and run `script/boxen` 11 11 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: 12 12 5. `cd` to that dir and run `script/boxen`
13 6. Rock out. :metal:
14
15 ## What You Get
16
17 This template project provides the following by default:
18
19 * Homebrew
20 * Git
21 * Hub
22 * DNSMasq w/ .dev resolver for localhost
23 * NVM
24 * RBenv
25 * Full Disk Encryption requirement
26 * NodeJS 0.4
27 * NodeJS 0.6
28 * NodeJS 0.8
29 * Ruby 1.8.7
30 * Ruby 1.9.2
31 * Ruby 1.9.3
32 * Ack
33 * Findutils
34 * GNU-Tar
35
36 ## Customizing
37
38 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`.
39
40 For your organization, it's recommended you create a module to contain the configuration in the `modules/` directory (eg. `modules/github`).
41 Then, you simply need to include that module in `manifests/site.pp`.
42
43 For organization projects (read: repositories that people will be working in), please see the documentation in the projects module template we provide.
44
# This file will be loaded by config/basic early in a Boxen run. Use 1 1 # 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. 2 2 # it to provide any custom code or behavior your Boxen setup requires.
3
4 # Change the prefix boxen is installed to.
5 # ENV['BOXEN_HOME'] = '/opt/boxen'
6
7 # Change the repo boxen will use.
8 # ENV['BOXEN_REPO_NAME'] = 'boxen/our-boxen'
# require boxen::environment 1 1 require boxen::environment
# require homebrew::repo 2 2 require homebrew::repo
3 3
# Exec { 4 4 Exec {
# group => 'staff', 5 5 group => 'staff',
# logoutput => on_failure, 6 6 logoutput => on_failure,
# user => $luser, 7 7 user => $luser,
8 8
# path => [ 9 9 path => [
# "${boxen::config::home}/rbenv/shims", 10 10 "${boxen::config::home}/rbenv/shims",
# "${boxen::config::home}/homebrew/bin", 11 11 "${boxen::config::home}/homebrew/bin",
# '/usr/bin', 12 12 '/usr/bin',
# '/bin', 13 13 '/bin',
# '/usr/sbin', 14 14 '/usr/sbin',
# '/sbin' 15 15 '/sbin'
# ] 16 16 ]
# } 17 17 }
18 18
# File { 19 19 File {
# group => 'staff', 20 20 group => 'staff',
# owner => $luser 21 21 owner => $luser
# } 22 22 }
23 23
# Package { 24 24 Package {
# provider => homebrew, 25 25 provider => homebrew,
# require => Class['homebrew'] 26 26 require => Class['homebrew']
# } 27 27 }
28 28
# Repository { 29 29 Repository {
# provider => git, 30 30 provider => git,
# extra => [ 31 31 extra => [
# '--recurse-submodules' 32 32 '--recurse-submodules'
# ], 33 33 ],
# require => Class['git'] 34 34 require => Class['git']
# } 35 35 }
36 36
# Service { 37 37 Service {
# provider => ghlaunchd 38 38 provider => ghlaunchd
# } 39 39 }
40 40
# node default { 41 41 node default {
# include git 42 42 # core modules, needed for most things
# } 43 43 include dnsmasq
44 include git
45 include hub
46 include nginx
47 include nvm
48 include rbenv
49
50 # fail if FDE is not enabled
51 if $::root_encrypted == false {
52 fail('Please enable full disk encryption and try again')
53 }
54
55 # node versions
56 include nodejs::0-4
57 include nodejs::0-6
58 include nodejs::0-8
59
60 # default ruby versions
61 include ruby::1-8-7
62 include ruby::1-9-2
63 include ruby::1-9-3
64
65 # common, useful packages
66 package {
67 [
68 'ack',
69 'findutils',
70 'gnu-tar'
71 ]:
72 }
73 }
44 74
modules/people/README.md
# Personal Manifests 1 1 # Personal Manifests
2 2
Per-user manifests live in `modules/people/manifests/$login.pp`, where 3 3 Per-user manifests live in `modules/people/manifests/$login.pp`, where
`$login` is a GitHub login. A simple user manifest example: 4 4 `$login` is a GitHub login. A simple user manifest example:
5 5
```puppet 6 6 ```puppet
class people::jbarnette { 7 7 class people::jbarnette {
include emacs # requires emacs module in Puppetfile 8 8 include emacs # requires emacs module in Puppetfile
include sparrow # requires sparrow module in Puppetfile 9 9 include sparrow # requires sparrow module in Puppetfile
10 10
$home = '/Users/jbarnette' 11 11 $home = "/Users/${::luser}"
$my = "${home}/my" 12 12 $my = "${home}/my"
$dotfiles = "${my}/dotfiles" 13 13 $dotfiles = "${my}/dotfiles"
14 14
repository { $dotfiles: 15 15 repository { $dotfiles:
source => 'jbarnette/dotfiles', 16 16 source => 'jbarnette/dotfiles',
require => File[$my] 17 17 require => File[$my]
} 18 18 }
} 19 19 }
20 ```
21
22 ## Projects
23
24 While you _can_ include projects one by one, sometimes you might just want
25 all of them.
26 You can do that easily with:
27
modules/projects/manifests/all.pp
File was created 1 class projects::all {
2 include_all_projects()
3 }
script/boxen-git-credential
File was created 1 #!/usr/bin/ruby
2 # Provide git credentials using Boxen's config.
3
4 unless command = ARGV.shift
5 this = File.basename $0
6 abort "Usage: #{this} <get|store|erase>"
7 end
8
9 # We only support get.
10
11 exit 0 unless command == "get"
12
13 # Make sure we're looking for github.com stuff.
14
15 attrs = Hash[$stdin.read.split($/).map { |l| l.split("=") }]
16 exit 1 unless attrs["host"] == "github.com"
17
18 require "pathname"
19
20 # Put us where we belong, in the root dir of our boxen repo.
vendor/cache/boxen-0.2.0.gem
No preview for this file type
vendor/cache/boxen-0.3.3.gem
No preview for this file type
vendor/puppet/cache/boxen-puppet-boxen-0.0.1.1.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-boxen-0.0.20.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-dnsmasq-0.0.1.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-git-0.0.2.4.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-homebrew-0.0.8.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-hub-0.0.1.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-inifile-0.0.1.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-nginx-0.0.2.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-nodejs-0.0.1.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-nvm-0.0.5.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-rbenv-0.0.2.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-ruby-0.0.8.tar.gz
No preview for this file type
vendor/puppet/cache/boxen-puppet-sudo-0.0.1.tar.gz
No preview for this file type
vendor/puppet/cache/puppetlabs-puppetlabs-stdlib-3.0.0.tar.gz
No preview for this file type