Permalink
Browse files

[db_mysql] Added new default version recipes

  • Loading branch information...
1 parent 099e2d0 commit 3dd62bc135e5e492dc960376484994eab6d813d4 @ekargard ekargard committed Jan 18, 2012
Showing with 104 additions and 75 deletions.
  1. +69 −75 metadata.json
  2. +2 −0 metadata.rb
  3. +5 −0 recipes/default.rb
  4. +14 −0 recipes/default_5_1.rb
  5. +14 −0 recipes/default_5_5.rb
View
@@ -1,83 +1,77 @@
{
- "version": "0.0.1",
- "groupings": {
- },
- "long_description": "= RightScale Database Manager for MySQL (Beta) \n\n== DESCRIPTION:\n\nProvides the MySQL implementation of the 'db' resource to install and \nmanage MySQL database stand-alone servers and clients.\n\n\n== DETAILS\n\nThe 'db' implementation is defined by a Lightweight Provider, which can be \nfound in the providers/default.rb file.\n\nThe majority of the functionality of the MySQL provider is encapsulated \nin the premium rightscale_tools gem, however, there are currently a handful\nof recipes that can be used without it. See 'Public Recipes' in the USAGE\nsection below.\n\n\n== REQUIREMENTS:\n\n* Requires a VM launched from a RightScale managed RightImage \n\n* Tested on CentOS 5.6 RightImage\n\n* Supports MySQL 5.1 \n\n* Needs RightScale Premium ServerTemplate tools gem installed on system.\n This gem is only available for paid RightScale customers.\n Please contact sales@rightscale.com to upgrade you account.\n\n\n== SETUP:\n\n* Place db::default recipe into your runlist to setup the db resource. When\n using a RightScale ServerTemplate, this will also automatically add the \n common database attributes to your ServerTemplate inputs.\n \n* Also, place the db_mysql::default recipe into your runlist to load the\n MySQL provider, tuning parameters, as well as other MySQL specific \n attributes in as inputs.\n\n== USAGE:\n\n=== Basic usage\nOnce setup, use the recipes in the 'db' cookbook to install and manage your\nMySQL database servers and clients. See the db/README.rdoc for usage \ndetails.\n\n\n=== MySQL Tuning and my.cnf\n\nCustom tuning parameters can be applied by overriding the mysql_tuning.rb\nattributes file. For more information and an example override repository\nplease see:\n\n https://github.com/ekargard/cookbooks_override/tree/master/cookbooks/db_mysql\n \n\n=== Public Recipes\nHere is the list of db recipes that can be used without the preimum \nrightscale_tools gem:\n\n* db::default\n* db::install_client\n* db::install_server\n* db::setup_monitoring\n* db::setup_privileges_admin\n* db::setup_privileges_application\n* db::do_appserver_allow\n* db::do_appserver_deny\n* db::request_appserver_allow\n* db::request_appserver_deny\n\nThese recipes are used by the RightScale LAMP ServerTemplate.\n\n\n== KNOWN LIMITATIONS\n\n* none\n\n\n \n\n",
- "attributes": {
- "db_mysql": {
- "required": "optional",
- "calculated": false,
- "choice": [
-
- ],
- "type": "hash",
- "recipes": [
-
- ],
- "display_name": "General Database Options"
- },
- "db_mysql/log_bin": {
- "required": "optional",
- "calculated": false,
- "choice": [
-
- ],
- "default": "/mnt/mysql-binlogs/mysql-bin",
- "type": "string",
- "recipes": [
- "db_mysql::default"
- ],
- "description": "Defines the filename and location of your MySQL stored binlog files. This sets the log-bin variable in the MySQL config file. If you do not specify an absolute path, it will be relative to the data directory. Ex: /mnt/mysql-binlogs/mysql-bin",
- "display_name": "MySQL Binlog Destination"
- },
- "db_mysql/server_usage": {
- "required": "optional",
- "calculated": false,
- "choice": [
- "shared",
- "dedicated"
- ],
- "default": "dedicated",
- "type": "string",
- "recipes": [
- "db_mysql::default"
- ],
- "description": "Use 'dedicated' if the mysql config file allocates all existing resources of the machine. Use 'shared' if the MySQL config file is configured to use less resources so that it can be run concurrently with other apps like Apache and Rails for example.",
- "display_name": "Server Usage"
- }
- },
- "recommendations": {
- },
- "dependencies": {
- "sys_dns": [
+ "dependencies": {
+ "sys_dns": ">= 0.0.0",
+ "db": ">= 0.0.0",
+ "rs_utils": ">= 0.0.0",
+ "block_device": ">= 0.0.0"
+ },
+ "name": "db_mysql",
+ "maintainer_email": "support@rightscale.com",
+ "attributes": {
+ "db_mysql": {
+ "required": "optional",
+ "calculated": false,
+ "choice": [
],
- "db": [
+ "type": "hash",
+ "recipes": [
],
- "rs_utils": [
+ "display_name": "General Database Options"
+ },
+ "db_mysql/log_bin": {
+ "required": "optional",
+ "calculated": false,
+ "choice": [
],
- "block_device": [
-
- ]
- },
- "maintainer": "RightScale, Inc.",
- "suggestions": {
- },
- "recipes": {
- "db_mysql::default": "Runs the client 'db::install_server' recipes."
- },
- "maintainer_email": "support@rightscale.com",
- "conflicting": {
- },
- "license": "Copyright (c) 2011 RightScale, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
- "providing": {
- },
- "name": "db_mysql",
- "replacing": {
- },
- "platforms": {
+ "default": "/mnt/mysql-binlogs/mysql-bin",
+ "type": "string",
+ "recipes": [
+ "db_mysql::default"
+ ],
+ "display_name": "MySQL Binlog Destination",
+ "description": "Defines the filename and location of your MySQL stored binlog files. This sets the log-bin variable in the MySQL config file. If you do not specify an absolute path, it will be relative to the data directory. Ex: /mnt/mysql-binlogs/mysql-bin"
},
- "description": "Installs/configures a MySQL database server with automated backups."
- }
+ "db_mysql/server_usage": {
+ "required": "optional",
+ "calculated": false,
+ "choice": [
+ "shared",
+ "dedicated"
+ ],
+ "default": "dedicated",
+ "type": "string",
+ "recipes": [
+ "db_mysql::default"
+ ],
+ "display_name": "Server Usage",
+ "description": "Use 'dedicated' if the mysql config file allocates all existing resources of the machine. Use 'shared' if the MySQL config file is configured to use less resources so that it can be run concurrently with other apps like Apache and Rails for example."
+ }
+ },
+ "license": "Copyright RightScale, Inc. All rights reserved. All access and use subject to the RightScale Terms of Service available at http://www.rightscale.com/terms.php and, if applicable, other agreements such as a RightScale Master Subscription Agreement.\n",
+ "suggestions": {
+ },
+ "platforms": {
+ },
+ "maintainer": "RightScale, Inc.",
+ "long_description": "= RightScale Database Manager for MySQL (Beta) \n\n== DESCRIPTION:\n\nProvides the MySQL implementation of the 'db' resource to install and \nmanage MySQL database stand-alone servers and clients.\n\n\n== DETAILS\n\nThe 'db' implementation is defined by a Lightweight Provider, which can be \nfound in the providers/default.rb file.\n\nThe majority of the functionality of the MySQL provider is encapsulated \nin the premium rightscale_tools gem, however, there are currently a handful\nof recipes that can be used without it. See 'Public Recipes' in the USAGE\nsection below.\n\n\n== REQUIREMENTS:\n\n* Requires a VM launched from a RightScale managed RightImage \n\n* Tested on CentOS 5.6 RightImage\n\n* Supports MySQL 5.1 \n\n* Needs RightScale Premium ServerTemplate tools gem installed on system.\n This gem is only available for paid RightScale customers.\n Please contact sales@rightscale.com to upgrade you account.\n\n\n== SETUP:\n\n* Place db::default recipe into your runlist to setup the db resource. When\n using a RightScale ServerTemplate, this will also automatically add the \n common database attributes to your ServerTemplate inputs.\n \n* Also, place the db_mysql::default recipe into your runlist to load the\n MySQL provider, tuning parameters, as well as other MySQL specific \n attributes in as inputs.\n\n== USAGE:\n\n=== Basic usage\nOnce setup, use the recipes in the 'db' cookbook to install and manage your\nMySQL database servers and clients. See the db/README.rdoc for usage \ndetails.\n\n\n=== MySQL Tuning and my.cnf\n\nCustom tuning parameters can be applied by overriding the mysql_tuning.rb\nattributes file. For more information and an example override repository\nplease see:\n\n https://github.com/ekargard/cookbooks_override/tree/master/cookbooks/db_mysql\n \n\n=== Public Recipes\nHere is the list of db recipes that can be used without the preimum \nrightscale_tools gem:\n\n* db::default\n* db::install_client\n* db::install_server\n* db::setup_monitoring\n* db::setup_privileges_admin\n* db::setup_privileges_application\n* db::do_appserver_allow\n* db::do_appserver_deny\n* db::request_appserver_allow\n* db::request_appserver_deny\n\nThese recipes are used by the RightScale LAMP ServerTemplate.\n\n\n== KNOWN LIMITATIONS\n\n* none\n\n\n \n\n",
+ "version": "0.0.1",
+ "recommendations": {
+ },
+ "recipes": {
+ "db_mysql::default_5_1": "Set MySQL chef node version to 5.1",
+ "db_mysql::default": "Runs the client 'db::install_server' recipes.",
+ "db_mysql::default_5_5": "Set MySQL chef node version to 5.5"
+ },
+ "groupings": {
+ },
+ "conflicting": {
+ },
+ "replacing": {
+ },
+ "description": "Installs/configures a MySQL database server with automated backups.",
+ "providing": {
+ }
+}
View
@@ -11,6 +11,8 @@
depends "rs_utils"
recipe "db_mysql::default", "Runs the client 'db::install_server' recipes."
+recipe "db_mysql::default_5_1", "Set MySQL chef node version to 5.1"
+recipe "db_mysql::default_5_5", "Set MySQL chef node version to 5.5"
attribute "db_mysql",
:display_name => "General Database Options",
View
@@ -5,4 +5,9 @@
# RightScale Terms of Service available at http://www.rightscale.com/terms.php and,
# if applicable, other agreements such as a RightScale Master Subscription Agreement.
+rs_utils_marker :begin
+
+node[:db_mysql][:version] ||= "5.1"
include_recipe "db::install_client"
+
+rs_utils_marker :end
View
@@ -0,0 +1,14 @@
+#
+# Cookbook Name:: db_mysql
+#
+# Copyright RightScale, Inc. All rights reserved. All access and use subject to the
+# RightScale Terms of Service available at http://www.rightscale.com/terms.php and,
+# if applicable, other agreements such as a RightScale Master Subscription Agreement.
+
+rs_utils_marker :begin
+version="5.1"
+
+log "Setting DB MySQL version to #{version}"
+node[:db_mysql][:version] = version
+
+rs_utils_marker :end
View
@@ -0,0 +1,14 @@
+#
+# Cookbook Name:: db_mysql
+#
+# Copyright RightScale, Inc. All rights reserved. All access and use subject to the
+# RightScale Terms of Service available at http://www.rightscale.com/terms.php and,
+# if applicable, other agreements such as a RightScale Master Subscription Agreement.
+
+rs_utils_marker :begin
+version="5.5"
+
+log "Setting DB MySQL version to #{version}"
+node[:db_mysql][:version] = version
+
+rs_utils_marker :end

0 comments on commit 3dd62bc

Please sign in to comment.