This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# Joshua Sierles, 37signals, 2009 | |
require 'rubygems' | |
require 'thor' | |
require 'chef' | |
require 'chef/node' | |
require 'chef/rest' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Author:: Bryan McLellan <btm@loftninjas.org> | |
# Cookbook Name:: search | |
# Recipe:: default | |
# | |
# Copyright 2009, Bryan McLellan | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Apache recipe | |
service "apache" do | |
action :enable | |
end | |
# Haproxy recipe | |
include_recipe "apache" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Create a users index, based on /etc/passwd | |
require 'etc' | |
require File.join(File.dirname(__FILE__), "..", "lib", "chef") | |
Chef::Config[:log_level] = :info | |
r = Chef::REST.new("http://localhost:4000") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Author:: Bryan McLellan <btm@loftninjas.org> | |
# Cookbook Name:: ganglia | |
# Recipe:: default | |
# | |
# Copyright 2008, Bryan McLellan | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cron "compact chef couchDB" do | |
command "curl -X POST http://localhost:5984/chef/_compact >> /var/log/cron.log 2>&1" | |
hour "5" | |
minute "0" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2009 Damian Janowski. MIT License. | |
# http://gist.github.com/100655 | |
# | |
# Very simple script to handle Gem dependencies. | |
# It supports a basic vendoring system | |
# (just gem unpack to ./vendor) | |
# | |
# List your dependencies below and require this | |
# file at the very top of your program (think | |
# of it as a replacement for your require "rubygems"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'rake/tasklib' | |
class VMWare < ::Rake::TaskLib | |
def initialize(vm_path, vm_name) | |
@vmrun = '/Library/Application\ Support/VMware\ Fusion/vmrun' | |
@vm_path = vm_path | |
@vm_name = vm_name | |
define |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/chef-server/bin/chef-server b/chef-server/bin/chef-server | |
index b6a8277..e7dd8a2 100755 | |
--- a/chef-server/bin/chef-server | |
+++ b/chef-server/bin/chef-server | |
@@ -27,6 +27,9 @@ require "chef" | |
Dir.chdir File.join(File.dirname(__FILE__),"..") | |
__DIR__ = Dir.getwd | |
+slice_source = File.join(File.dirname(__FILE__), "..", "..", "chef-server-slice", "lib", "chef-server-slice.rb") | |
+require slice_source if File.exists?(slice_source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/chef-server-slice/app/controllers/application.rb b/chef-server-slice/app/controllers/application.rb | |
index de03021..7978809 100644 | |
--- a/chef-server-slice/app/controllers/application.rb | |
+++ b/chef-server-slice/app/controllers/application.rb | |
@@ -22,6 +22,8 @@ require "chef" / "cookbook_loader" | |
class ChefServerSlice::Application < Merb::Controller | |
+ include Chef::Mixin::Checksum | |
+ |