Skip to content

Instantly share code, notes, and snippets.

View jtimberman's full-sized avatar
🚀

Joshua Timberman jtimberman

🚀
View GitHub Profile
#
# Author:: Bryan McLellan <[email protected]>
# 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
## Apache recipe
service "apache" do
action :enable
end
# Haproxy recipe
include_recipe "apache"
#!/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")
@jtimberman
jtimberman / node.rb
Created April 14, 2009 19:20 — forked from btm/node.rb
#
# Author:: Bryan McLellan <[email protected]>
# 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
# 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").
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
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)
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
+
#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
require 'chef'
require 'chef/node'
require 'chef/rest'
# Please see the readme for overview documentation.
#
# JSON
{
"applications": [
{
"foobar": {
"migration_command": "rake db:migrate",
"branch": "HEAD",
"deploy_action": "deploy",
"framework_env": "production",