Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

regenerated metadata.json

  • Loading branch information...
commit 48f25ba1c48effd02f5a9ba1289539e081ae6f76 1 parent 9a92d89
@schisamo schisamo authored
View
4 chef-client/metadata.json
@@ -1,7 +1,7 @@
{
"name": "chef-client",
"description": "Manages aspects of only chef-client",
- "long_description": "DESCRIPTION\n===========\n\nThis cookbook is used to configure a system as a Chef Client.\n\nREQUIREMENTS\n============\n\nChef 0.9.12 or later is required.\n\nSupported Platforms\n-------------------\n\nThe following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n* Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOther Cookbooks\n---------------\n\nOther cookbooks can be used with this cookbook but they are not explicitly required. The default settings in this cookbook do not require their use. The other cookbooks (on cookbooks.opsocde.com) are:\n\n* bluepill\n* daemontools\n* runit\n\nSee __USAGE__ below.\n\nATTRIBUTES\n==========\n\n* `node[\"chef_client\"][\"interval\"]` - Sets `Chef::Config[:interval]` via command-line option for number of seconds between chef-client daemon runs. Default 1800.\n* `node[\"chef_client\"][\"splay\"]` - Sets `Chef::Config[:splay]` via command-line option for a random amount of seconds to add to interval. Default 20.\n* `node[\"chef_client\"][\"log_dir\"]` - Sets directory used in `Chef::Config[:log_location]` via command-line option to a location where chef-client should log output. Default \"/var/log/chef\".\n* `node[\"chef_client\"][\"server_url\"]` - Sets `Chef::Config[:chef_server_url]` in the config file to the Chef Server URI. Default \"http://localhost:4000\". See __USAGE__.\n* `node[\"chef_client\"][\"validation_client_name\"]` - Sets `Chef::Config[:validation_client_name]` in the config file to the name of the validation client. Default \"chef-validator\". See __USAGE__.\n* `node[\"chef_client\"][\"init_style\"]` - Sets up the client service based on the style of init system to use. Default is based on platform and falls back to \"none\". See __USAGE__.\n* `node[\"chef_client\"][\"run_path\"]` - Directory location where chef-client should write the PID file. Default based on platform, falls back to \"/var/run\".\n* `node[\"chef_client\"][\"cache_path\"]` - Directory location for `Chef::Config[:file_cache_path]` where chef-client will cache various files. Default is based on platform, falls back to \"/var/chef/cache\".\n* `node[\"chef_client\"][\"backup_path\"]` - Directory location for `Chef::Config[:file_backup_path]` where chef-client will backup templates and cookbook files. Default is based on platform, falls back to \"/var/chef/backup\".\n\nRECIPES\n=======\n\nThis section describes the recipes in the cookbook and how to use them in your environment.\n\nconfig\n------\n\nSets up the `/etc/chef/client.rb` config file from a template and reloads the configuration for the current chef-client run.\n\nservice\n-------\n\nUse this recipe on systems that should have a `chef-client` daemon running, such as when Knife bootstrap was used to install Chef on a new system.\n\nThis recipe sets up the `chef-client` service depending on the `init_style` attribute (see above). The following init styles are supported:\n\n* init - uses the init script included in the chef gem, supported on debian and redhat family distributions.\n* upstart - uses the upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the init script included in this cookbook for ArchLinux, supported on arch.\n* runit - sets up the service under runit, supported on ubuntu, debian and gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure ruby process monitor, this should work on any platform.\n* daemontools -sets up the service under daemontools, supported on debian, ubuntu and arch\n* bsd - prints a message about how to update BSD systems to enable the chef-client service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the `chef-client::service` recipe by default.\n\n`delete_validation`\n-------------------\n\nUse this recipe to delete the validation certificate (default `/etc/chef/validation.pem`) when using a `chef-client` after the client has been validated and authorized to connect to the server.\n\nBeware if using this on your Chef Server. First copy the validation.pem certificate file to another location, such as your knife configuration directory (`~/.chef`) or [Chef Repository](http://wiki.opscode.com/display/chef/Chef+Repository).\n\nUSAGE\n=====\n\nCreate a `base` role that will represent the base configuration for any system that includes managing aspects of the chef-client. Add recipes to the run list of the role, customize the attributes, and apply the role to nodes. For example, the following role (Ruby DSL) will set the init style to `init`, delete the validation certificate (as the client would already be authenticated) and set up the chef-client as a service using the init style.\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"init\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[chef-client::config]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client::config` recipe is only required with init style `init` (default setting for the attribute on debian/redhat family platforms, because the init script doesn't include the `pid_file` option which is set in the config.\n\nThe default Chef Server will be `http://localhost:4000` which is the `Chef::Config[:chef_server_url]` default value. To use the config recipe with the Opscode Platform, for example, add the following to the `override_attributes`\n\n override_attributes(\n \"chef_client\" => {\n \"server_url\" => \"https://api.opscode.com/organizations/ORGNAME\",\n \"validation_client_name\" => \"ORGNAME-validator\"\n }\n )\n\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add these attributes to the role if modifying per the section below.\n\nAlternate Init Styles\n---------------------\n\nThe alternate init styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook site.\n\n knife cookbook site vendor runit -d\n\nChange the `init_style` to runit in the base role and add the runit recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"runit\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[runit]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-client service configured with runit. The runit run script will be located in `/etc/sv/chef-client/run`. The output log will be in the runit service directory, `/etc/sv/chef-client/log/main/current`.\n\n# Bluepill\n\nTo use bluepill, download the cookbook from the cookbook site.\n\n knife cookbook site vendor bluepill -d\n\nChange the `init_style` to runit in the base role and add the bluepill recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"bluepill\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[bluepill]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-client service configured with bluepill. The bluepill \"pill\" will be located in `/etc/bluepill/chef-client.pill`. The output log will be to client.log file in the `node[\"chef_client\"][\"log_dir\"]` location, `/var/log/chef/client` by default.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the `init_style` to runit in the base role and add the daemontools recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"daemontools\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[daemontools]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-cilent service configured under daemontools. It uses the same sv run scripts as the runit recipe. The run script will be located in `/etc/sv/chef-client/run`. The output log will be in the daemontools service directory, `/etc/sv/chef-client/log/main/current`.\n\nTEMPLATES\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill configuration for the chef-client service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands in `/etc/chef/client.rb`.\n\n`sv-chef-client-*run.erb`\n-------------------------\n\nRunit and Daemontools run script for chef-client service and logs.\n\nLogs will be located in the `node[\"chef_client\"][\"log_dir\"]`.\n\nLICENSE AND AUTHORS\n===================\n\n* Author: Joshua Timberman <joshua@opscode.com>\n* Copyright 2010, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\n",
+ "long_description": "DESCRIPTION\n===========\n\nThis cookbook is used to configure a system as a Chef Client.\n\nREQUIREMENTS\n============\n\nChef 0.9.12 or later is required.\n\nSupported Platforms\n-------------------\n\nThe following platforms are supported by this cookbook, meaning that the recipes run on these platforms without error.\n\n* Debian\n* Ubuntu\n* Red Hat\n* CentOS\n* Fedora\n* ArchLinux\n* FreeBSD\n* Mac OS X\n\nOther Cookbooks\n---------------\n\nOther cookbooks can be used with this cookbook but they are not explicitly required. The default settings in this cookbook do not require their use. The other cookbooks (on cookbooks.opsocde.com) are:\n\n* bluepill\n* daemontools\n* runit\n\nSee __USAGE__ below.\n\nATTRIBUTES\n==========\n\n* `node[\"chef_client\"][\"interval\"]` - Sets `Chef::Config[:interval]` via command-line option for number of seconds between chef-client daemon runs. Default 1800.\n* `node[\"chef_client\"][\"splay\"]` - Sets `Chef::Config[:splay]` via command-line option for a random amount of seconds to add to interval. Default 20.\n* `node[\"chef_client\"][\"log_dir\"]` - Sets directory used in `Chef::Config[:log_location]` via command-line option to a location where chef-client should log output. Default \"/var/log/chef\".\n* `node[\"chef_client\"][\"server_url\"]` - Sets `Chef::Config[:chef_server_url]` in the config file to the Chef Server URI. Default \"http://localhost:4000\". See __USAGE__.\n* `node[\"chef_client\"][\"validation_client_name\"]` - Sets `Chef::Config[:validation_client_name]` in the config file to the name of the validation client. Default \"chef-validator\". See __USAGE__.\n* `node[\"chef_client\"][\"init_style\"]` - Sets up the client service based on the style of init system to use. Default is based on platform and falls back to \"none\". See __USAGE__.\n* `node[\"chef_client\"][\"run_path\"]` - Directory location where chef-client should write the PID file. Default based on platform, falls back to \"/var/run\".\n* `node[\"chef_client\"][\"cache_path\"]` - Directory location for `Chef::Config[:file_cache_path]` where chef-client will cache various files. Default is based on platform, falls back to \"/var/chef/cache\".\n* `node[\"chef_client\"][\"backup_path\"]` - Directory location for `Chef::Config[:file_backup_path]` where chef-client will backup templates and cookbook files. Default is based on platform, falls back to \"/var/chef/backup\".\n\nRECIPES\n=======\n\nThis section describes the recipes in the cookbook and how to use them in your environment.\n\nconfig\n------\n\nSets up the `/etc/chef/client.rb` config file from a template and reloads the configuration for the current chef-client run.\n\nservice\n-------\n\nUse this recipe on systems that should have a `chef-client` daemon running, such as when Knife bootstrap was used to install Chef on a new system.\n\nThis recipe sets up the `chef-client` service depending on the `init_style` attribute (see above). The following init styles are supported:\n\n* init - uses the init script included in the chef gem, supported on debian and redhat family distributions.\n* upstart - uses the upstart job included in the chef gem, supported on ubuntu.\n* arch - uses the init script included in this cookbook for ArchLinux, supported on arch.\n* runit - sets up the service under runit, supported on ubuntu, debian and gentoo.\n* bluepill - sets up the service under bluepill. As bluepill is a pure ruby process monitor, this should work on any platform.\n* daemontools -sets up the service under daemontools, supported on debian, ubuntu and arch\n* bsd - prints a message about how to update BSD systems to enable the chef-client service, supported on Free/OpenBSD and OSX.\n\ndefault\n-------\n\nIncludes the `chef-client::service` recipe by default.\n\n`delete_validation`\n-------------------\n\nUse this recipe to delete the validation certificate (default `/etc/chef/validation.pem`) when using a `chef-client` after the client has been validated and authorized to connect to the server.\n\nBeware if using this on your Chef Server. First copy the validation.pem certificate file to another location, such as your knife configuration directory (`~/.chef`) or [Chef Repository](http://wiki.opscode.com/display/chef/Chef+Repository).\n\nUSAGE\n=====\n\nCreate a `base` role that will represent the base configuration for any system that includes managing aspects of the chef-client. Add recipes to the run list of the role, customize the attributes, and apply the role to nodes. For example, the following role (Ruby DSL) will set the init style to `init`, delete the validation certificate (as the client would already be authenticated) and set up the chef-client as a service using the init style.\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"init\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[chef-client::config]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client::config` recipe is only required with init style `init` (default setting for the attribute on debian/redhat family platforms, because the init script doesn't include the `pid_file` option which is set in the config.\n\nThe default Chef Server will be `http://localhost:4000` which is the `Chef::Config[:chef_server_url]` default value. To use the config recipe with the Opscode Platform, for example, add the following to the `override_attributes`\n\n override_attributes(\n \"chef_client\" => {\n \"server_url\" => \"https://api.opscode.com/organizations/ORGNAME\",\n \"validation_client_name\" => \"ORGNAME-validator\"\n }\n )\nWhere ORGNAME is your Opscode Platform organization name. Be sure to add these attributes to the role if modifying per the section below.\n\nYou can also set all of the `Chef::Config` http proxy related settings. By default Chef will not use a proxy.\n\n override_attributes(\n \"chef_client\" => {\n \"http_proxy\" => \"http://proxy.vmware.com:3128\",\n \"https_proxy\" => \"http://proxy.vmware.com:3128\",\n \"http_proxy_user\" => \"my_username\",\n \"http_proxy_pass\" => \"Awe_some_Pass_Word!\",\n \"no_proxy\" => \"*.vmware.com,10.*\"\n }\n )\n\nAlternate Init Styles\n---------------------\n\nThe alternate init styles available are:\n\n* runit\n* bluepill\n* daemontools\n\nFor usage, see below.\n\n# Runit\n\nTo use runit, download the cookbook from the cookbook site.\n\n knife cookbook site vendor runit -d\n\nChange the `init_style` to runit in the base role and add the runit recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"runit\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[runit]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-client service configured with runit. The runit run script will be located in `/etc/sv/chef-client/run`. The output log will be in the runit service directory, `/etc/sv/chef-client/log/main/current`.\n\n# Bluepill\n\nTo use bluepill, download the cookbook from the cookbook site.\n\n knife cookbook site vendor bluepill -d\n\nChange the `init_style` to runit in the base role and add the bluepill recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"bluepill\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[bluepill]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-client service configured with bluepill. The bluepill \"pill\" will be located in `/etc/bluepill/chef-client.pill`. The output log will be to client.log file in the `node[\"chef_client\"][\"log_dir\"]` location, `/var/log/chef/client` by default.\n\n# Daemontools\n\nTo use daemontools, download the cookbook from the cookbook site.\n\n knife cookbook site vendor daemontools -d\n\nChange the `init_style` to runit in the base role and add the daemontools recipe to the role's run list:\n\n name \"base\"\n description \"Base role applied to all nodes\"\n override_attributes(\n \"chef_client\" => {\n \"init_style\" => \"daemontools\"\n }\n )\n run_list(\n \"recipe[chef-client::delete_validation]\",\n \"recipe[daemontools]\",\n \"recipe[chef-client]\"\n )\n\nThe `chef-client` recipe will create the chef-cilent service configured under daemontools. It uses the same sv run scripts as the runit recipe. The run script will be located in `/etc/sv/chef-client/run`. The output log will be in the daemontools service directory, `/etc/sv/chef-client/log/main/current`.\n\nTEMPLATES\n=========\n\nchef-client.pill.erb\n--------------------\n\nBluepill configuration for the chef-client service.\n\nclient.rb.erb\n-------------\n\nConfiguration for the client, lands in `/etc/chef/client.rb`.\n\n`sv-chef-client-*run.erb`\n-------------------------\n\nRunit and Daemontools run script for chef-client service and logs.\n\nLogs will be located in the `node[\"chef_client\"][\"log_dir\"]`.\n\nLICENSE AND AUTHORS\n===================\n\n* Author: Joshua Timberman <joshua@opscode.com>\n* Author: Seth Chisamore <schisamo@opscode.com>\n* Copyright 2010-2011, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\n",
"maintainer": "Opscode, Inc.",
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
@@ -37,5 +37,5 @@
"chef-client::service": "Sets up a client daemon to run periodically",
"chef-client::delete_validation": "Deletes validation.pem after client registers"
},
- "version": "0.99.4"
+ "version": "0.99.5"
}
View
22 database/metadata.json
@@ -1,22 +1,22 @@
{
"name": "database",
"description": "Sets up the database master or slave",
- "long_description": "Database Cookbook\n=================\n\nConfigures mysql database masters and slaves and uses EBS for storage, integrating together with the application cookbook utilizing data bags for application related information.\n\nThis cookbook is written primarily to use MySQL and the Opscode mysql cookbook. Other RDBMS may be supported at a later date.\n\nThis cookbook does not automatically restore database dumps, but does install tools to help with that.\n\nRequirements\n============\n\nChef 0.8 or higher required.\n\nThe following Opscode cookbooks are dependencies:\n\n* mysql\n* xfs\n* aws\n\nRecipes\n=======\n\n`ebs_volume`\n------------\n\nLoads the aws information from the data bag. Searches the applications data bag for the database master or slave role and checks that role is applied to the node. Loads the EBS information and the master information from data bags. Uses the aws cookbook LWRP, `aws_ebs_volume` to manage the volume.\n\nOn a master node:\n* if we have an ebs volume already as stored in a data bag, attach it.\n* if we don't have the ebs information then create a new one and attach it.\n* store the volume information in a data bag via a ruby block.\n\nOn a slave node:\n* use the master volume information to generate a snapshot.\n* create the new volume from the snapshot and attach it.\n\nAlso on a master node, generate some configuration for running a snapshot via `chef-solo` from cron.\n\nOn a new filesystem volume, create as XFS, then mount it in /mnt, and also bind-mount it to the mysql data directory (default /var/lib/mysql).\n\nmaster\n------\n\nThis recipe no longer loads AWS specific information, and the database position for replication is no longer stored in a databag because the client might not have permission to write to the databag item. This may be handled in a different way at a future date.\n\nSearches the apps databag for applications, and for each one it will check that the specified database master role is set in both the databag and applied to the node's run list. Then, retrieves the passwords for `root`, `repl` and `debian` users and saves them to the node attributes. If the passwords are not found in the databag, it prints a message that they'll be generated by the mysql cookbook.\n\nThen it adds the application databag database settings to a hash, to use later.\n\nIt sets up the template resource for `/etc/mysql/app_grants.sql`, passing in the database settings so privileges for application specific database users can be created.\n\nThen it will iterate over the databases and create them with the `mysql_database` LWRP, detecting their presence with the mysql rubygem.\n\nslave\n-----\n\n_TODO_: Retrieve the master status from a data bag, then start replication using a ruby block. The replication status needs to be handled in some other way for now since the master recipe above doesn't actually set it in the databag anymore.\n\nsnapshot\n--------\n\nRun via Chef Solo. Retrieves the db snapshot configuration from the specified JSON file. Uses the `mysql_database` LWRP to lock and unlock tables, and does a filesystem freeze and EBS snapshot.\n\nDeprecated Recipes\n==================\n\nThe following recipe is considered deprecated. It is kept for reference purposes.\n\n`ebs_backup`\n------------\n\nOlder style of doing mysql snapshot and replication using Adam Jacob's [ec2_mysql](http://github.com/adamhjk/ec2_mysql) script and library.\n\nData Bags\n=========\n\nThis cookbook uses the apps data bag item for the specified application; see the `application` cookbook's README.md. It also creates data bag items in a bag named 'aws' for storing volume information. In order to interact with EC2, it expects aws to have a main item:\n\n {\n \"id\": \"main\",\n \"ec2_private_key\": \"private key as a string\",\n \"ec2_cert\": \"certificate as a string\",\n \"aws_account_id\": \"\",\n \"aws_secret_access_key\": \"\",\n \"aws_access_key_id\": \"\"\n }\n\nNote: with the Open Source Chef Server, the server using the database recipes must be an admin client or it will not be able to create data bag items. You can modify whether the client is admin by editing it with knife.\n\n knife client edit <client_name>\n {\n ...\n \"admin\": true\n ...\n }\n\nThis is not required if the Chef Server is the Opscode Platform, instead use the ACL feature to modify access for the node to be able to update the data bag.\n\nUsage\n=====\n\nAside from the application data bag (see the README in the application cookbook), create a role for the database master. Use a role.rb in your chef-repo, or create the role directly with knife.\n\n % knife role show my_app_database_master\n {\n \"name\": \"my_app_database_master\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[mysql::server]\",\n \"recipe[database::master]\"\n ],\n \"override_attributes\": {\n }\n }\n\nAlso create a `production` role, or other role based on your desired environment. This is also used in the `application` cookbook.\n\n % knife role show production\n {\n \"name\": \"production\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"app_environment\": \"production\"\n },\n \"description\": \"production environment role\",\n \"run_list\": [\n\n ],\n \"override_attributes\": {\n }\n }\n\nThe cookbook `my_app_database` is recommended to set up any application specific database resources such as configuration templates, trending monitors, etc. It is not required, but you would need to create it separately in `site-cookbooks`. Add it to the `my_app_database_master` role.\n\nLicense and Author\n==================\n\nAuthor:: Adam Jacob (<adam@opscode.com>)\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: AJ Christensen (<aj@opscode.com>)\n\nCopyright 2009-2010, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "long_description": "Database Cookbook\n=================\n\nConfigures mysql database masters and slaves and uses EBS for storage, integrating together with the application cookbook utilizing data bags for application related information.\n\nThis cookbook is written primarily to use MySQL and the Opscode mysql cookbook. Other RDBMS may be supported at a later date.\n\nThis cookbook does not automatically restore database dumps, but does install tools to help with that.\n\nRequirements\n============\n\nChef 0.8 or higher required.\n\nPlatform\n--------\n\nUbuntu, Debian, Red Hat, CentOS or Fedora.\n\nCookbooks\n---------\n\nThe following Opscode cookbooks are dependencies:\n\n* mysql\n* xfs\n* aws\n\nRecipes\n=======\n\n`ebs_volume`\n------------\n\nLoads the aws information from the data bag. Searches the applications data bag for the database master or slave role and checks that role is applied to the node. Loads the EBS information and the master information from data bags. Uses the aws cookbook LWRP, `aws_ebs_volume` to manage the volume.\n\nOn a master node:\n* if we have an ebs volume already as stored in a data bag, attach it.\n* if we don't have the ebs information then create a new one and attach it.\n* store the volume information in a data bag via a ruby block.\n\nOn a slave node:\n* use the master volume information to generate a snapshot.\n* create the new volume from the snapshot and attach it.\n\nAlso on a master node, generate some configuration for running a snapshot via `chef-solo` from cron.\n\nOn a new filesystem volume, create as XFS, then mount it in /mnt, and also bind-mount it to the mysql data directory (default /var/lib/mysql).\n\nmaster\n------\n\nThis recipe no longer loads AWS specific information, and the database position for replication is no longer stored in a databag because the client might not have permission to write to the databag item. This may be handled in a different way at a future date.\n\nSearches the apps databag for applications, and for each one it will check that the specified database master role is set in both the databag and applied to the node's run list. Then, retrieves the passwords for `root`, `repl` and `debian` users and saves them to the node attributes. If the passwords are not found in the databag, it prints a message that they'll be generated by the mysql cookbook.\n\nThen it adds the application databag database settings to a hash, to use later.\n\nIt sets up the template resource for `/etc/mysql/app_grants.sql`, passing in the database settings so privileges for application specific database users can be created.\n\nThen it will iterate over the databases and create them with the `mysql_database` LWRP, detecting their presence with the mysql rubygem.\n\nslave\n-----\n\n_TODO_: Retrieve the master status from a data bag, then start replication using a ruby block. The replication status needs to be handled in some other way for now since the master recipe above doesn't actually set it in the databag anymore.\n\nsnapshot\n--------\n\nRun via Chef Solo. Retrieves the db snapshot configuration from the specified JSON file. Uses the `mysql_database` LWRP to lock and unlock tables, and does a filesystem freeze and EBS snapshot.\n\nDeprecated Recipes\n==================\n\nThe following recipe is considered deprecated. It is kept for reference purposes.\n\n`ebs_backup`\n------------\n\nOlder style of doing mysql snapshot and replication using Adam Jacob's [ec2_mysql](http://github.com/adamhjk/ec2_mysql) script and library.\n\nData Bags\n=========\n\nThis cookbook uses the apps data bag item for the specified application; see the `application` cookbook's README.md. It also creates data bag items in a bag named 'aws' for storing volume information. In order to interact with EC2, it expects aws to have a main item:\n\n {\n \"id\": \"main\",\n \"ec2_private_key\": \"private key as a string\",\n \"ec2_cert\": \"certificate as a string\",\n \"aws_account_id\": \"\",\n \"aws_secret_access_key\": \"\",\n \"aws_access_key_id\": \"\"\n }\n\nNote: with the Open Source Chef Server, the server using the database recipes must be an admin client or it will not be able to create data bag items. You can modify whether the client is admin by editing it with knife.\n\n knife client edit <client_name>\n {\n ...\n \"admin\": true\n ...\n }\n\nThis is not required if the Chef Server is the Opscode Platform, instead use the ACL feature to modify access for the node to be able to update the data bag.\n\nUsage\n=====\n\nAside from the application data bag (see the README in the application cookbook), create a role for the database master. Use a role.rb in your chef-repo, or create the role directly with knife.\n\n % knife role show my_app_database_master\n {\n \"name\": \"my_app_database_master\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[mysql::server]\",\n \"recipe[database::master]\"\n ],\n \"override_attributes\": {\n }\n }\n\nAlso create a `production` role, or other role based on your desired environment. This is also used in the `application` cookbook.\n\n % knife role show production\n {\n \"name\": \"production\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"app_environment\": \"production\"\n },\n \"description\": \"production environment role\",\n \"run_list\": [\n\n ],\n \"override_attributes\": {\n }\n }\n\nThe cookbook `my_app_database` is recommended to set up any application specific database resources such as configuration templates, trending monitors, etc. It is not required, but you would need to create it separately in `site-cookbooks`. Add it to the `my_app_database_master` role.\n\nLicense and Author\n==================\n\nAuthor:: Adam Jacob (<adam@opscode.com>)\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: AJ Christensen (<aj@opscode.com>)\nAuthor:: Seth Chisamore (<schisamo@opscode.com>)\n\nCopyright 2009-2011, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Opscode, Inc.",
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
"platforms": {
+ "debian": ">= 0.0.0",
+ "ubuntu": ">= 0.0.0",
+ "centos": ">= 0.0.0",
+ "suse": ">= 0.0.0",
+ "fedora": ">= 0.0.0",
+ "redhat": ">= 0.0.0"
},
"dependencies": {
- "mysql": [
-
- ],
- "aws": [
-
- ],
- "xfs": [
-
- ]
+ "mysql": ">= 0.0.0",
+ "aws": ">= 0.0.0",
+ "xfs": ">= 0.0.0"
},
"recommendations": {
},
@@ -39,5 +39,5 @@
"database::master": "Creates application specific user and database",
"database::snapshot": "Locks tables and freezes XFS filesystem for replication, assumes EC2 + EBS"
},
- "version": "0.7.1"
+ "version": "0.99.0"
}
View
30 mysql/metadata.json
@@ -1,34 +1,20 @@
{
"name": "mysql",
"description": "Installs and configures mysql for client or server",
- "long_description": "Description\n===========\n\nInstalls and configures MySQL client or server.\n\nRequirements\n============\n\nPlatform\n--------\n\nUbuntu, Debian, Red Hat, CentOS or Fedora.\n\nCookbooks\n---------\n\nRequires Opscode's openssl cookbook for secure password generation.\n\nRequires a C compiler and Ruby development package in order to build mysql gem with native extensions. On Debian and Ubuntu systems this is satisfied by installing the \"build-essential\" and \"ruby-dev\" packages before running Chef. See USAGE below for information on how to handle this during a Chef run.\n\nResources and Providers\n=======================\n\nThe cookbook contains a LWRP, `mysql_database` which can be used to manage databases through calls to the MySQL API. The mysql gem is installed to make this usable. The provider currently supports three actions:\n\n* `flush_tables_with_read_lock` - sends the sql command \"flush tables with read lock\", used for setting up mysql master/slave replication.\n* `unflush_tables` - sends the sql command \"unflush tables\", used for setting up master/slave replication.\n* `create_db` - specify a database to be created.\n* `query` - send an arbitrary query to the database, this should be used with care. Pass the SQL statement to use with the `sql` resource attribute.\n\nFor example see the USAGE section below.\n\nAttributes\n==========\n\n* `mysql[:server_root_password]` - Set the server's root password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:server_repl_password]` - Set the replication user 'repl' password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:server_debian_password]` - Set the debian-sys-maint user password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:bind_address]` - Listen address for MySQLd, default is node's ipaddress.\n* `mysql[:datadir]` - Location for mysql data directory, default is \"/var/lib/mysql\"\n* `mysql[:ec2_path]` - location of mysql datadir on EC2 nodes, default \"/mnt/mysql\"\n\nPerformance tuning attributes, each corresponds to the same-named parameter in my.cnf; default values listed\n\n* `mysql[:tunable][:key_buffer]` = \"250M\"\n* `mysql[:tunable][:max_connections]` = \"800\"\n* `mysql[:tunable][:wait_timeout]` = \"180\"\n* `mysql[:tunable][:net_write_timeout]` = \"30\"\n* `mysql[:tunable][:net_write_timeout]` = \"30\"\n* `mysql[:tunable][:back_log]` = \"128\"\n* `mysql[:tunable][:table_cache]` = \"128\"\n* `mysql[:tunable][:max_heap_table_size]` = \"32M\"\n\nUsage\n=====\n\nOn client nodes,\n\n include_recipe \"mysql::client\"\n\nThis will install the MySQL client libraries and development headers on the system. It will also install the Ruby Gem `mysql`, so that the cookbook's LWRP (above) can be used. This is done during the compile-phase of the Chef run. On platforms that are known to have a native package (currently Debian, Ubuntu, Red hat, Centos, Fedora and SUSE), the package will be installed. Other platforms will use the RubyGem.\n\nThis creates a resource object for the package and does the installation before other recipes are parsed. You'll need to have the C compiler and such (ie, build-essential on Ubuntu) before running the recipes, but we already do that when installing Chef :-). If you want to be able to access a MySQL database via Ruby within another recipe, you could do so, like so:\n\n Gem.clear_paths # needed for Chef to find the gem...\n require 'mysql' # requires the mysql gem\n\n mysql_database \"create application_production database\" do\n host \"localhost\"\n username \"root\"\n password node[:mysql][:server_root_password]\n database \"application_production\"\n action :create_db\n end\n\nThis will connect to the MySQL server running on localhost as \"root\" and password as `mysql[:server_root_password]` attribute (see below) and create the database specified with the `database` parameter. The provider will attempt to determine whether the database exists first.\n\nOn server nodes,\n\n include_recipe \"mysql::server\"\n\nOn Debian and Ubuntu, this will preseed the mysql-server package with the randomly generated root password from the attributes file. On other platforms, it simply installs the required packages. It will also create an SQL file, /etc/mysql/grants.sql, that will be used to set up grants for the root, repl and debian-sys-maint users.\n\nOn EC2 nodes,\n\n include_recipe \"mysql::server_ec2\"\n\nWhen the `ec2_path` doesn't exist we look for a mounted filesystem (eg, EBS) and move the datadir there.\n\nThe client recipe is already included by server and 'default' recipes.\n\nFor more infromation on the compile vs execution phase of a Chef run:\n\n* http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run\n\nLicense and Author\n==================\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: AJ Christensen (<aj@opscode.com>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "long_description": "Description\n===========\n\nInstalls and configures MySQL client or server.\n\nRequirements\n============\n\nPlatform\n--------\n\nUbuntu, Debian, Red Hat, CentOS or Fedora.\n\nCookbooks\n---------\n\nRequires Opscode's openssl cookbook for secure password generation.\n\nRequires a C compiler and Ruby development package in order to build mysql gem with native extensions. On Debian and Ubuntu systems this is satisfied by installing the \"build-essential\" and \"ruby-dev\" packages before running Chef. See USAGE below for information on how to handle this during a Chef run.\n\nResources and Providers\n=======================\n\nThe cookbook contains a LWRP, `mysql_database` which can be used to manage databases through calls to the MySQL API. The mysql gem is installed to make this usable. The provider currently supports three actions:\n\n* `flush_tables_with_read_lock` - sends the sql command \"flush tables with read lock\", used for setting up mysql master/slave replication.\n* `unflush_tables` - sends the sql command \"unflush tables\", used for setting up master/slave replication.\n* `create_db` - specify a database to be created.\n* `query` - send an arbitrary query to the database, this should be used with care. Pass the SQL statement to use with the `sql` resource attribute.\n\nFor example see the USAGE section below.\n\nAttributes\n==========\n\n* `mysql[:server_root_password]` - Set the server's root password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:server_repl_password]` - Set the replication user 'repl' password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:server_debian_password]` - Set the debian-sys-maint user password with this, default is a randomly generated password with `OpenSSL::Random.random_bytes`.\n* `mysql[:bind_address]` - Listen address for MySQLd, default is node's ipaddress.\n* `mysql[:datadir]` - Location for mysql data directory, default is \"/var/lib/mysql\"\n* `mysql[:ec2_path]` - location of mysql datadir on EC2 nodes, default \"/mnt/mysql\"\n\nPerformance tuning attributes, each corresponds to the same-named parameter in my.cnf; default values listed\n\n* `mysql[:tunable][:key_buffer]` = \"250M\"\n* `mysql[:tunable][:max_connections]` = \"800\"\n* `mysql[:tunable][:wait_timeout]` = \"180\"\n* `mysql[:tunable][:net_write_timeout]` = \"30\"\n* `mysql[:tunable][:net_write_timeout]` = \"30\"\n* `mysql[:tunable][:back_log]` = \"128\"\n* `mysql[:tunable][:table_cache]` = \"128\"\n* `mysql[:tunable][:max_heap_table_size]` = \"32M\"\n\nUsage\n=====\n\nOn client nodes,\n\n include_recipe \"mysql::client\"\n\nThis will install the MySQL client libraries and development headers on the system. It will also install the Ruby Gem `mysql`, so that the cookbook's LWRP (above) can be used. This is done during the compile-phase of the Chef run. On platforms that are known to have a native package (currently Debian, Ubuntu, Red hat, Centos, Fedora and SUSE), the package will be installed. Other platforms will use the RubyGem.\n\nThis creates a resource object for the package and does the installation before other recipes are parsed. You'll need to have the C compiler and such (ie, build-essential on Ubuntu) before running the recipes, but we already do that when installing Chef :-). If you want to be able to access a MySQL database via Ruby within another recipe, you could do so, like so:\n\n mysql_database \"create application_production database\" do\n host \"localhost\"\n username \"root\"\n password node[:mysql][:server_root_password]\n database \"application_production\"\n action :create_db\n end\n\nThis will connect to the MySQL server running on localhost as \"root\" and password as `mysql[:server_root_password]` attribute (see below) and create the database specified with the `database` parameter. The provider will attempt to determine whether the database exists first.\n\nOn server nodes,\n\n include_recipe \"mysql::server\"\n\nOn Debian and Ubuntu, this will preseed the mysql-server package with the randomly generated root password from the attributes file. On other platforms, it simply installs the required packages. It will also create an SQL file, /etc/mysql/grants.sql, that will be used to set up grants for the root, repl and debian-sys-maint users.\n\nOn EC2 nodes,\n\n include_recipe \"mysql::server_ec2\"\n\nWhen the `ec2_path` doesn't exist we look for a mounted filesystem (eg, EBS) and move the datadir there.\n\nThe client recipe is already included by server and 'default' recipes.\n\nFor more infromation on the compile vs execution phase of a Chef run:\n\n* http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run\n\nLicense and Author\n==================\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: AJ Christensen (<aj@opscode.com>)\nAuthor:: Seth Chisamore (<schisamo@opscode.com>)\n\nCopyright:: 2009-2011 Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
"maintainer": "Opscode, Inc.",
"maintainer_email": "cookbooks@opscode.com",
"license": "Apache 2.0",
"platforms": {
- "debian": [
-
- ],
- "ubuntu": [
-
- ],
- "centos": [
-
- ],
- "suse": [
-
- ],
- "fedora": [
-
- ],
- "redhat": [
-
- ]
+ "debian": ">= 0.0.0",
+ "ubuntu": ">= 0.0.0",
+ "centos": ">= 0.0.0",
+ "suse": ">= 0.0.0",
+ "fedora": ">= 0.0.0",
+ "redhat": ">= 0.0.0"
},
"dependencies": {
- "openssl": [
-
- ]
+ "openssl": ">= 0.0.0"
},
"recommendations": {
},
Please sign in to comment.
Something went wrong with that request. Please try again.