Commit 2522d1b51af09fb2c203fd2d581643f2c54fff5c
1 parent
d470c4a631
Exists in
master
Install pythons
Showing 4 changed files with 18 additions and 4 deletions Inline Diff
Puppetfile
| # 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.3.rc", :repo => "hanjianwei/puppet-boxen" | 32 | 32 | github "boxen", "3.6.3.rc", :repo => "hanjianwei/puppet-boxen" | |
| 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 "git", "2.5.0" | 41 | 41 | github "git", "2.5.0" | |
| github "homebrew", "1.9.5.rc2", :repo => "hanjianwei/puppet-homebrew" | 42 | 42 | github "homebrew", "1.9.5.rc2", :repo => "hanjianwei/puppet-homebrew" | |
| github "hub", "1.3.0" | 43 | 43 | github "hub", "1.3.0" | |
| github "inifile", "1.1.3", :repo => "puppetlabs/puppetlabs-inifile" | 44 | 44 | github "inifile", "1.1.3", :repo => "puppetlabs/puppetlabs-inifile" | |
| github "nodejs", "3.8.1" | 45 | 45 | github "nodejs", "3.8.1" | |
| github "openssl", "1.0.0" | 46 | 46 | github "openssl", "1.0.0" | |
| github "pkgconfig", "1.0.0" | 47 | 47 | github "pkgconfig", "1.0.0" | |
| github "repository", "2.3.0" | 48 | 48 | github "repository", "2.3.0" | |
| github "ruby", "8.1.2" | 49 | 49 | github "ruby", "8.1.2" | |
| github "stdlib", "4.3.2", :repo => "puppetlabs/puppetlabs-stdlib" | 50 | 50 | github "stdlib", "4.3.2", :repo => "puppetlabs/puppetlabs-stdlib" | |
| github "sudo", "1.0.0" | 51 | 51 | github "sudo", "1.0.0" | |
| github "xquartz", "1.2.0" | 52 | 52 | github "xquartz", "1.2.0" |
Puppetfile.lock
| GITHUBTARBALL | 1 | 1 | GITHUBTARBALL | |
| remote: boxen/puppet-git | 2 | 2 | remote: boxen/puppet-git | |
| specs: | 3 | 3 | specs: | |
| git (2.5.0) | 4 | 4 | git (2.5.0) | |
| 5 | 5 | |||
| GITHUBTARBALL | 6 | 6 | GITHUBTARBALL | |
| remote: boxen/puppet-hub | 7 | 7 | remote: boxen/puppet-hub | |
| specs: | 8 | 8 | specs: | |
| hub (1.3.0) | 9 | 9 | hub (1.3.0) | |
| 10 | 10 | |||
| GITHUBTARBALL | 11 | 11 | GITHUBTARBALL | |
| remote: boxen/puppet-nodejs | 12 | 12 | remote: boxen/puppet-nodejs | |
| specs: | 13 | 13 | specs: | |
| nodejs (3.8.1) | 14 | 14 | nodejs (3.8.1) | |
| 15 | 15 | |||
| GITHUBTARBALL | 16 | 16 | GITHUBTARBALL | |
| remote: boxen/puppet-openssl | 17 | 17 | remote: boxen/puppet-openssl | |
| specs: | 18 | 18 | specs: | |
| openssl (1.0.0) | 19 | 19 | openssl (1.0.0) | |
| 20 | 20 | |||
| GITHUBTARBALL | 21 | 21 | GITHUBTARBALL | |
| remote: boxen/puppet-osx | 22 | 22 | remote: boxen/puppet-osx | |
| specs: | 23 | 23 | specs: | |
| osx (2.7.0) | 24 | 24 | osx (2.7.0) | |
| 25 | 25 | |||
| GITHUBTARBALL | 26 | 26 | GITHUBTARBALL | |
| remote: boxen/puppet-pkgconfig | 27 | 27 | remote: boxen/puppet-pkgconfig | |
| specs: | 28 | 28 | specs: | |
| pkgconfig (1.0.0) | 29 | 29 | pkgconfig (1.0.0) | |
| 30 | 30 | |||
| GITHUBTARBALL | 31 | 31 | GITHUBTARBALL | |
| remote: boxen/puppet-repository | 32 | 32 | remote: boxen/puppet-repository | |
| specs: | 33 | 33 | specs: | |
| repository (2.3.0) | 34 | 34 | repository (2.3.0) | |
| 35 | 35 | |||
| GITHUBTARBALL | 36 | 36 | GITHUBTARBALL | |
| remote: boxen/puppet-ruby | 37 | 37 | remote: boxen/puppet-ruby | |
| specs: | 38 | 38 | specs: | |
| ruby (8.1.2) | 39 | 39 | ruby (8.1.2) | |
| 40 | 40 | |||
| GITHUBTARBALL | 41 | 41 | GITHUBTARBALL | |
| remote: boxen/puppet-sudo | 42 | 42 | remote: boxen/puppet-sudo | |
| specs: | 43 | 43 | specs: | |
| sudo (1.0.0) | 44 | 44 | sudo (1.0.0) | |
| 45 | 45 | |||
| GITHUBTARBALL | 46 | 46 | GITHUBTARBALL | |
| remote: boxen/puppet-xquartz | 47 | 47 | remote: boxen/puppet-xquartz | |
| specs: | 48 | 48 | specs: | |
| xquartz (1.2.0) | 49 | 49 | xquartz (1.2.0) | |
| 50 | 50 | |||
| GITHUBTARBALL | 51 | 51 | GITHUBTARBALL | |
| remote: hanjianwei/puppet-boxen | 52 | 52 | remote: hanjianwei/puppet-boxen | |
| specs: | 53 | 53 | specs: | |
| boxen (3.6.3.rc) | 54 | 54 | boxen (3.6.3.rc) | |
| 55 | 55 | |||
| GITHUBTARBALL | 56 | 56 | GITHUBTARBALL | |
| remote: hanjianwei/puppet-brewcask | 57 | 57 | remote: hanjianwei/puppet-brewcask | |
| specs: | 58 | 58 | specs: | |
| brewcask (0.0.4.rc2) | 59 | 59 | brewcask (0.0.4.rc2) | |
| 60 | 60 | |||
| GITHUBTARBALL | 61 | 61 | GITHUBTARBALL | |
| remote: hanjianwei/puppet-dotfiles | 62 | 62 | remote: hanjianwei/puppet-dotfiles | |
| specs: | 63 | 63 | specs: | |
| dotfiles (0.0.9) | 64 | 64 | dotfiles (0.0.9) | |
| 65 | 65 | |||
| GITHUBTARBALL | 66 | 66 | GITHUBTARBALL | |
| remote: hanjianwei/puppet-homebrew | 67 | 67 | remote: hanjianwei/puppet-homebrew | |
| specs: | 68 | 68 | specs: | |
| homebrew (1.9.5.rc2) | 69 | 69 | homebrew (1.9.5.rc2) | |
| 70 | 70 | |||
| GITHUBTARBALL | 71 | 71 | GITHUBTARBALL | |
| 72 | remote: hanjianwei/puppet-python | |||
| 73 | specs: | |||
| 74 | python (0.0.2) | |||
| 75 | ||||
| 76 | GITHUBTARBALL | |||
| remote: puppetlabs/puppetlabs-inifile | 72 | 77 | remote: puppetlabs/puppetlabs-inifile | |
| specs: | 73 | 78 | specs: | |
| inifile (1.1.3) | 74 | 79 | inifile (1.1.3) | |
| 75 | 80 | |||
| GITHUBTARBALL | 76 | 81 | GITHUBTARBALL | |
| remote: puppetlabs/puppetlabs-stdlib | 77 | 82 | remote: puppetlabs/puppetlabs-stdlib | |
| specs: | 78 | 83 | specs: | |
| stdlib (4.3.2) | 79 | 84 | stdlib (4.3.2) | |
| 80 | 85 | |||
| GITHUBTARBALL | 81 | 86 | GITHUBTARBALL | |
| remote: ripienaar/puppet-module-data | 82 | 87 | remote: ripienaar/puppet-module-data | |
| specs: | 83 | 88 | specs: | |
| module-data (0.0.3) | 84 | 89 | module-data (0.0.3) | |
| 85 | 90 | |||
| DEPENDENCIES | 86 | 91 | DEPENDENCIES | |
| boxen (= 3.6.3.rc) | 87 | 92 | boxen (= 3.6.3.rc) |
hiera/users/hanjianwei.yaml
| ruby::global::version: "2.1.2" | 1 | 1 | ruby::global::version: "2.1.2" | |
| nodejs::global::version: "v0.10" | 2 | 2 | nodejs::global::version: "v0.10" | |
| 3 | python::global::version: "2.7.8" | |||
| boxen::config::homebrewdir: "/usr/local" | 3 | 4 | boxen::config::homebrewdir: "/usr/local" | |
| dotfiles::configdir: "/Users/%{::boxen_user}/Dropbox/dotfiles" | 4 | 5 | dotfiles::configdir: "/Users/%{::boxen_user}/Dropbox/dotfiles" |
manifests/site.pp
| require boxen::environment | 1 | 1 | require boxen::environment | |
| require homebrew | 2 | 2 | require homebrew | |
| 3 | 3 | |||
| Exec { | 4 | 4 | Exec { | |
| group => 'staff', | 5 | 5 | group => 'staff', | |
| logoutput => on_failure, | 6 | 6 | logoutput => on_failure, | |
| user => $boxen_user, | 7 | 7 | user => $boxen_user, | |
| 8 | 8 | |||
| path => [ | 9 | 9 | path => [ | |
| "${boxen::config::home}/rbenv/shims", | 10 | 10 | "${boxen::config::home}/rbenv/shims", | |
| "${boxen::config::home}/rbenv/bin", | 11 | 11 | "${boxen::config::home}/rbenv/bin", | |
| "${boxen::config::home}/rbenv/plugins/ruby-build/bin", | 12 | 12 | "${boxen::config::home}/rbenv/plugins/ruby-build/bin", | |
| "/usr/local/bin", | 13 | 13 | "/usr/local/bin", | |
| '/usr/bin', | 14 | 14 | '/usr/bin', | |
| '/bin', | 15 | 15 | '/bin', | |
| '/usr/sbin', | 16 | 16 | '/usr/sbin', | |
| '/sbin' | 17 | 17 | '/sbin' | |
| ], | 18 | 18 | ], | |
| 19 | 19 | |||
| environment => [ | 20 | 20 | environment => [ | |
| "HOMEBREW_CACHE=${homebrew::config::cachedir}", | 21 | 21 | "HOMEBREW_CACHE=${homebrew::config::cachedir}", | |
| "HOME=/Users/${::boxen_user}" | 22 | 22 | "HOME=/Users/${::boxen_user}" | |
| ] | 23 | 23 | ] | |
| } | 24 | 24 | } | |
| 25 | 25 | |||
| File { | 26 | 26 | File { | |
| group => 'staff', | 27 | 27 | group => 'staff', | |
| owner => $boxen_user | 28 | 28 | owner => $boxen_user | |
| } | 29 | 29 | } | |
| 30 | 30 | |||
| Package { | 31 | 31 | Package { | |
| provider => homebrew, | 32 | 32 | provider => homebrew, | |
| require => Class['homebrew'] | 33 | 33 | require => Class['homebrew'] | |
| } | 34 | 34 | } | |
| 35 | 35 | |||
| Repository { | 36 | 36 | Repository { | |
| provider => git, | 37 | 37 | provider => git, | |
| extra => [ | 38 | 38 | extra => [ | |
| '--recurse-submodules' | 39 | 39 | '--recurse-submodules' | |
| ], | 40 | 40 | ], | |
| require => File["${boxen::config::bindir}/boxen-git-credential"], | 41 | 41 | require => File["${boxen::config::bindir}/boxen-git-credential"], | |
| config => { | 42 | 42 | config => { | |
| 'credential.helper' => "${boxen::config::bindir}/boxen-git-credential" | 43 | 43 | 'credential.helper' => "${boxen::config::bindir}/boxen-git-credential" | |
| } | 44 | 44 | } | |
| } | 45 | 45 | } | |
| 46 | 46 | |||
| Service { | 47 | 47 | Service { | |
| provider => ghlaunchd | 48 | 48 | provider => ghlaunchd | |
| } | 49 | 49 | } | |
| 50 | 50 | |||
| Homebrew::Formula <| |> -> Package <| |> | 51 | 51 | Homebrew::Formula <| |> -> Package <| |> | |
| 52 | 52 | |||
| node default { | 53 | 53 | node default { | |
| # core modules, needed for most things | 54 | 54 | # core modules, needed for most things | |
| include git | 55 | 55 | include git | |
| include hub | 56 | 56 | include hub | |
| 57 | 57 | |||
| # fail if FDE is not enabled | 58 | 58 | # fail if FDE is not enabled | |
| if $::root_encrypted == 'no' { | 59 | 59 | if $::root_encrypted == 'no' { | |
| fail('Please enable full disk encryption and try again') | 60 | 60 | fail('Please enable full disk encryption and try again') | |
| } | 61 | 61 | } | |
| 62 | 62 | |||
| # node versions | 63 | 63 | # node versions | |
| include nodejs::v0_10 | 64 | 64 | include nodejs::v0_10 | |
| include nodejs::global | 65 | 65 | include nodejs::global | |
| 66 | 66 | |||
| # default ruby versions | 67 | 67 | # ruby versions | |
| ruby::version { '1.9.3': } | 68 | 68 | ruby::version { '1.9.3': } | |
| ruby::version { '2.1.2': } | 69 | 69 | ruby::version { '2.1.2': } | |
| include ruby::global | 70 | 70 | include ruby::global |