Skip to content

Commit

Permalink
Upgrade mysql cookbook to 6.x. [bflad#103]
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Jul 6, 2015
1 parent 97cbf79 commit bc66366
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@
default['stash']['backup_client']['cron']['month'] = '*'
default['stash']['backup_client']['cron']['weekday'] = '*'

default['stash']['database']['version'] = '5.6'
default['stash']['database']['host'] = 'localhost'
default['stash']['database']['name'] = 'stash'
default['stash']['database']['password'] = 'changeit'
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
depends 'database'
depends 'git'
depends 'java'
depends 'mysql', '~> 5.0'
depends 'mysql', '~> 6.0'
depends 'mysql2_chef_gem'
depends 'mysql_connector'
depends 'perl'
Expand Down
11 changes: 9 additions & 2 deletions recipes/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@

case settings['database']['type']
when 'mysql'
include_recipe 'mysql::server'

mysql2_chef_gem 'default' do
action :install
end

mysql_service 'default' do
version settings['database']['version']
bind_address settings['database']['host']
port '3306'
data_dir node['mysql']['data_dir'] if node['mysql']['data_dir']
initial_root_password node['mysql']['server_root_password']
action [:create, :start]
end

database_connection.merge!(:username => 'root', :password => node['mysql']['server_root_password'])

mysql_database settings['database']['name'] do
Expand Down

0 comments on commit bc66366

Please sign in to comment.