adaptions to work with refactored cookbooks

* adapted mariadb, mysql and postgresql server recipes to work with net endpoint
  logic
* removed suse support

Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Impements: blueprint cookbook-refactoring
Change-Id: Ia7fd927f42f4a1e484e8f2d34c52b1dc6d0ce6dd
This commit is contained in:
Jan Klare 2016-01-26 18:07:34 +01:00
parent 2d9a387513
commit 69ae909123
8 changed files with 7 additions and 45 deletions

View File

@ -3,7 +3,7 @@ maintainer 'openstack-chef'
maintainer_email 'openstack-dev@lists.openstack.org'
license 'Apache 2.0'
description 'Provides the shared database configuration for Chef for OpenStack.'
version '12.0.0'
version '13.0.0'
recipe 'client', 'Installs client packages for the database used by the deployment.'
recipe 'server', 'Installs and configures server packages for the database used by the deployment.'
@ -15,7 +15,7 @@ recipe 'postgresql-client', 'Installs PostgreSQL client packages.'
recipe 'postgresql-server', 'Installs and configures PostgreSQL server packages.'
recipe 'openstack-db', 'Creates necessary tables, users, and grants for OpenStack.'
%w(fedora ubuntu redhat centos suse).each do |os|
%w(ubuntu redhat centos).each do |os|
supports os
end
@ -24,4 +24,4 @@ depends 'mysql', '~> 6.0.13'
depends 'mysql2_chef_gem', '~> 1.0.1'
depends 'postgresql', '~> 3.4.18'
depends 'database', '~> 4.0.2'
depends 'openstack-common', '>= 12.0.0'
depends 'openstack-common', '>= 13.0.0'

View File

@ -20,7 +20,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
include ::Openstack
end
db_endpoint = endpoint 'db'
db_endpoint = node['openstack']['endpoints']['db']
super_password = get_password 'user', node['openstack']['db']['root_user_key']
node.override['mariadb']['allow_root_pass_change'] = true

View File

@ -24,7 +24,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
include ::Openstack
end
db_endpoint = endpoint 'db'
db_endpoint = node['openstack']['endpoints']['db']
super_password = get_password 'user', node['openstack']['db']['root_user_key']

View File

@ -25,7 +25,7 @@ class ::Chef::Recipe # rubocop:disable Documentation
include ::Openstack
end
db_endpoint = endpoint 'db'
db_endpoint = node['openstack']['endpoints']['db']
node.override['postgresql']['config']['listen_addresses'] = db_endpoint.host

View File

@ -3,7 +3,7 @@
require_relative 'spec_helper'
describe 'openstack-ops-database::mariadb-client' do
describe 'suse' do
describe 'redhat' do
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
let(:node) do
runner.node.set['openstack']['db']['service_type'] = 'mariadb'

View File

@ -1,18 +0,0 @@
# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-ops-database::mariadb-client' do
describe 'suse' do
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
let(:node) do
runner.node.set['openstack']['db']['service_type'] = 'mariadb'
runner.node
end
let(:chef_run) { runner.converge(described_recipe) }
it 'installs mariadb python client packages' do
expect(chef_run).to install_package('python-mysql')
end
end
end

View File

@ -1,15 +0,0 @@
# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-ops-database::mysql-client' do
describe 'suse' do
let(:runner) { ChefSpec::SoloRunner.new(SUSE_OPTS) }
let(:node) { runner.node }
let(:chef_run) { runner.converge(described_recipe) }
it 'installs mysql packages' do
expect(chef_run).to install_package('python-mysql')
end
end
end

View File

@ -5,11 +5,6 @@ require 'chefspec/berkshelf'
ChefSpec::Coverage.start! { add_filter 'openstack-ops-database' }
LOG_LEVEL = :fatal
SUSE_OPTS = {
platform: 'suse',
version: '11.3',
log_level: ::LOG_LEVEL
}
REDHAT_OPTS = {
platform: 'redhat',
version: '7.1',