Skip to content

Commit

Permalink
Merge pull request #51 from kitchenplan/cleanup
Browse files Browse the repository at this point in the history
Kitchenplan 2.0 changes: stability, maintainability, and more configuration over recipes
  • Loading branch information
Roderik van der Veer committed Feb 15, 2014
2 parents 8469d81 + 8f0880d commit a6fab58
Show file tree
Hide file tree
Showing 21 changed files with 95 additions and 95 deletions.
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

4 changes: 3 additions & 1 deletion .travis.yml
@@ -1,5 +1,7 @@
language: objective-c
cache: bundler

rvm:
- system
- 2.0.0

script: "./go --no-interaction"
35 changes: 14 additions & 21 deletions Cheffile
@@ -1,27 +1,20 @@
site "http://community.opscode.com/api/v1"

cookbook "skylab", :github => "Kunstmaan/chef-skylab", :ref => "v0.1"
cookbook "applications", :github => "kitchenplan/chef-applications", :ref => "v1.0"
cookbook "homebrewalt", :github => "kitchenplan/chef-homebrewalt", :ref => "v1.7"
cookbook "nodejs", :github => "kitchenplan/chef-nodejs", :ref => "v1.1"
cookbook "applications", :github => "kitchenplan/chef-applications", :ref => "v2.0"
cookbook "osxdefaults", :github => "kitchenplan/chef-osxdefaults", :ref => "v1.0"
cookbook "dotfiles", :github => "kitchenplan/chef-dotfiles", :ref => "v1.0"
cookbook "dotfiles", :github => "kitchenplan/chef-dotfiles", :ref => "v1.1"
cookbook "drivers", :github => "kitchenplan/chef-drivers", :ref => "v1.0"
cookbook "dmg", :github => "thomasmeeus/dmg", :ref => "package"
cookbook "apt", :github => "opscode-cookbooks/apt", :ref => "v2.3.4"
cookbook "homebrew", :github => "kitchenplan/homebrew", :ref => "v1.6"
cookbook "apache2", :github => "Kunstmaan/apache2", :ref => "apache_2.4_with_mod_jk"
cookbook "logrotate", :github => "kitchenplan/logrotate", :ref => "v1.5.0"
cookbook "php", :github => "Kunstmaan/chef-php", :ref => "v1.3"
cookbook "postgresql", :github => "hw-cookbooks/postgresql", :ref => "v3.3.4"
cookbook "percona", :github => "thomasmeeus/chef-percona", :ref => "0.15"
cookbook "imagemagick", :github => "opscode-cookbooks/imagemagick", :ref => "e80c1ca66b0a905cbb6096ee1e5fa19911067208"
cookbook "git", :github => "opscode-cookbooks/git", :ref => "v2.9.0"
cookbook "newrelic", :github => "escapestudios/chef-newrelic", :ref => "0.5.8"
cookbook "rvm", :github => "fnichol/chef-rvm", :ref => "26ad5c043c70ea98855a049fbbacb7ffc5ad73e3"
cookbook "rbenv", :github => "fnichol/chef-rbenv", :ref => "9afb4e5da2e6212504a12de3bbbd410cd96100f6"
cookbook "sudoalt", :github => "kitchenplan/chef-sudoalt", :ref => "v2.4"
cookbook "dmg", :github => "opscode-cookbooks/dmg", :ref => "v2.1.4"
cookbook "composer", :github => "kitchenplan/chef-composer", :ref => "v1.0"
cookbook "nodejs", :github => "roderik/chef-nodejs", :ref => "v1.0"
cookbook "root_ssh_agent", :github => "dergachev/chef_root_ssh_agent", :ref => "25a316bed58adb3f4951a0f20ad3dfc3bc2af3df"
cookbook "sudo", :github => "kitchenplan/sudo", :ref => "v2.3"

