summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2012-12-20 17:14:04 -0800
committerjkeiser <jkeiser@opscode.com>2012-12-20 17:14:04 -0800
commit5d12cbf2dede123a40d3f31378282ff0221c3615 (patch)
treebe4b6ad047d6c5315adc35e3edf46519254889ab
parent397601fc5ccb754eeeffb20b2953d13da3beeafc (diff)
downloadchef-zero-5d12cbf2dede123a40d3f31378282ff0221c3615.tar.gz
Better readme
-rw-r--r--README.rdoc75
1 files changed, 72 insertions, 3 deletions
diff --git a/README.rdoc b/README.rdoc
index 4456659..8448689 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -4,7 +4,76 @@
chef-zero is a simple, easy-instal, in-memory Chef server that can be useful
for Chef client testing and chef-solo-like tasks that require a full Chef
-server. It IS intended to be simple, fully Chef 11 compliant, easy to
-run and fast to start. It is NOT intended to be highly scalable, performant
-or persistent.
+server. It IS intended to be simple, Chef 11 compliant, easy to run and fast
+to start. It is NOT intended to be secure, scalable, performant or persistent.
+It does NO input validation, authentication or authorization (it will not
+throw a 400, 401 or 403). It does not save data, and will start up empty each
+time you start it.
+= INSTALLATION:
+
+This server can be installed as a Ruby Gem.
+
+ gem install chef-zero
+
+You can also copy the source repository and install it using +rake install+.
+
+= TEST SERVER USAGE:
+
+One of chef-zero's primary uses is as a small test server for people writing and
+testing clients. To bring it up, simply do:
+
+ require 'chef_zero/server'
+ server = ChefZero::Server.new(:Port => 8889)
+ server.start
+
+To bring it up in the background, do:
+
+ thread = Thread.new { server.start }
+
+To kill the background server, do:
+
+ thread.stop
+
+= COMMAND LINE USAGE:
+
+To simply run the server, you can just type +chef-zero+ after installing and you
+will have a fully functional (empty) Chef Server running.
+
+To try it out, go into the +chef-zero/playground+ directory and run knife. It
+will behave the same as a normal Chef server, and all normal knife commands will
+work (show, list, delete, from file, upload, download, diff ...). For example,
+with +knife-essentials+ (or Chef 11) you can upload everything in the repo:
+
+ chef-zero/playground> knife upload .
+ Created remote/cookbooks/blah
+ Created remote/cookbooks/blork
+ Created remote/data_bags/foo/
+ Created remote/data_bags/foo/bar.json
+ Created remote/data_bags/foo/baz.json
+ Created remote/data_bags/foo/blarghle.json
+ Created remote/data_bags/foom/
+ Created remote/data_bags/foom/x.json
+ Created remote/data_bags/widdle/
+ Created remote/data_bags/widdle/blank.json
+ Created remote/data_bags/widdle/wow.json
+ Created remote/environments/desert.json
+ Created remote/environments/rainforest.json
+ Created remote/environments/semi_arid_plains.json
+
+ chef-zero/playground> knife environment list
+ _default
+ desert
+ rainforest
+ semi_arid_plains
+
+To use it in your own repository, create a +knife.rb+ like so:
+
+ chef_server_url "http://127.0.0.1:8889"
+ node_name "stickywicket"
+ client_key "path_to_any_pem_file.pem"
+
+And use knife like you normally would.
+
+Since Chef Zero does no authentication, any .pem file will do. The client just
+needs something to sign requests with (which will be ignored on the server).