Commit 820fc92aa1863b791512dd94598b4be335a4d109

Authored by Jianwei Han
1 parent f252dc01a0
Exists in master

Install Homebrew in standard location

Showing 3 changed files with 7 additions and 18 deletions Inline Diff

# 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
# Shortcut for a module from GitHub's boxen organization 7 7 # Shortcut for a module from GitHub's boxen organization
def github(name, *args) 8 8 def github(name, *args)
options ||= if args.last.is_a? Hash 9 9 options ||= if args.last.is_a? Hash
args.last 10 10 args.last
else 11 11 else
{} 12 12 {}
end 13 13 end
14 14
if path = options.delete(:path) 15 15 if path = options.delete(:path)
mod name, :path => path 16 16 mod name, :path => path
else 17 17 else
version = args.first 18 18 version = args.first
options[:repo] ||= "boxen/puppet-#{name}" 19 19 options[:repo] ||= "boxen/puppet-#{name}"
mod name, version, :github_tarball => options[:repo] 20 20 mod name, version, :github_tarball => options[:repo]
end 21 21 end
end 22 22 end
23 23
# Shortcut for a module under development 24 24 # Shortcut for a module under development
def dev(name, *args) 25 25 def dev(name, *args)
mod name, :path => "#{ENV['HOME']}/src/boxen/puppet-#{name}" 26 26 mod name, :path => "#{ENV['HOME']}/src/boxen/puppet-#{name}"
end 27 27 end
28 28
# Includes many of our custom types and providers, as well as global 29 29 # Includes many of our custom types and providers, as well as global
# config. Required. 30 30 # config. Required.
31 31
github "boxen", "3.6.1" 32 32 github "boxen", "3.6.1"
33 33
# Support for default hiera data in modules 34 34 # Support for default hiera data in modules
35 35
github "module-data", "0.0.3", :repo => "ripienaar/puppet-module-data" 36 36 github "module-data", "0.0.3", :repo => "ripienaar/puppet-module-data"
37 37
# Core modules for a basic development environment. You can replace 38 38 # Core modules for a basic development environment. You can replace
# some/most of these if you want, but it's not recommended. 39 39 # some/most of these if you want, but it's not recommended.
40 40
github "dnsmasq", "1.0.1" 41 41 github "dnsmasq", "1.0.1"
github "gcc", "2.0.101" 42 42 github "gcc", "2.0.101"
github "git", "2.4.0" 43 43 github "git", "2.4.0"
github "homebrew", "1.9.4" 44 44 github "homebrew", "1.9.5.rc", :repo => "hanjianwei/puppet-homebrew"
github "hub", "1.3.0" 45 45 github "hub", "1.3.0"
github "inifile", "1.0.3", :repo => "puppetlabs/puppetlabs-inifile" 46 46 github "inifile", "1.0.3", :repo => "puppetlabs/puppetlabs-inifile"
github "nginx", "1.4.3" 47 47 github "nginx", "1.4.3"
github "nodejs", "3.7.0" 48 48 github "nodejs", "3.7.0"
github "openssl", "1.0.0" 49 49 github "openssl", "1.0.0"
github "pkgconfig", "1.0.0" 50 50 github "pkgconfig", "1.0.0"
github "repository", "2.3.0" 51 51 github "repository", "2.3.0"
github "ruby", "8.0.4" 52 52 github "ruby", "8.0.4"
github "stdlib", "4.2.1", :repo => "puppetlabs/puppetlabs-stdlib" 53 53 github "stdlib", "4.2.1", :repo => "puppetlabs/puppetlabs-stdlib"
GITHUBTARBALL 1 1 GITHUBTARBALL
remote: boxen/puppet-boxen 2 2 remote: boxen/puppet-boxen
specs: 3 3 specs:
boxen (3.6.1) 4 4 boxen (3.6.1)
5 5
GITHUBTARBALL 6 6 GITHUBTARBALL
remote: boxen/puppet-dnsmasq 7 7 remote: boxen/puppet-dnsmasq
specs: 8 8 specs:
dnsmasq (1.0.1) 9 9 dnsmasq (1.0.1)
10 10
GITHUBTARBALL 11 11 GITHUBTARBALL
remote: boxen/puppet-gcc 12 12 remote: boxen/puppet-gcc
specs: 13 13 specs:
gcc (2.0.101) 14 14 gcc (2.0.101)
15 15
GITHUBTARBALL 16 16 GITHUBTARBALL
remote: boxen/puppet-git 17 17 remote: boxen/puppet-git
specs: 18 18 specs:
git (2.4.0) 19 19 git (2.4.0)
20 20
GITHUBTARBALL 21 21 GITHUBTARBALL
remote: boxen/puppet-homebrew 22
specs: 23
homebrew (1.9.4) 24
25
GITHUBTARBALL 26
remote: boxen/puppet-hub 27 22 remote: boxen/puppet-hub
specs: 28 23 specs:
hub (1.3.0) 29 24 hub (1.3.0)
30 25
GITHUBTARBALL 31 26 GITHUBTARBALL
remote: boxen/puppet-nginx 32 27 remote: boxen/puppet-nginx
specs: 33 28 specs:
nginx (1.4.3) 34 29 nginx (1.4.3)
35 30
GITHUBTARBALL 36 31 GITHUBTARBALL
remote: boxen/puppet-nodejs 37 32 remote: boxen/puppet-nodejs
specs: 38 33 specs:
nodejs (3.7.0) 39 34 nodejs (3.7.0)
40 35
GITHUBTARBALL 41 36 GITHUBTARBALL
remote: boxen/puppet-openssl 42 37 remote: boxen/puppet-openssl
specs: 43 38 specs:
openssl (1.0.0) 44 39 openssl (1.0.0)
45 40
GITHUBTARBALL 46 41 GITHUBTARBALL
remote: boxen/puppet-osx 47 42 remote: boxen/puppet-osx
specs: 48 43 specs:
osx (2.7.0) 49 44 osx (2.7.0)
50 45
GITHUBTARBALL 51 46 GITHUBTARBALL
remote: boxen/puppet-pkgconfig 52 47 remote: boxen/puppet-pkgconfig
specs: 53 48 specs:
pkgconfig (1.0.0) 54 49 pkgconfig (1.0.0)
55 50
GITHUBTARBALL 56 51 GITHUBTARBALL
remote: boxen/puppet-repository 57 52 remote: boxen/puppet-repository
specs: 58 53 specs:
repository (2.3.0) 59 54 repository (2.3.0)
60 55
GITHUBTARBALL 61 56 GITHUBTARBALL
remote: boxen/puppet-ruby 62 57 remote: boxen/puppet-ruby
specs: 63 58 specs:
ruby (8.0.4) 64 59 ruby (8.0.4)
65 60
GITHUBTARBALL 66 61 GITHUBTARBALL
remote: boxen/puppet-sudo 67 62 remote: boxen/puppet-sudo
specs: 68 63 specs:
sudo (1.0.0) 69 64 sudo (1.0.0)
70 65
GITHUBTARBALL 71 66 GITHUBTARBALL
remote: boxen/puppet-xquartz 72 67 remote: boxen/puppet-xquartz
specs: 73 68 specs:
xquartz (1.1.1) 74 69 xquartz (1.1.1)
75 70
GITHUBTARBALL 76 71 GITHUBTARBALL
remote: glarizza/puppet-property_list_key 77 72 remote: glarizza/puppet-property_list_key
specs: 78 73 specs:
property_list_key (0.2.1) 79 74 property_list_key (0.2.1)
80 75
GITHUBTARBALL 81 76 GITHUBTARBALL
remote: hanjianwei/puppet-brewcask 82 77 remote: hanjianwei/puppet-brewcask
specs: 83 78 specs:
brewcask (0.0.4.rc2) 84 79 brewcask (0.0.4.rc2)
85 80
GITHUBTARBALL 86 81 GITHUBTARBALL
remote: hanjianwei/puppet-dotfiles 87 82 remote: hanjianwei/puppet-dotfiles
specs: 88 83 specs:
dotfiles (0.0.6) 89 84 dotfiles (0.0.6)
90 85
GITHUBTARBALL 91 86 GITHUBTARBALL
87 remote: hanjianwei/puppet-homebrew
88 specs:
89 homebrew (1.9.5.rc)
90
91 GITHUBTARBALL
remote: puppetlabs/puppetlabs-inifile 92 92 remote: puppetlabs/puppetlabs-inifile
specs: 93 93 specs:
inifile (1.0.3) 94 94 inifile (1.0.3)
95 95
GITHUBTARBALL 96 96 GITHUBTARBALL
remote: puppetlabs/puppetlabs-stdlib 97 97 remote: puppetlabs/puppetlabs-stdlib
specs: 98 98 specs:
stdlib (4.2.1) 99 99 stdlib (4.2.1)
100 100
GITHUBTARBALL 101 101 GITHUBTARBALL
remote: ripienaar/puppet-module-data 102 102 remote: ripienaar/puppet-module-data
specs: 103 103 specs:
module-data (0.0.3) 104 104 module-data (0.0.3)
105 105
DEPENDENCIES 106 106 DEPENDENCIES
boxen (= 3.6.1) 107 107 boxen (= 3.6.1)
require boxen::environment 1 1 require boxen::environment
require homebrew 2 2 require homebrew
require gcc 3
4 3
Exec { 5 4 Exec {
group => 'staff', 6 5 group => 'staff',
logoutput => on_failure, 7 6 logoutput => on_failure,
user => $boxen_user, 8 7 user => $boxen_user,
9 8
path => [ 10 9 path => [
"${boxen::config::home}/rbenv/shims", 11 10 "${boxen::config::home}/rbenv/shims",
"${boxen::config::home}/rbenv/bin", 12 11 "${boxen::config::home}/rbenv/bin",
"${boxen::config::home}/rbenv/plugins/ruby-build/bin", 13 12 "${boxen::config::home}/rbenv/plugins/ruby-build/bin",
"${boxen::config::home}/homebrew/bin", 14 13 "${boxen::config::home}/homebrew/bin",
'/usr/bin', 15 14 '/usr/bin',
'/bin', 16 15 '/bin',
'/usr/sbin', 17 16 '/usr/sbin',
'/sbin' 18 17 '/sbin'
], 19 18 ],
20 19
environment => [ 21 20 environment => [
"HOMEBREW_CACHE=${homebrew::config::cachedir}", 22 21 "HOMEBREW_CACHE=${homebrew::config::cachedir}",
"HOME=/Users/${::boxen_user}" 23 22 "HOME=/Users/${::boxen_user}"
] 24 23 ]
} 25 24 }
26 25
File { 27 26 File {
group => 'staff', 28 27 group => 'staff',
owner => $boxen_user 29 28 owner => $boxen_user
} 30 29 }
31 30
Package { 32 31 Package {
provider => homebrew, 33 32 provider => homebrew,
require => Class['homebrew'] 34 33 require => Class['homebrew']
} 35 34 }
36 35
Repository { 37 36 Repository {
provider => git, 38 37 provider => git,
extra => [ 39 38 extra => [
'--recurse-submodules' 40 39 '--recurse-submodules'
], 41 40 ],
require => File["${boxen::config::bindir}/boxen-git-credential"], 42 41 require => File["${boxen::config::bindir}/boxen-git-credential"],
config => { 43 42 config => {
'credential.helper' => "${boxen::config::bindir}/boxen-git-credential" 44 43 'credential.helper' => "${boxen::config::bindir}/boxen-git-credential"
} 45 44 }
} 46 45 }
47 46
Service { 48 47 Service {
provider => ghlaunchd 49 48 provider => ghlaunchd
} 50 49 }
51 50
Homebrew::Formula <| |> -> Package <| |> 52 51 Homebrew::Formula <| |> -> Package <| |>
53 52
node default { 54 53 node default {
# core modules, needed for most things 55 54 # core modules, needed for most things
include dnsmasq 56
include git 57 55 include git
include hub 58 56 include hub
include nginx 59
60 57
# fail if FDE is not enabled 61 58 # fail if FDE is not enabled
if $::root_encrypted == 'no' { 62 59 if $::root_encrypted == 'no' {
fail('Please enable full disk encryption and try again') 63 60 fail('Please enable full disk encryption and try again')
} 64 61 }
65 62
# node versions 66 63 # node versions
include nodejs::v0_10 67 64 include nodejs::v0_10
include nodejs::global 68 65 include nodejs::global
69 66
# default ruby versions 70 67 # default ruby versions
ruby::version { '1.9.3': } 71 68 ruby::version { '1.9.3': }
ruby::version { '2.0.0': } 72
ruby::version { '2.1.2': } 73 69 ruby::version { '2.1.2': }