diff --git a/metadata.rb b/metadata.rb index b707940..88de156 100755 --- a/metadata.rb +++ b/metadata.rb @@ -23,8 +23,8 @@ end depends 'mariadb', '~> 0.3.1' depends 'percona', '~> 0.16.1' -depends 'mysql', '~> 6.0.13' -depends 'mysql2_chef_gem', '~> 1.0.1' +depends 'mysql', '~> 7.2.0' +depends 'mysql2_chef_gem', '~> 1.1.0' depends 'postgresql', '~> 3.4.18' depends 'database', '~> 4.0.2' depends 'openstack-common', '>= 14.0.0' diff --git a/recipes/mysql-client.rb b/recipes/mysql-client.rb index 59ea656..5763d81 100644 --- a/recipes/mysql-client.rb +++ b/recipes/mysql-client.rb @@ -28,6 +28,11 @@ mysql2_chef_gem 'default' do action :install end +# Note(frickler): Work around for https://github.com/chef/chef-dk/issues/966 +bash 'fix gem ext dir' do + code "rmdir ~/.chefdk/gem/ruby/2.1.0/extensions && ln -s /opt/chefdk/embedded/lib/ruby/gems/2.1.0/extensions ~/.chefdk/gem/ruby/2.1.0/extensions || true" +end + node['openstack']['db']['python_packages']['mysql'].each do |pkg| package pkg end diff --git a/spec/postgresql-server_spec.rb b/spec/postgresql-server_spec.rb index 432ca26..3ed566f 100644 --- a/spec/postgresql-server_spec.rb +++ b/spec/postgresql-server_spec.rb @@ -12,7 +12,7 @@ describe 'openstack-ops-database::postgresql-server' do # The postgresql cookbook will raise an 'uninitialized constant # Chef::Application' error without this attribute when running # the tests - node.set_unless['postgresql']['password']['postgres'] = '' + node.set['postgresql']['password']['postgres'] = 'postgres_password' runner.converge(described_recipe) end diff --git a/spec/server_spec.rb b/spec/server_spec.rb index a8076c2..9640a50 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -18,7 +18,7 @@ describe 'openstack-ops-database::server' do # The postgresql cookbook will raise an 'uninitialized constant # Chef::Application' error without this attribute when running # the tests - node.set_unless['postgresql']['password']['postgres'] = '' + node.set['postgresql']['password']['postgres'] = 'postgres_password' expect(chef_run).to include_recipe( 'openstack-ops-database::postgresql-server')