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:
parent
2d9a387513
commit
69ae909123
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue