diff --git a/emacs/README.md b/emacs/README.md new file mode 100644 index 000000000..54bec12de --- /dev/null +++ b/emacs/README.md @@ -0,0 +1,59 @@ +Description +=========== + +Installs the "emacs" package to install the worlds most flexible, customizable text editor. + +Changes +======= + +## v0.7.0: + +* Initial public release + +Roadmap +------- + +* [COOK-551] - FreeBSD Support +* [COOK-839] - install non-X11 package by setting an attribute + +Requirements +============ + +A package named "emacs" must be available via the native package manager for the Platform. + +Attributes +========== + +Does not use any attributes yet. See __Roadmap__. + +Recipes +======= + +default +------- + +Installs the emacs package. + +Usage +===== + +Simply add `recipe[emacs]` to the run list of a base role that gets applied to all systems. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/fail2ban/README.md b/fail2ban/README.md new file mode 100644 index 000000000..59707ccfe --- /dev/null +++ b/fail2ban/README.md @@ -0,0 +1,48 @@ +Description +=========== + +Installs and configures `fail2ban`, a utility that watches logs for failed login attempts and blocks repeat offenders with firewall rules. + +Changes +======= + +## v1.0.0: + +* Current public release. + +Requirements +============ + +A package named "fail2ban" must be available via the native package manager for the Platform. + +Recipes +======= + +default +------- + +Installs the fail2ban package, manages 2 templates: `/etc/fail2ban/fail2ban.conf` and `/etc/fail2ban/jail.conf`, and manages the fail2ban service. + +Usage +===== + +Typically, include `recipe[fail2ban]` in a base role applied to all nodes. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/heartbeat/README.md b/heartbeat/README.md new file mode 100644 index 000000000..8c5054cab --- /dev/null +++ b/heartbeat/README.md @@ -0,0 +1,65 @@ +Description +=========== + +Installs, but does not configure heartbeat. + +Changes +======= + +## v0.7.1: + +* Current public release. + +Roadmap +------- + +Add management of configuration files, possibly with Chef search(). + +* /etc/ha.d/ha.cf +* /etc/ha.d/haresources +* /etc/ha.d/authkeys + +Requirements +============ + +## Platform: + +* Ubuntu 10.04+ +* Debian 6.0+ + +Recipes +======= + +default +------- + +Installs the heartbeat and heartbeat-dev packages, and manages the +heartbeat service. The recipe does not at this time manage any configuration. + +Usage +===== + +On systems that need to be HA pairs, use this cookbook. Set up one to +be the primary, and the other to be secondary with a clever role name, +like "heartbeat-primary" and "heartbeat-secondary". To manage the +heartbeat configuration files, modifications to the recipe to add +template resources is required at this time. See __Roadmap__ above. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/iptables/README.md b/iptables/README.md new file mode 100644 index 000000000..629a531b5 --- /dev/null +++ b/iptables/README.md @@ -0,0 +1,92 @@ +Description +=========== + +Sets up iptables to use a script to maintain firewall rules. However +this cookbook may be deprecated or heavily modified in favor of the +general firewall cookbook, see __Roadmap__. + +Changes +======= + +## v0.9.3: + +* Current public release. + +Roadmap +------- + +* [COOK-652] - create a firewall cookbook +* [COOK-688] - create iptables providers for all resources + +Requirements +============ + +## Platform: + +* Ubuntu/Debian +* RHEL/CentOS + +Recipes +======= + +default +------- + +The default recipe will install iptables and provides a perl script +(installed in `/usr/sbin/rebuild-iptables`) to manage rebuilding +firewall rules from files dropped off in `/etc/iptables.d`. + +Definitions +=========== + +See __Roadmap__ for plans to replace the definition with LWRPs. + +iptables\_rule +-------------- + +The definition drops off a template in `/etc/iptables.d` after the +`name` parameter. The rule will get added to the local system firewall +through notifying the `rebuild-iptables` script. See __Examples__ below. + +Usage +===== + +Ensure that the system is set up to use the definition and rebuild +script with `recipe[iptables]`. Then create templates with the +firewall rules in the cookbook where the definition will be used. See +__Examples__. + +Examples +-------- + +To enable port 80, e.g. in an `httpd` cookbook, create the following +template: + + # Port 80 for http + -A FWR -p tcp -m tcp --dport 80 -j ACCEPT + +This would go in the cookbook, +`httpd/templates/default/port_http.erb`. Then to use it in +`recipe[httpd]`: + + iptables_rule "http" + +License and Author +================== + +Author:: Adam Jacob +Author:: Joshua Timberman + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/jira/README.md b/jira/README.md new file mode 100644 index 000000000..82585fc83 --- /dev/null +++ b/jira/README.md @@ -0,0 +1,96 @@ +Description +=========== + +Installs and configures Jira and starts it as a service under runit. + +Changes +======= + +## v0.8.2 + +* Current public release + +Roadmap +------- + +* [COOK-464] - Automate mysql portions + +Requirements +============ + +## Platform: + +* Ubuntu 10.04 +* Debian 6.0 + +Requires a MySQL database server, but currently out of scope to run +this on the same system, or even automatically set it up (see +__Roadmap__ and __Usage__). + +## Cookbooks: + +* runit +* java +* apache2 + +Attributes +========== + +See `attributes/default.rb` for defaults. + +* `node['jira']['virtual_host_name']` - hostname to use in the virtualhost +* `node['jira']['virtual_host_alias']` - server alias(es) to use in + the virtual host. +* `node['jira']['version']` - version of jira to install +* `node['jira']['install_path']` - location where jira should be installed +* `node['jira']['run_user']` - user to run the jira service as +* `node['jira']['database']` - the name of the database to connect to +* `node['jira']['database_host']` - hostname of the database server +* `node['jira']['database_user']` - user to connect to the database +* `node['jira']['database_password']` - password to use for the + database connection. + +Recipes +======= + +default +------- + +The default recipe sets up runit, java and apache2 first, then +downloads jira-standalone from atlassian of the specified version. It +also downloads and installs the mysql connector. + +After writing the configuration and startup.sh script, jira will start +under runit, and an apache vhost will be set up for it. + +Usage +===== + +Until COOK-464 is released, the following manual steps are required to +set up the database. + +Mysql queries: + + create database jiradb character set utf8; + grant all privileges on jiradb.* + to '$jira_user'@'localhost' identified by '$jira_password'; + flush privileges; + +License and Author +================== + +Author:: Adam Jacob + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/lvm/README.md b/lvm/README.md new file mode 100644 index 000000000..6655aea63 --- /dev/null +++ b/lvm/README.md @@ -0,0 +1,52 @@ +Description +=========== + +Installs lvm2 package and ensures it stays upgraded. + +Changes +======= + +## v0.7.1: + +* Current public release + +Roadmap +------- + +* [COOK-876] - lwrps for manipulating lvm objects (pv, lv, etc) + +Requirements +============ + +* Debian/Ubuntu +* RHEL/CentOS + +Resources/Providers +=================== + +None yet, see __Roadmap__. + +Usage +===== + +Make sure the lvm package is always up to date with this recipe. Put +it in a base role that gets applied to all nodes. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/man/README.md b/man/README.md new file mode 100644 index 000000000..1f40fb770 --- /dev/null +++ b/man/README.md @@ -0,0 +1,45 @@ +Description +=========== + +Installs man. + +Changes +======= + +## v0.7.1: + +* Current public release + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* RHEL/CentOS +* Fedora + +Usage +===== + +Ensure the man package is installed with this cookbook, probably in +the base role applied to all systems. + +License and Author +================== + +Author:: Adam Jacob + +Copyright:: 2008, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/maradns/README.md b/maradns/README.md new file mode 100644 index 000000000..a638982a7 --- /dev/null +++ b/maradns/README.md @@ -0,0 +1,75 @@ +Description +=========== + +Installs and configures maradns. + +Changes +======= + +## v0.8.1: + +* Current public release. + +Roadmap +------- + +* [COOK-882] - utilize a "dns entry" databag and/or lwrp for db config + file + +Requirements +============ + +## Platform: + +* Debian/Ubuntu + +Attributes +========== + +* `node['maradns']['recursive_acl']` - + +Recipes +======= + +default +------- + +Installs the maradns package, manages the `maradns` and `zoneserver` +services and writes out the configuration files. + +Resources/Providers +=================== + +None yet. See __Roadmap__. + + +Usage +===== + +In order to use this recipe, create the DNS entry configuration file +as `templates/default/db.DOMAIN.erb`, where `DOMAIN` is the domain +detected by `ohai` on the node. For example, if the node's domain is +`example.com`, the file would be `db.example.com.erb`. Refer to the +maradns zone file documentation for more information on how to write +this configuration. + +* http://www.maradns.org/notes.html + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009-2010, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/mercurial/README.md b/mercurial/README.md new file mode 100644 index 000000000..6a8257d60 --- /dev/null +++ b/mercurial/README.md @@ -0,0 +1,47 @@ +Description +=========== + +Installs mercurial + +Changes +======= + +## v0.7.1: + +* Current public release + +Roadmap +------- + +* [COOK-879] - mercurial lwrp for scm repo management + +Requirements +============ + +A package named "mercurial" must exist in the platform package +management system. + +Usage +===== + +Install mercurial to make sure it is available to check out code from +mercurial repositories. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/motd-tail/README.md b/motd-tail/README.md new file mode 100644 index 000000000..4be7f1f5a --- /dev/null +++ b/motd-tail/README.md @@ -0,0 +1,56 @@ +Description +=========== + +Updates motd.tail with Chef Roles + +Changes +======= + +## v1.0.0: + +* Current public release. + +Requirements +============ + +Needs to be used on a system that utilizes /etc/motd.tail, e.g. Ubuntu. + +Usage +===== + +When the node runs, the recipe will add the list of roles to +`/etc/motd.tail` so you can tell at a glance on login what the system is. + +Examples +-------- + +For example, + + % ssh myserver.int.example.org + *** + Chef-Client - myserver.int.example.org + ubuntu + samba_server + netatalk_server + munin_server + rsyslog_server + *** + +License and Author +================== + +Author:: Nathan Haneysmith + +Copyright:: 2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/nscd/README.md b/nscd/README.md new file mode 100644 index 000000000..4d1b583ca --- /dev/null +++ b/nscd/README.md @@ -0,0 +1,60 @@ +Description +=========== + +Installs and configures nscd. + +Changes +======= + +## v0.7.0: + +* Current public release. + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* RHEL/CentOS + +Recipes +======= + +default +------- + +Installs nscd, manages the nscd service and makes available commands +to clear the nscd databases (passwd and group) so they can be notified +in other recipes (such as when managing openldap). + +Usage +===== + +If you're using nscd, add this recipe. If you need to notify the clear +commands, e.g., + + cookbook_file "/etc/nsswitch.conf" do + source "nsswitch.conf" + notifies :run, "execute[nscd-clear-passwd]", :immediately + notifies :run, "execute[nscd-clear-group]", :immediately + end + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/openssh/README.md b/openssh/README.md new file mode 100644 index 000000000..3b321e350 --- /dev/null +++ b/openssh/README.md @@ -0,0 +1,55 @@ +Description +=========== + +Installs openssh. + +Changes +======= + +## v0.8.1: + +* Current public release + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* RHEL/CentOS/Scientific +* Fedora +* ArchLinux + +Recipes +======= + +default +------- + +Selects the packages to install by package name and manages the sshd +service. + +Usage +===== + +Ensure that the openssh packages are installed and the service is +managed with `recipe[openssh]`. + +License and Author +================== + +Author:: Adam Jacob + +Copyright:: 2008-2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/postfix/README.md b/postfix/README.md new file mode 100644 index 000000000..85c94002b --- /dev/null +++ b/postfix/README.md @@ -0,0 +1,174 @@ +Description +=========== + +Installs and configures postfix for client or outbound relayhost, or +to do SASL authentication. + +Changes +======= + +## v0.8.4: + +* Current public release. + +Roadmap +------- + +* [COOK-880] - add client/server recipes for search +* [COOK-881] - add (encrypted) data bag support for sasl credentials + +Requirements +============ + +## Platform: + +* Ubuntu 10.04+ +* Debian 6.0+ + +Attributes +========== + +See `attributes/default.rb` for default values. + +* `node['postfix']['mail_type']` - Sets the kind of mail + configuration. `master` will set up a server (relayhost). +* `node['postfix']['myhostname']` - corresponds to the myhostname + option in `/etc/postfix/main.cf`. +* `node['postfix']['mydomain']` - corresponds to the mydomain option + in `/etc/postfix/main.cf`. +* `node['postfix']['myorigin']` - corresponds to the myorigin option + in `/etc/postfix/main.cf`. +* `node['postfix']['relayhost']` - corresponds to the relayhost option + in `/etc/postfix/main.cf`. +* `node['postfix']['mail_relay_networks']` - corresponds to the + mynetworks option in `/etc/postfix/main.cf`. +* `node['postfix']['smtpd_use_tls']` - set to "yes" to use TLS for + SMTPD, which will use the snakeoil certs. +* `node['postfix']['smtp_sasl_auth_enable']` - set to "yes" to enable + SASL authentication for SMTP. +* `node['postfix']['smtp_sasl_password_maps']` - corresponds to the + `smtp_sasl_password_maps` option in `/etc/postfix/main.cf`. +* `node['postfix']['smtp_sasl_security_options']` - corresponds to the + `smtp_sasl_security_options` option in `/etc/postfix/main.cf`. +* `node['postfix']['smtp_tls_cafile']` - corresponds to the `smtp_tls_CAfile` + option in `/etc/postfix/main.cf`. +* `node['postfix']['smtp_use_tls']` - corresponds to the + `smtp_use_tls` option in `/etc/postfix/main.cf`. +* `node['postfix']['smtp_sasl_user_name']` - mapped in the + `sasl_passwd` file as the user to authenticate as. +* `node['postfix']['smtp_sasl_passwd']` - mapped in the `sasl_passwd` + file as the password to use. + +Recipes +======= + +default +------- + +Installs the postfix package and manages the service and the main +configuration files (`/etc/postfix/main.cf` and +`/etc/postfix/master.cf`). See __Usage__ and __Examples__ to see how +to affect behavior of this recipe through configuration. + +sasl\_auth +---------- + +Sets up the system to authenticate with a remote mail relay using SASL +authentication. + + +Usage +===== + +On systems that should simply send mail directly to a relay, or out to +the internet, use `recipe[postfix]` and modify the +`node['postfix']['relayhost']` attribute via a role. + +On systems that should be the MX for a domain, set the attributes +accordingly and make sure the `node['postfix']['mail_type']` attribute +is `master`. + +If you need to use SASL authentication to send mail through your ISP +(such as on a home network), use `recipe[postfix::sasl_auth]` and set +the appropriate attributes. + +For each of these implementations, see __Examples__ for role usage. + +Examples +-------- + +The example roles below only have the relevant postfix usage. You may +have other contents depending on what you're configuring on your +systems. + +The `base` role is applied to all nodes in the environment. + + name "base" + run_list("recipe[postfix]") + override_attributes( + "postfix" => { + "mail_type" => "client", + "mydomain" => "example.com", + "myorigin" => "example.com", + "relayhost" => "[smtp.example.com]", + "smtp_use_tls" => "no" + } + ) + +The `relayhost` role is applied to the nodes that are relayhosts. +Often this is 2 systems using a CNAME of `smtp.example.com`. + + name "relayhost" + run_list("recipe[postfix]") + override_attributes( + "postfix" => { + "mail_relay_networks" => "10.3.3.0/24", + "mail_type" => "master", + "mydomain" => "example.com", + "myorigin" => "example.com" + } + ) + +The `sasl_relayhost` role is applied to the nodes that are relayhosts +and require authenticating with SASL. For example this might be on a +household network with an ISP that otherwise blocks direct internet +access to SMTP. + + name "sasl_relayhost" + run_list("recipe[postfix], recipe[postfix::sasl_auth]") + override_attributes( + "postfix" => { + "mail_relay_networks" => "10.3.3.0/24", + "mail_type" => "master", + "mydomain" => "example.com", + "myorigin" => "example.com", + "relayhost" => "[smtp.comcast.net]:587", + "smtp_sasl_auth_enable" => "yes", + "smtp_sasl_passwd" => "your_password, + "smtp_sasl_user_name" => "your_username" + } + ) + +For an example of using encrypted data bags to encrypt the SASL +password, see the following blog post: + +* http://jtimberman.github.com/blog/2011/08/06/encrypted-data-bag-for-postfix-sasl-authentication/ + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/rsync/.#README.md b/rsync/.#README.md new file mode 120000 index 000000000..893b5d1a4 --- /dev/null +++ b/rsync/.#README.md @@ -0,0 +1 @@ +jtimberman@doppelbock.local.876 \ No newline at end of file diff --git a/rsync/README.md b/rsync/README.md new file mode 100644 index 000000000..4664f3d73 --- /dev/null +++ b/rsync/README.md @@ -0,0 +1,60 @@ +Description +=========== + + + +Changes +======= + + + +## v 0.0.0 + +Requirements +============ + + +Attributes +========== + + + +Recipes +======= + + + +default +------- + +Resources/Providers +=================== + + + +Usage +===== + + + +Examples +-------- + +License and Author +================== + +Author:: AUTHOR_NAME + +Copyright:: YYYY, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/runit/README.md b/runit/README.md new file mode 100644 index 000000000..211b90cec --- /dev/null +++ b/runit/README.md @@ -0,0 +1,228 @@ +Description +=========== + +Installs runit and provides `runit_service` definition for managing new +services under runit. + +This cookbook does not use runit to replace system init, nor are there +plans to do so. + +For more information about runit: + +* http://smarden.org/runit/ + +Changes +======= + +## v0.14.2 + +Roadmap +------- + +* [CHEF-154] - implement lwrp for runit service + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* Gentoo + +Attributes +========== + +See `attributes/default.rb` for defaults. + +* `node['runit']['sv_bin']` - Full path to the `sv` binary. +* `node['runit']['chpst_bin']` - Full path to the `chpst` binary. +* `node['runit']['service_dir']` - Full path to the default "services" + directory where enabled services are linked. +* `node['runit']['sv_dir']` - Full path to the directory where the + service lives, which gets linked to `service_dir`. + +Recipes +======= + +default +------- + +Installs and sets up runit on the system. Assumes a package +installation, so native package must exist. This recipe will make sure +that the runsvdir process gets started, ensures that inittab is +updated with the SV entry. The package will be preseeded on +ubuntu/debian signal init, otherwise the appropriate action is chosen +to notify the runsvdir command. + +Older versions of Ubuntu (<= 10.04) are supported, but support may be +removed in a future version. + +Definitions +=========== + +The definition in this cookbook will be deprecated by an LWRP in a +future version. See __Roadmap__. + +runit\_service +-------------- + +This definition includes `recipe[runit]` to ensure it is installed +first. As LWRPs cannot use `include_recipe`, this will not be +available in future versions, so runit will need to be in a role or +node run list. + +Sets up a new service to be managed and supervised by runit. It will +be created in the `node['runit']['sv_dir']` unless otherwise specified +in the `directory` parameter (see below). + +### Parameters: + +* `name` - Name of the service. This will be used in the template file + names (see __Usage__), as well as the name of the service resource + created in the definition. +* `directory` - the directory where the service's configuration and + scripts should be located. Default is `node['runit']['sv_dir']`. +* `only_if` - unused, will be removed in a future version (won't be + present in lwrp). Default is false. +* `finish_script` - if true, a finish script should be created. + Default is false. For more information see: [Description of runsv](http://smarden.org/runit/runsv.8.html). +* `control` - Array of signals to create a control directory with + control scripts (e.g., `sv-SERVICE-control-SIGNAL.erb`, where + SERVICE is the name parameter for the service name, and SIGNAL is + the Unix signal to send. Default is an empty array. For more + information see: + [Customize Control](http://smarden.org/runit/runsv.8.html) +* `run_restart` - if true, the service resource will subscribe to + changes to the run script and restart itself when it is modified. + Default is true. +* `active_directory` - used for user-specific services. Default is + `node['runit']['service_dir']`. +* `owner` - userid of the owner for the service's files, and should be + used in the run template with chpst to ensure the service runs as + that user. Default is root. +* `group` - groupid of the group for the service's files, and should + be used in the run template with chpst to ensure the service runs as + that group. Default is root. +* `template_name` - specify an alternate name for the templates + instead of basing them on the name parameter. Default is the name parameter. +* `start_command` - The command used to start the service in + conjunction with the `sv` command and the `service_dir` name. + Default is `start`. +* `stop_command` - The command used to stop the service in conjunction + with the `sv` command and the `service_dir` name. Default is `stop`. +* `restart_command` - The command used to restart the service in + conjunction with the `sv` command and the `service_dir` name. You + may need to modify this to send an alternate signal to restart the + service depending on the nature of the process. Default is `restart` +* `status_command` - The command used to check status for the service in + conjunction with the `sv` command and the `service_dir` name. This + is used by chef when checking the current resource state in managing + the service. Default is `status`. +* `options` - a Hash of variables to pass into the run and log/run + templates with the template resource `variables` parameter. + Available inside the template(s) as `@options`. Default is an empty Hash. +* `env` - + +### Examples: + +Create templates for `sv-myservice-run.erb` and +`sv-myservice-log-run.erb` that have the commands for starting +myservice and its logger. + + runit_service "myservice" + +See __Usage__ for expanded examples. + +Resources/Providers +=================== + +None yet. See __Roadmap__. + +Usage +===== + +To get runit installed on supported platforms, use `recipe[runit]`. +Once it is installed, use the `runit_service` definition to set up +services to be managed by runit. Do note that once +[CHEF-154](http://tickets.opscode.com/browse/CHEF-154) is implemented, +some of the usage/implementation here will change. In order to use the +`runit_service` definition, two templates must be created for the +service, `cookbook_name/templates/default/sv-SERVICE-run.erb` and +`cookbook_name/templates/default/sv-SERVICE-log-run.erb`. Replace +`SERVICE` with the name of the service you're managing. For more usage, +see __Examples__. + +Examples +-------- + +We'll set up `chef-client` to run as a service under runit, such as is +done in the `chef-client` cookbook. This example will be more simple +than in that cookbook. First, create the required run template, +`chef-client/templates/default/sv-chef-client-run.erb`. + + #!/bin/sh + exec 2>&1 + exec /usr/bin/env chef-client -i 1800 -s 30 + +Then create the required log/run template, +`chef-client/templates/default/sv-chef-client-run.erb`. + + #!/bin/sh + exec svlogd -tt ./main + +__Note__ This will cause output of the running process to go to +`/etc/sv/chef-client/log/main/current`. + +Finally, set up the service in the `chef-client` recipe with: + + runit_service "chef-client" + +Next, let's set up memcached with some additional options. First, the +`memcached/templates/default/sv-memcached-run.erb` template: + + #!/bin/sh + exec 2>&1 + exec chpst -u <%= @options[:user] %> /usr/bin/memcached -v -m <%= @options[:memory] %> -p <%= @options[:port] %> + +Note that the script uses chpst (which comes with runit) to set the +user option, then starts memcached on the specified memory and port +(see below). + +The log/run template, +`memcached/templates/default/sv-memcached-log-run.erb`: + + #!/bin/sh + exec svlogd -tt ./main + +Finally, the `runit_service` in our recipe: + + runit_service "memcached" do + options({ + :memory => node[:memcached][:memory], + :port => node[:memcached][:port], + :user => node[:memcached][:user]}.merge(params) + ) + end + +This is where the user, port and memory options used in the run +template are used. + +License and Author +================== + +Author:: Adam Jacob +Author:: Joshua Timberman + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/screen/README.md b/screen/README.md new file mode 100644 index 000000000..8215e8598 --- /dev/null +++ b/screen/README.md @@ -0,0 +1,38 @@ +Description +=========== + +Installs screen + +Changes +======= + +## v0.7.1: + +* Current public release. + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* RHEL/CentOS/Fedora + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2008-2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/sqlite/README.md b/sqlite/README.md new file mode 100644 index 000000000..dafb9f77d --- /dev/null +++ b/sqlite/README.md @@ -0,0 +1,43 @@ +Description +=========== + +Installs sqlite. + +Changes +======= + +## v0.7.1: + +* Current public release + +Requirements +============ + +## Platform: + +* Debian/Ubuntu + +Usage +===== + +If you want to store data on a local sql database in a single file, +use sqlite, and include `recipe[sqlite]`. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/stompserver/README.md b/stompserver/README.md new file mode 100644 index 000000000..9e9e115fd --- /dev/null +++ b/stompserver/README.md @@ -0,0 +1,50 @@ +Description +=========== + +Installs stompserver and sets it up as a service. + +Changes +======= + +## v1.0.0 + +* Current public release + +Roadmap +------- + +* [COOK-877] - fix support for rhel family + +Requirements +============ + +## Platform: + +* Debian/Ubuntu +* RHEL/CentOS/Fedora + +Usage +===== + +This cookbook was primarily used when the Chef Server used stompserver +as the message queue. This may still be useful for some people. +Packages exist for Debian/Ubuntu but not RHEL. See __Roadmap__. + +License and Author +================== + +Author:: Joshua Timberman + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/subversion/README.md b/subversion/README.md new file mode 100644 index 000000000..558f90a84 --- /dev/null +++ b/subversion/README.md @@ -0,0 +1,90 @@ +Description +=========== + +Installs subversion for clients or sets up a server under Apache HTTPD. + +Changes +======= + +## v0.8.3: + +* Current public release + +Requirements +============ + +## Platforms: + +* Debian/Ubuntu +* RHEL/CentOS +* Fedora + +## Cookbooks: + +* apache2 + +Attributes +========== + +See `attributes/default.rb` for default values. The attributes are +used in the server recipe. + +* `node['subversion']['repo_dir']` - filesystem location of the + repository to serve. +* `node['subversion']['repo_name']` - name of the repository to serve up. +* `node['subversion']['server_name']` - server name used in the svn vhost. +* `node['subversion']['user']` - user to log into the svn vhost. +* `node['subversion']['password']` - htpasswd for the subversion user + in the server recipe. This should be overridden as the default is + not secure. + + +Recipes +======= + +default +------- + +Includes `recipe[subversion::client]`. + +client +------ + +Installs `subversion` packages. + +server +------ + +Sets up an SVN repository server with `recipe[apache2::mod_dav_svn]`. +This will use the `web_app` definition from the apache cookbook to +drop off the template, and uses the attributes for configuration. + +Usage +===== + +On nodes where `subversion` should be installed such as application +servers that will check out a repository, use `recipe[subversion]`. If +you would like a subversion server, use `recipe[subversion::server]`. +You should override `node['subversion']['password']` in the role that +applies the server recipe. + +License and Author +================== + +Author:: Adam Jacob +Author:: Joshua Timberman +Author:: Daniel DeLeo + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/subversion/attributes/default.rb b/subversion/attributes/default.rb new file mode 100644 index 000000000..7e1c91a71 --- /dev/null +++ b/subversion/attributes/default.rb @@ -0,0 +1,24 @@ +# +# Cookbook Name:: subversion +# Attributes:: server +# +# Copyright 2009, Daniel DeLeo +# +# 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 +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +default['subversion']['repo_dir'] = '/srv/svn' +default['subversion']['repo_name'] = 'repo' +default['subversion']['server_name'] = 'svn' +default['subversion']['user'] = 'subversion' +default['subversion']['password'] = 'subversion' diff --git a/ubuntu/README.md b/ubuntu/README.md new file mode 100644 index 000000000..25c35f90d --- /dev/null +++ b/ubuntu/README.md @@ -0,0 +1,74 @@ +Description +=========== + +Sets up apt sources for Ubuntu. + +Changes +======= + +## v0.99.0 + +* Current public release + +Roadmap +------- + +* [COOK-874] - select repositories to enable via attribute + +Requirements +============ + +## Platform: + +* Ubuntu + +## Cookbooks: + +* apt + +Attributes +========== + +See `attributes/default.rb` for default values. + +* `node['ubuntu']['archive_url']` - archived package repo URL +* `node['ubuntu']['security_url']` - security update package repo URL + +Recipes +======= + +default +------- + +Includes the apt default recipe to ensure the package cache is +updated and manages the `/etc/apt/sources.list` for the node's +platform code name. The template adds sources for main, restricted, +universe and multiverse. + +Usage +===== + +Include `recipe[ubuntu]` on systems where you want to manage the +sources.list. Currently the template enables main, restricted, +universe and multiverse for the node's codename (e.g., lucid, natty, +etc). See __Roadmap__. + +License and Author +================== + +Author:: Adam Jacob +Author:: Joshua Timberman + +Copyright:: 2008-2011, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/varnish/README.md b/varnish/README.md new file mode 100644 index 000000000..4f4837d5d --- /dev/null +++ b/varnish/README.md @@ -0,0 +1,71 @@ +Description +=========== + +Installs and configures varnish. + +Changes +======= + +## v 0.8.0: + +* Current public release. + +Roadmap +------- + +* COOK-648 - add RHEL support +* COOK-873 - better configuration control via attributes + +Requirements +============ + +## Platform: + +Tested on: + +* Ubuntu 10.04 +* Debian 6.0 + +Attributes +========== + +* `node['varnish']['dir']` - location of the varnish configuration + directory +* `node['varnish']['default']` - location of the `default` file that + controls the varnish init script on Debian/Ubuntu systems. + +Recipes +======= + +default +------- + +Installs the varnish package, manages the default varnish +configuration file, and the init script defaults file. + +Usage +===== + +On systems that need a high performance caching server, use +`recipe[varnish]`. Additional configuration can be done by modifying +the `default.vcl.erb` and `ubuntu-default.erb` templates. By default +the `ubuntu-default.erb` is set up for minimal configuration with no VCL. + +License and Author +================== + +Author:: Joe Williams + +Copyright:: 2008-2009, Joe Williams + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/zsh/README.md b/zsh/README.md new file mode 100644 index 000000000..68b61fd6a --- /dev/null +++ b/zsh/README.md @@ -0,0 +1,49 @@ +Description +=========== + +Installs zsh package and documentation. + +Changes +======= + +## v0.7.1 + +* Current public release. + +Requirements +============ + +## Platform: + +* Ubuntu 10.04+ +* Debian 6.0+ +* CentOS 5.7+ + +Should work anywhere there's a `zsh` package available in the platform +package manager. + +Usage +===== + +Whereever you have users who want to use `zsh` as their login shell, +use this recipe. For example, add `recipe[zsh]` to a base role applied +to all nodes. + +License and Author +================== + +Author:: Adam Jacob + +Copyright:: 2008-2009, Opscode, Inc + +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 +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.