# Make Librarian work
cookbook 'windows', :github => 'SimpleFinance/chef-windows', :ref => "42cfe55d4946fa3d9ac41ada2c0f68e3b82cfce4"
# If you want to use either rvm or rbenv, uncomment the relevant line:
#
# cookbook "rvm", :github => "fnichol/chef-rvm", :ref => "26ad5c043c70ea98855a049fbbacb7ffc5ad73e3"
# cookbook "rbenv", :github => "fnichol/chef-rbenv", :ref => "9afb4e5da2e6212504a12de3bbbd410cd96100f6"
#
# Then, add one of the following to your Kitchenplan config file
# - rvm::system
# - rbenv::system
3 changes: 2 additions & 1 deletion Gemfile
@@ -1,7 +1,8 @@
source "https://rubygems.org"

gem "chef", "~> 11.8.2"
gem "chef", "~> 11.10.0"
gem "librarian-chef", "~> 0.0.2"
gem "ohai", "~> 6.20.0"
gem "gabba", "~> 1.0.1"
gem "rvm", "~> 1.11.3.9"
gem "deep_merge", "~> 1.0.1"
26 changes: 14 additions & 12 deletions Gemfile.lock
Expand Up @@ -2,20 +2,20 @@ GEM
remote: https://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
chef (11.8.2)
chef-zero (~> 1.6, >= 1.6.2)
chef (11.10.0)
chef-zero (~> 1.7, >= 1.7.2)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
highline (~> 1.6, >= 1.6.9)
json (>= 1.4.4, <= 1.7.7)
json (>= 1.4.4, <= 1.8.1)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.3)
mixlib-cli (~> 1.4)
mixlib-config (~> 2.0)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.2)
mixlib-shellout (~> 1.3)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1.0)
net-ssh-multi (~> 1.1)
ohai (~> 6.0)
pry (~> 0.9)
puma (~> 1.6)
Expand All @@ -28,14 +28,15 @@ GEM
moneta (< 0.7.0)
rack
coderay (1.1.0)
deep_merge (1.0.1)
diff-lcs (1.2.5)
erubis (2.7.0)
gabba (1.0.1)
hashie (2.0.5)
highline (1.6.20)
ipaddress (0.8.0)
json (1.7.7)
librarian (0.1.1)
json (1.8.1)
librarian (0.1.2)
highline
thor (~> 0.15)
librarian-chef (0.0.2)
Expand All @@ -54,9 +55,9 @@ GEM
net-ssh (2.8.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.1)
net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0)
net-ssh-multi (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
ohai (6.20.0)
ipaddress
mixlib-cli
Expand Down Expand Up @@ -84,7 +85,8 @@ PLATFORMS
ruby

DEPENDENCIES
chef (~> 11.8.2)
chef (~> 11.10.0)
deep_merge (~> 1.0.1)
gabba (~> 1.0.1)
librarian-chef (~> 0.0.2)
ohai (~> 6.20.0)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Expand Up @@ -33,7 +33,7 @@ $ ruby -e "$(curl -fsSL https://raw.github.com/kitchenplan/kitchenplan/master/go

Before you run the commadn above, or manually run the```./kitchenplan``` command, you should first create a custom config file. The config system will always start off with ```default.yml```. This will contain the recipes for every person in your organisation. Next it it will look at the file ```yourusername.yml``` (with the username logged in on the computer as yourusername) for your custom settings. Ofcourse there will be a lot of shared config when your organisation has departments of different types of personel. So you can define group config files and assign one or more groups to a user. The ```roderik.yml``` ([found here](https://github.com/kitchenplan/kitchenplan/blob/master/config/people/roderik.yml)) is my personal config file and it will fall back to this config if you don't have a personal file.

When you are done with that, run the go script or run ```kitchenplan``` manually and wait for a while. After the command finishes, reboot your computer and you are good to go.
When you are done with that, run the ```go``` script or run ```kitchenplan``` manually and wait for a while. After the command finishes, reboot your computer and you are good to go.

### Command line tools

Expand All @@ -58,11 +58,10 @@ We are running this project in production for both OSX and Ubuntu development ma

Fork and send pull requests or just idea's and issues via the issue tracker. If you need a new recipe, fork the chef-* repo's and change the url in the Cheffile to make it fetch your version. Add it and send a pull request. For now we support OSX and the debian family (only tested on Ubuntu). Other operating systems are welcome!

More questions, ping me at [Twitter @r0derik](http://twitter.com/r0derik) or visit our [HipChat channel](https://www.hipchat.com/gTkMJo2Ag).
More questions, ping me at [Twitter @r0derik](http://twitter.com/r0derik) or visit the [HipChat channel](https://www.hipchat.com/gTkMJo2Ag).

### Acknowledgements

This project is inspired and built by using components and idea's from: Boxen, pivotal_workstation, Opscode cookbooks, and more. Please take any imitation as a the highest form of flattery. If you feel the source or acknowledgements are not sufficient, please let me know how you want it to be resolved.

[![Analytics](https://ga-beacon.appspot.com/UA-46288146-2/kitchenplan/kitchenplan)](https://github.com/igrigorik/ga-beacon)

10 changes: 7 additions & 3 deletions config/default.yml
@@ -1,10 +1,9 @@
recipes:
global:
- applications::create_var_chef_cache
- applications::google-chrome
- applications::firefox
- applications::java
mac_os_x:
- homebrewalt::default
- nodejs::default
- drivers::xerox550
- osxdefaults::add_note_to_loginscreen
- osxdefaults::disable_auto-correct
Expand All @@ -21,3 +20,8 @@ attributes:
xerox: 172.18.19.67
osxdefaults:
loginmessage: Property of Kunstmaan NV - 016 300 780 - hello@kunstmaan.be
homebrewalt:
cask_apps:
- google-chrome
- firefox
- java
5 changes: 4 additions & 1 deletion config/groups/bash.yml
@@ -1,6 +1,9 @@
recipes:
global:
- applications::bash-completion
- dotfiles::bash_it
- dotfiles::inputrc
- applications::bash
attributes:
homebrewalt:
apps:
- bash-completion
51 changes: 25 additions & 26 deletions config/groups/developer.yml
@@ -1,36 +1,19 @@
recipes:
global:
- applications::git
- applications::wget
- applications::pwgen
- applications::xmlstarlet
- applications::pv
- applications::htop
- dotfiles::gitconfig
- applications::grunt-cli
- applications::bower
- applications::git-flow
- applications::sass
- applications::siege
- applications::nodejs
- applications::ssh_config
- applications::macvim
- dotfiles::vim
- applications::composer
- applications::postgresql
- applications::mysql
- applications::apache
- applications::php55
- dotfiles::workspace
mac_os_x:
- applications::imageoptim
- applications::imagealpha
- applications::svgo
- applications::sublime_text_3
- applications::phpstorm
- applications::watch
- applications::gnu-tar
- applications::sequelpro
- applications::sourcetree
- osxdefaults::set_terminal_profile
- osxdefaults::add_a_context_menu_item_for_showing_the_web_inspector_in_web_views
- osxdefaults::disable_press-and-hold_for_keys_in_favor_of_key_repeat
Expand All @@ -55,13 +38,29 @@ recipes:
- osxdefaults::finder_disable_the_warning_when_changing_a_file_extension
- osxdefaults::finder_search_the_current_folder_by_default
- osxdefaults::finder_unhide_home
debian:
- applications::performance_scheduler
- applications::nscd
- applications::locales
- applications::pureftpd
- applications::xvfb
- applications::pidgin
- applications::ubuntu-desktop
attributes:
mysql_root_password: "password"
homebrewalt:
apps:
- git
- git-extras
- wget
- pwgen
- xmlstarlet
- pv
- htop-osx
- git-flow
- siege
- watch
cask_apps:
- imageoptim
- imagealpha
- phpstorm
- sequel-pro
- sourcetree
nodejs:
apps:
- phonegap
- bower
- grunt
- grunt-cli
13 changes: 3 additions & 10 deletions config/groups/smartie.yml
@@ -1,16 +1,9 @@
recipes:
global:
- applications::kms
mac_os_x:
- applications::hipchat
debian:
- root_ssh_agent::env_keep
- root_ssh_agent::ppid
- applications::essentials
- applications::mysql_workbench
- applications::server_tuning
- applications::postfix
- applications::java
attributes:
postfix:
domain: "kunstmaan.be"
homebrewalt:
cask_apps:
- hipchat
30 changes: 17 additions & 13 deletions config/people/roderik.yml
Expand Up @@ -6,20 +6,9 @@ recipes:
global:
- dotfiles::sshconfig
mac_os_x:
- applications::1password
- applications::dropbox
- applications::evernote
- applications::istatmenus4
- applications::kaleidoscope
- applications::omnigraffle
- applications::alfred
- applications::totalfinder
- applications::spotify
- applications::bartender
# - applications::hhvm
- skylab::default
- sudo::default
- applications::vagrant
- applications::launchrocket
- sudoalt::default
- osxdefaults::dock_automatically_hide_and_show_the_dock
- osxdefaults::dock_do_not_animate_opening_applications_from_the_dock
- osxdefaults::dock_enable_spring_loading_for_all_dock_items
Expand Down Expand Up @@ -62,3 +51,18 @@ attributes:
- roderik
passwordless: true
include_sudoers_d: true
homebrewalt:
cask_apps:
- onepassword
- dropbox
- evernote
- istat-menus
- kaleidoscope
- alfred
- totalfinder
- spotify
- bartender
- vmware-fusion
- virtualbox
- vagrant
- hazel
7 changes: 4 additions & 3 deletions lib/kitchenplan/config.rb
Expand Up @@ -2,6 +2,7 @@
require 'etc'
require 'ohai'
require 'erb'
require 'deep_merge'

module Kitchenplan

Expand Down Expand Up @@ -62,12 +63,12 @@ def config
config['recipes'] |= people_recipes['global'] || []
config['recipes'] |= people_recipes[@platform] || []
config['attributes'] = {}
config['attributes'].merge!(@default_config['attributes'] || {})
config['attributes'].deep_merge!(@default_config['attributes'] || {}) { |key, old, new| Array.wrap(old) + Array.wrap(new) }
@group_configs.each do |group_name, group_config|
config['attributes'].merge!(group_config['attributes']) unless group_config['attributes'].nil?
config['attributes'].deep_merge!(group_config['attributes']) { |key, old, new| Array.wrap(old) + Array.wrap(new) } unless group_config['attributes'].nil?
end
people_attributes = @people_config['attributes'] || {}
config['attributes'].merge!(people_attributes)
config['attributes'].deep_merge!(people_attributes) { |key, old, new| Array.wrap(old) + Array.wrap(new) }
config
end

Expand Down
Binary file added vendor/cache/chef-11.10.0.gem
Binary file not shown.
Binary file removed vendor/cache/chef-11.8.2.gem
Binary file not shown.
Binary file added vendor/cache/deep_merge-1.0.1.gem
Binary file not shown.
Binary file removed vendor/cache/json-1.7.7.gem
Binary file not shown.
Binary file added vendor/cache/json-1.8.1.gem
Binary file not shown.
Binary file removed vendor/cache/librarian-0.1.1.gem
Binary file not shown.
Binary file added vendor/cache/librarian-0.1.2.gem
Binary file not shown.
Binary file removed vendor/cache/net-ssh-multi-1.1.gem
Binary file not shown.
Binary file added vendor/cache/net-ssh-multi-1.2.0.gem
Binary file not shown.

0 comments on commit a6fab58

Please sign in to comment.