<commit_before>= DESCRIPTION:

Use this cookbook to configure a chef client or server. The primary purpose is to be used with the chef-solo command to bootstrap a chef-server, per the Chef Wiki.

= REQUIREMENTS:

The passenger stack requires Chef 0.5.7+.

== Platform:

Best tested on Ubuntu 8.10, 9.04. See the Chef Wiki for up to date installation procedures for other platforms.

== Cookbooks:

Opscode cookbooks, http://github.com/opscode/cookbooks/tree/master:

* apache2
* runit
* couchdb
* stompserver
* passenger
* ruby

Note: These cookbooks are already included with the chef-solo bootstrap installer.

= ATTRIBUTES: 

* chef[:path] - Base directory for Chef files/directories. Default is /srv/chef (more FHS-y).

== Client:

* chef[:client_version] - For 'chef' gem, the client can be different than the server, though keeping versions the same is recommended.
* chef[:client_interval] - Number of seconds between chef-client daemon runs. Default 1800 (30 minutes).
* chef[:client_splay] - Random range of seconds added to interval. Default 20.
* chef[:client_log] - Where the client should log. 

== Server:

* chef[:server_version] - For 'chef-server' and 'chef-server-slice' gems.
* chef[:server_log] - Where the server should log. Default /var/log/chef/server.log.
* chef[:server_path] - Merb root directory for the chef-server merb app. Default is the gem installation directory, needs to be updated on servers using other installation methods.

= USAGE:

This cookbook is primarily designed to bootstrap a chef server and clients via chef-solo per the Chef Wiki Installation page. It can also be used for ongoing configuration of Chef.

For clients, the cookbook will set up a runit service for the chef-client. You can automatically validate a node by first creating /etc/chef/validation_token, with contents equal to the validation_token set in /etc/chef/server.rb (change the default value for your site). The client recipe will then remove the token file if it exists after the node is validated.

For servers, the cookbook will set up a runit service for chef-indexer, and will set up chef-server itself as a Rack app under Apache+Passenger. The server will listen only for HTTPS by default, see "SSL Certificates" below for more. The server can optionally protect the page via simple htauth, and be accessed via port 444. Remember to add the port to the node attribute apache[:listen_ports].

== SSL Certificates: 

The default configuration sets up the server to use HTTPS. The server recipe will generate a self-signed PEM certificate on the first run (normally via chef-solo). You should generate your own site-specific certificate, or purchase a certificate and replace the example after installation.

= LICENSE and AUTHOR:

Author:: <NAME> <<EMAIL>>
Author:: <NAME> <<EMAIL>>

Copyright 2008-2009, Opscode, Inc
Copyright 2009, 37signals

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software<commit_msg>cook-80, update readme for server<commit_after>= DESCRIPTION:

Use this cookbook to configure a chef client or server. The primary purpose is to be used with the chef-solo command to bootstrap a chef-server, per the Chef Wiki.

= REQUIREMENTS:

The passenger stack requires Chef 0.5.7+.

== Platform:

Best tested on Ubuntu 8.10, 9.04. See the Chef Wiki for up to date installation procedures for other platforms.

== Cookbooks:

Opscode cookbooks, http://github.com/opscode/cookbooks/tree/master:

* apache2
* runit
* couchdb
* stompserver
* passenger
* ruby

Note: These cookbooks are already included with the chef-solo bootstrap installer.

= ATTRIBUTES: 

* chef[:path] - Base directory for Chef files/directories. Default is /srv/chef (more FHS-y).

== Client:

* chef[:client_version] - For 'chef' gem, the client can be different than the server, though keeping versions the same is recommended.
* chef[:client_interval] - Number of seconds between chef-client daemon runs. Default 1800 (30 minutes).
* chef[:client_splay] - Random range of seconds added to interval. Default 20.
* chef[:client_log] - Where the client should log. 

== Server:

* chef[:server_version] - For 'chef-server' and 'chef-server-slice' gems.
* chef[:server_log] - Where the server should log. Default /var/log/chef/server.log.
* chef[:server_path] - Merb root directory for the chef-server merb app. Default is the gem installation directory, needs to be updated on servers using other installation methods.

= USAGE:

This cookbook is primarily designed to bootstrap a chef server and clients via chef-solo per the Chef Wiki Installation page. It can also be used for ongoing configuration of Chef.

For clients, the cookbook will set up a runit service for the chef-client. You can automatically validate a node by first creating /etc/chef/validation_token, with contents equal to the validation_token set in /etc/chef/server.rb (change the default value for your site). The client recipe will then remove the token file if it exists after the node is validated.

For servers, the cookbook will set up a runit service for chef-indexer, and will set up chef-server itself as a Rack app under Apache+Passenger. The server will listen only for HTTPS by default, see "SSL Certificates" below for more. 

== HTTP Authentication 

The server can optionally protect the page via simple htauth, and be accessed via port 444. Remember to add the port to the node attribute apache[:listen_ports]. The password file is /etc/chef/htpasswd.user by default, but you can also use LDAP instead. Be sure to include the appropriate Apache module.

== SSL Certificates: 

The default configuration sets up the server to use HTTPS. The server recipe will generate a self-signed PEM certificate on the first run (normally via chef-solo). You should generate your own site-specific certificate, or purchase a certificate and replace the example after installation.

== Runit Installations:

For older configurations where runit was the default for chef-server, this cookbook can be used to replace that configuration with chef-server under Passenger. 

The advantages to using Passenger are that authentication can be added, and the restart bug with merb workers no longer exists. 

= LICENSE and AUTHOR:

Author:: <NAME> <<EMAIL>>
Author:: <NAME> <<EMAIL>>

Copyright 2008-2009, Opscode, Inc
Copyright 2009, 37signals

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

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
{'fraction_non_alphanumeric': 0.06789581504243489, 'fraction_numerical': 0.011706175007316359, 'mean_word_length': 4.352388410336727, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3343628', 'n_tokens_mistral': 1921, 'n_tokens_neox': 1789, 'n_words': 941}