Skip to content

Commit c5d33c1

Browse files
author
Ezra Zygmuntowicz
committed
big refactor of the repo layout. move to a chef gem and a chef-server gem all with proper deps
1 parent 3d14601 commit c5d33c1

268 files changed

Lines changed: 357 additions & 24 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

‎chef-server/NOTICE‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Chef NOTICE
2+
===========
3+
4+
Developed at HJK Solutions (http://www.hjksolutions.com).
5+
6+
Contributors and Copyright holders:
7+
8+
* Copyright 2008, Adam Jacob <adam@hjksolutions.com>
9+
* Copyright 2008, Arjuna Christensen <aj@hjksolutions.com>
10+
* Copyright 2008, Ezra Zygmuntowicz <ezra@engineyard.com>

‎chef-server/README.txt‎

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
= chef-server
2+
3+
* http://oss.hjksolutions.com/chef
4+
5+
== DESCRIPTION:
6+
7+
Chef is a configuration management tool inspired by Puppet.
8+
9+
I'm in ur netwerk, cookin up yer servers. :)
10+
11+
== FEATURES/PROBLEMS:
12+
13+
14+
== SYNOPSIS:
15+
16+
17+
== REQUIREMENTS:
18+
19+
RubyGems:
20+
21+
* stomp
22+
* stompserver
23+
* ultraviolet
24+
* facter
25+
* ferret
26+
* merb-core
27+
* haml
28+
* ruby-openid
29+
* json
30+
31+
External Servers:
32+
33+
* stompserver (for easy stomp mq testing)
34+
* CouchDB
35+
36+
== INSTALL:
37+
38+
Install all of the above. To fire up a develpment environment, do the following:
39+
40+
* Start CouchDB with 'couchdb'
41+
* Start stompserver with 'stompserver'
42+
* Start chef-indexer with:
43+
44+
./bin/chef-indexer -l debug -c ./config/chef-server.rb
45+
46+
* Start chef-server on port 4000 with:
47+
48+
./bin/chef-server
49+
50+
* Start chef-server on port 4001 with:
51+
52+
./bin/chef-server -p 4001
53+
54+
* Test run chef with:
55+
56+
sudo ./bin/chef-client -l debug -c ./examples/config/chef-solo.rb
57+
58+
== LICENSE:
59+
60+
Chef - A configuration management system
61+
62+
Author:: Adam Jacob (<adam@hjksolutions.com>)
63+
Copyright:: Copyright (c) 2008 HJK Solutions, LLC
64+
License:: Apache License, Version 2.0
65+
66+
Licensed under the Apache License, Version 2.0 (the "License");
67+
you may not use this file except in compliance with the License.
68+
You may obtain a copy of the License at
69+
70+
http://www.apache.org/licenses/LICENSE-2.0
71+
72+
Unless required by applicable law or agreed to in writing, software
73+
distributed under the License is distributed on an "AS IS" BASIS,
74+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75+
See the License for the specific language governing permissions and
76+
limitations under the License.
77+

‎chef-server/Rakefile‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# -*- ruby -*-
2+
require 'rubygems'
3+
require 'rake/gempackagetask'
4+
5+
GEM = "chef-server"
6+
VERSION = "0.0.1"
7+
AUTHOR = "Adam Jacob"
8+
EMAIL = "adam@hjksolutions.com"
9+
HOMEPAGE = "http://hjksolutions.com"
10+
SUMMARY = "A configuration management system server."
11+
12+
spec = Gem::Specification.new do |s|
13+
s.name = GEM
14+
s.version = VERSION
15+
s.platform = Gem::Platform::RUBY
16+
s.has_rdoc = true
17+
s.extra_rdoc_files = ["README.txt", "LICENSE", 'NOTICE']
18+
s.summary = SUMMARY
19+
s.description = s.summary
20+
s.author = AUTHOR
21+
s.email = EMAIL
22+
s.homepage = HOMEPAGE
23+
24+
# Uncomment this to add a dependency
25+
s.add_dependency "stomp"
26+
s.add_dependency "stompserver"
27+
s.add_dependency "ferret"
28+
s.add_dependency "merb-core"
29+
s.add_dependency "haml"
30+
s.add_dependency "ruby-openid"
31+
s.add_dependency "json"
32+
33+
s.bindir = "bin"
34+
s.executables = %w( chef-indexer chef-server )
35+
36+
s.files = %w(LICENSE README.txt Rakefile) + Dir.glob("{lib}/**/*")
37+
end
38+
39+
Rake::GemPackageTask.new(spec) do |pkg|
40+
pkg.gem_spec = spec
41+
end
42+
43+
task :install => [:package] do
44+
sh %{sudo gem install pkg/#{GEM}-#{VERSION}}
45+
end
46+
47+
# vim: syntax=Ruby
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
# See the License for the specific language governing permissions and
1919
# limitations under the License.
2020

21-
$: << File.join(File.dirname(__FILE__), "..", "lib")
22-
2321
require 'optparse'
2422
require 'chef'
2523
require 'rubygems'
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
require "rubygems"
2424
require "merb-core"
25+
require 'chef'
2526

2627
if ARGV[0] && ARGV[0] =~ /^[^-]/
2728
ARGV.push "-H"
@@ -31,6 +32,17 @@ unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.inde
3132
ARGV.push *%w[-a mongrel]
3233
end
3334

34-
ARGV.push *[ "-I", File.join(File.dirname(__FILE__), "..", "lib", "chef_server", "init.rb") ]
35+
ARGV.push *[ "-I", File.join(File.dirname(__FILE__), "..", "lib", "init.rb") ]
36+
37+
if index = ARGV.index("-C")
38+
config = ARGV[index+1]
39+
ARGV.delete("-C")
40+
ARGV.delete(config)
41+
Chef::Config.from_file(File.expand_path(config))
42+
else
43+
Chef::Config.from_file(
44+
File.join("/etc", "chef", "server.rb")
45+
)
46+
end
3547

3648
Merb.start

lib/chef_server/controllers/application.rb renamed to chef-server/lib/controllers/application.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
# limitations under the License.
1717
#
1818

19+
require "chef" / "mixin" / "checksum"
20+
21+
1922
class Application < Merb::Controller
2023

2124
def fix_up_node_id

lib/chef_server/controllers/cookbook_attributes.rb renamed to chef-server/lib/controllers/cookbook_attributes.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
require File.join(File.dirname(__FILE__), "..", "..", "chef", "mixin", "checksum")
2019

2120
class CookbookAttributes < Application
2221

lib/chef_server/controllers/cookbook_definitions.rb renamed to chef-server/lib/controllers/cookbook_definitions.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
require File.join(File.dirname(__FILE__), "..", "..", "chef", "mixin", "checksum")
2019

2120
class CookbookDefinitions < Application
2221

lib/chef_server/controllers/cookbook_files.rb renamed to chef-server/lib/controllers/cookbook_files.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
require File.join(File.dirname(__FILE__), "..", "..", "chef", "mixin", "checksum")
2019

2120
class CookbookFiles < Application
2221

0 commit comments

Comments
 (0)