Commit 011f08e42b693b2a18493ad3e17e0a4a884be1c6
Merge pull request #1 from boxen/enable_puppet
Enable real Puppet runs
Showing 25 changed files Side-by-side Diff
- Gemfile.lock
- Puppetfile
- Puppetfile.lock
- README.md
- config/boxen.rb
- manifests/site.pp
- modules/people/README.md
- modules/projects/manifests/all.pp
- script/boxen-git-credential
- vendor/cache/boxen-0.2.0.gem
- vendor/cache/boxen-0.3.3.gem
- vendor/puppet/cache/boxen-puppet-boxen-0.0.1.1.tar.gz
- vendor/puppet/cache/boxen-puppet-boxen-0.0.20.tar.gz
- vendor/puppet/cache/boxen-puppet-dnsmasq-0.0.1.tar.gz
- vendor/puppet/cache/boxen-puppet-git-0.0.2.4.tar.gz
- vendor/puppet/cache/boxen-puppet-homebrew-0.0.8.tar.gz
- vendor/puppet/cache/boxen-puppet-hub-0.0.1.tar.gz
- vendor/puppet/cache/boxen-puppet-inifile-0.0.1.tar.gz
- vendor/puppet/cache/boxen-puppet-nginx-0.0.2.tar.gz
- vendor/puppet/cache/boxen-puppet-nodejs-0.0.1.tar.gz
- vendor/puppet/cache/boxen-puppet-nvm-0.0.5.tar.gz
- vendor/puppet/cache/boxen-puppet-rbenv-0.0.2.tar.gz
- vendor/puppet/cache/boxen-puppet-ruby-0.0.8.tar.gz
- vendor/puppet/cache/boxen-puppet-sudo-0.0.1.tar.gz
- vendor/puppet/cache/puppetlabs-puppetlabs-stdlib-3.0.0.tar.gz
Gemfile.lock
... | ... | @@ -3,9 +3,9 @@ |
3 | 3 | specs: |
4 | 4 | addressable (2.3.2) |
5 | 5 | ansi (1.4.3) |
6 | - boxen (0.2.0) | |
6 | + boxen (0.3.3) | |
7 | 7 | ansi (~> 1.4) |
8 | - hiera (= 1.0.0) | |
8 | + hiera (~> 1.0.0) | |
9 | 9 | highline (~> 1.6) |
10 | 10 | json_pure (~> 1.7) |
11 | 11 | librarian-puppet (~> 0.9) |
... | ... | @@ -19,7 +19,6 @@ |
19 | 19 | hashie (1.2.0) |
20 | 20 | hiera (1.0.0) |
21 | 21 | highline (1.6.15) |
22 | - json (1.7.5) | |
23 | 22 | json_pure (1.7.5) |
24 | 23 | librarian-puppet (0.9.6) |
25 | 24 | json_pure |
Puppetfile
... | ... | @@ -7,13 +7,22 @@ |
7 | 7 | # Includes many of our custom types and providers, as well as global |
8 | 8 | # config. Required. |
9 | 9 | |
10 | -mod "boxen", "0.0.1.1", :github_tarball => "boxen/puppet-boxen" | |
11 | - | |
12 | 10 | # Core modules for a basic development environment. |
13 | 11 | # You can replace some/most of those if you want, but it's not recommended. |
14 | -#%w(ruby rbenv nvm nodejs git hub inifile sudo homebrew xcode).each do |modulename| | |
15 | -# mod modulename, "0.0.1", :github_tarball => "boxen/puppet-#{modulename}" | |
16 | -#end | |
12 | + | |
13 | +mod "boxen", "0.0.20", :github_tarball => "boxen/puppet-boxen" | |
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 | |
18 | 27 | # Add your custom modules here. |
19 | 28 | # There are tons available at https://github.com/boxen. |
Puppetfile.lock
1 | 1 | GITHUBTARBALL |
2 | 2 | remote: boxen/puppet-boxen |
3 | 3 | specs: |
4 | - boxen (0.0.1.1) | |
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 | + | |
6 | 66 | DEPENDENCIES |
7 | - boxen (= 0.0.1.1) | |
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) |
README.md
... | ... | @@ -8,6 +8,39 @@ |
8 | 8 | 1. Fork this repository. |
9 | 9 | 2. Modify the `Puppetfile` and `modules/` to your heart's content. |
10 | 10 | 3. Get a copy of your fork somewhere locally. |
11 | -4. `cd` to that dir and run `script/boxen` | |
12 | -5. Rock out. :metal: | |
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. | |
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 | + | |
45 | +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. |
config/boxen.rb
1 | 1 | # This file will be loaded by config/basic early in a Boxen run. Use |
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' |
manifests/site.pp
1 | -# require boxen::environment | |
2 | -# require homebrew::repo | |
1 | +require boxen::environment | |
2 | +require homebrew::repo | |
3 | 3 | |
4 | -# Exec { | |
5 | -# group => 'staff', | |
6 | -# logoutput => on_failure, | |
7 | -# user => $luser, | |
4 | +Exec { | |
5 | + group => 'staff', | |
6 | + logoutput => on_failure, | |
7 | + user => $luser, | |
8 | 8 | |
9 | -# path => [ | |
10 | -# "${boxen::config::home}/rbenv/shims", | |
11 | -# "${boxen::config::home}/homebrew/bin", | |
12 | -# '/usr/bin', | |
13 | -# '/bin', | |
14 | -# '/usr/sbin', | |
15 | -# '/sbin' | |
16 | -# ] | |
17 | -# } | |
9 | + path => [ | |
10 | + "${boxen::config::home}/rbenv/shims", | |
11 | + "${boxen::config::home}/homebrew/bin", | |
12 | + '/usr/bin', | |
13 | + '/bin', | |
14 | + '/usr/sbin', | |
15 | + '/sbin' | |
16 | + ] | |
17 | +} | |
18 | 18 | |
19 | -# File { | |
20 | -# group => 'staff', | |
21 | -# owner => $luser | |
22 | -# } | |
19 | +File { | |
20 | + group => 'staff', | |
21 | + owner => $luser | |
22 | +} | |
23 | 23 | |
24 | -# Package { | |
25 | -# provider => homebrew, | |
26 | -# require => Class['homebrew'] | |
27 | -# } | |
24 | +Package { | |
25 | + provider => homebrew, | |
26 | + require => Class['homebrew'] | |
27 | +} | |
28 | 28 | |
29 | -# Repository { | |
30 | -# provider => git, | |
31 | -# extra => [ | |
32 | -# '--recurse-submodules' | |
33 | -# ], | |
34 | -# require => Class['git'] | |
35 | -# } | |
29 | +Repository { | |
30 | + provider => git, | |
31 | + extra => [ | |
32 | + '--recurse-submodules' | |
33 | + ], | |
34 | + require => Class['git'] | |
35 | +} | |
36 | 36 | |
37 | -# Service { | |
38 | -# provider => ghlaunchd | |
39 | -# } | |
37 | +Service { | |
38 | + provider => ghlaunchd | |
39 | +} | |
40 | 40 | |
41 | -# node default { | |
42 | -# include git | |
43 | -# } | |
41 | +node default { | |
42 | + # core modules, needed for most things | |
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 | +} |
modules/people/README.md
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | include emacs # requires emacs module in Puppetfile |
9 | 9 | include sparrow # requires sparrow module in Puppetfile |
10 | 10 | |
11 | - $home = '/Users/jbarnette' | |
11 | + $home = "/Users/${::luser}" | |
12 | 12 | $my = "${home}/my" |
13 | 13 | $dotfiles = "${my}/dotfiles" |
14 | 14 | |
... | ... | @@ -17,5 +17,15 @@ |
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 | + | |
28 | +``` | |
29 | +include projects::all | |
20 | 30 | ``` |
modules/projects/manifests/all.pp
script/boxen-git-credential
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. | |
21 | + | |
22 | +Dir.chdir Pathname.new(__FILE__).realpath + "../.." | |
23 | + | |
24 | +# Set up our local configuration, deps, and load path. | |
25 | + | |
26 | +load "config/basic.rb" | |
27 | + | |
28 | +require "boxen/config" | |
29 | + | |
30 | +config = Boxen::Config.load | |
31 | + | |
32 | +puts "username=#{config.login}" | |
33 | +puts "password=#{config.password}" |
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