Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piggyback on mysql cookbook #15

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The following platforms are supported by this cookbook, meaning that the recipes
### Cookbooks

* [apt](http://community.opscode.com/cookbooks/apt) Opscode LWRP Cookbook
* [mysql](http://community.opscode.com/cookbooks/mysql) Opscode Cookbook
* [openssl](http://community.opscode.com/cookbooks/openssl) Opscode Cookbook

## Recipes
Expand Down
22 changes: 22 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,25 @@
default["percona"]["cluster"]["wsrep_node_name"] = ""
default["percona"]["cluster"]["innodb_locks_unsafe_for_binlog"] = 1
default["percona"]["cluster"]["innodb_autoinc_lock_mode"] = 2

# Options are: 5.0, 5.1, 5.5, latest
default['percona']['version'] = "5.5"

normal['mysql']['use_upstart'] = false

case node['platform']
when "ubuntu", "debian"
case node['percona']['version']
when "5.0"
normal['mysql']['client']['packages'] = %w{percona-sql-client}
normal['mysql']['server']['packages'] = %w{percona-sql-server}
when "5.1", "5.5"
normal['mysql']['client']['packages'] = %W{percona-server-client-#{node['percona']['version']}}
normal['mysql']['server']['packages'] = %W{percona-server-server-#{node['percona']['version']}}
when "latest"
normal['mysql']['client']['packages'] = %w{percona-server-client}
normal['mysql']['server']['packages'] = %w{percona-server-server}
end
when "centos", "redhat", "amazon", "scientific", "fedora"
# TODO: Add yum support
end
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
recipe "percona::access_grants", "Used internally to grant permissions for recipes"

depends "apt"
depends "openssl"
depends "mysql", ">= 1.3.0"

%w[debian ubuntu].each do |os|
supports os
Expand Down
5 changes: 1 addition & 4 deletions recipes/client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
include_recipe "percona::default"

package "percona-server-client" do
options "--force-yes"
end
include_recipe "mysql::client"
7 changes: 1 addition & 6 deletions recipes/server.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
include_recipe "percona::default"

# install packages
package "percona-server-server" do
action :install
options "--force-yes"
end
include_recipe "mysql::server"

percona = node["percona"]
server = percona["server"]
Expand Down